Fast syndrome-based hash

Last updated
Fast syndrome-based hash function (FSB)
General
Designers Daniel Augot, Matthieu Finiasz, Nicolas Sendrier
First published2003
Derived from McEliece cryptosystem and Niederreiter cryptosystem
SuccessorsImproved fast syndrome-based hash function
Related toSyndrome-based hash function
Detail
Digest sizes Scalable

In cryptography, the fast syndrome-based hash functions (FSB) are a family of cryptographic hash functions introduced in 2003 by Daniel Augot, Matthieu Finiasz, and Nicolas Sendrier. [1] Unlike most other cryptographic hash functions in use today, FSB can to a certain extent be proven to be secure. More exactly, it can be proven that breaking FSB is at least as difficult as solving a certain NP-complete problem known as regular syndrome decoding so FSB is provably secure. Though it is not known whether NP-complete problems are solvable in polynomial time, it is often assumed that they are not.

Contents

Several versions of FSB have been proposed, the latest of which was submitted to the SHA-3 cryptography competition but was rejected in the first round. Though all versions of FSB claim provable security, some preliminary versions were eventually broken. [2] The design of the latest version of FSB has however taken this attack into account and remains secure to all currently known attacks.

As usual, provable security comes at a cost. FSB is slower than traditional hash functions and uses quite a lot of memory, which makes it impractical on memory constrained environments. Furthermore, the compression function used in FSB needs a large output size to guarantee security. This last problem has been solved in recent versions by simply compressing the output by another compression function called Whirlpool. However, though the authors argue that adding this last compression does not reduce security, it makes a formal security proof impossible. [3]

Description of the hash function

We start with a compression function with parameters such that and . This function will only work on messages with length ; will be the size of the output. Furthermore, we want and to be natural numbers, where denotes the binary logarithm. The reason for is that we want to be a compression function, so the input must be larger than the output. We will later use the Merkle–Damgård construction to extend the domain to inputs of arbitrary lengths.

The basis of this function consists of a (randomly chosen) binary matrix which acts on a message of bits by matrix multiplication. Here we encode the -bit message as a vector in , the -dimensional vector space over the field of two elements, so the output will be a message of bits.

For security purposes as well as to get a faster hash speed we want to use only “regular words of weight ” as input for our matrix.

Definitions

The compression function

There are exactly different regular words of weight and length , so we need exactly bits of data to encode these regular words. We fix a bijection from the set of bit strings of length to the set of regular words of weight and length and then the FSB compression function is defined as follows :

  1. input: a message of size
  2. convert to regular word of length and weight
  3. multiply by the matrix
  4. output: hash of size

This version is usually called syndrome-based compression. It is very slow and in practice done in a different and faster way resulting in fast syndrome-based compression. We split into sub-matrices of size and we fix a bijection from the bit strings of length to the set of sequences of numbers between 1 and . This is equivalent to a bijection to the set of regular words of length and weight , since we can see such a word as a sequence of numbers between 1 and . The compression function looks as follows:

  1. Input: message of size
  2. Convert to a sequence of numbers between 1 and
  3. Add the corresponding columns of the matrices to obtain a binary string a length
  4. Output: hash of size

We can now use the Merkle–Damgård construction to generalize the compression function to accept inputs of arbitrary lengths.

Example of the compression

Situation and initialization: Hash a message using matrix H

that is separated into sub-blocks , , .

Algorithm:

  1. We split the input into parts of length and we get , , .
  2. We convert each into an integer and get , , .
  3. From the first sub-matrix , we pick the column 2, from the second sub-matrix the column 1 and from the third sub-matrix the column 4.
  4. We add the chosen columns and obtain the result .

Security proof of FSB

The Merkle–Damgård construction is proven to base its security only on the security of the used compression function. So we only need to show that the compression function is secure.

A cryptographic hash function needs to be secure in three different aspects:

  1. Pre-image resistance: Given a Hash h it should be hard to find a message m such that Hash(m)=h
  2. Second pre-image resistance: Given a message m1 it should be hard to find a message m2 such that Hash(m1) = Hash(m2)
  3. Collision resistance: It should be hard to find two different messages m1 and m2 such that Hash(m1)=Hash(m2)

Note that if an adversary can find a second pre-image, then it can certainly find a collision. This means that if we can prove our system to be collision resistant, it will certainly be second-pre-image resistant.

Usually in cryptography hard means something like “almost certainly beyond the reach of any adversary who must be prevented from breaking the system”. We will however need a more exact meaning of the word hard. We will take hard to mean “The runtime of any algorithm that finds a collision or pre-image will depend exponentially on size of the hash value”. This means that by relatively small additions to the hash size, we can quickly reach high security.

Pre-image resistance and regular syndrome decoding (RSD)

As said before, the security of FSB depends on a problem called regular syndrome decoding (RSD). Syndrome decoding is originally a problem from coding theory but its NP-completeness makes it a nice application for cryptography. Regular syndrome decoding is a special case of syndrome decoding and is defined as follows:

Definition of RSD: given matrices of dimension and a bit string of length such that there exists a set of columns, one in each , summing to . Find such a set of columns.

This problem has been proven to be NP-complete by a reduction from 3-dimensional matching. Again, though it is not known whether there exist polynomial time algorithms for solving NP-complete problems, none are known and finding one would be a huge discovery.

It is easy to see that finding a pre-image of a given hash is exactly equivalent to this problem, so the problem of finding pre-images in FSB must also be NP-complete.

We still need to prove collision resistance. For this we need another NP-complete variation of RSD: 2-regular null syndrome decoding.

Collision resistance and 2-regular null syndrome decoding (2-RNSD)

Definition of 2-RNSD: Given matrices of dimension and a bit string of length such that there exists a set of columns, two or zero in each , summing to zero. . Find such a set of columns.

2-RNSD has also been proven to be NP-complete by a reduction from 3-dimensional matching.

Just like RSD is in essence equivalent to finding a regular word such that , 2-RNSD is equivalent to finding a 2-regular word such that . A 2-regular word of length and weight is a bit string of length such that in every interval exactly two or zero entries are equal to 1. Note that a 2-regular word is just a sum of two regular words.

Suppose that we have found a collision, so we have Hash(m1) = Hash(m2) with . Then we can find two regular words and such that . We then have ; is a sum of two different regular words and so must be a 2-regular word of which the hash is zero, so we have solved an instance of 2-RNSD. We conclude that finding collisions in FSB is at least as difficult as solving 2-RNSD and so must be NP-complete.

The latest versions of FSB use the compression function Whirlpool to further compress the hash output. Though this cannot be proven, the authors argue that this last compression does not reduce security. Note that even if one were able to find collisions in Whirlpool, one would still need to find the collisions pre-images in the original FSB compression function to find a collision in FSB.

Examples

Solving RSD, we are in the opposite situation as when hashing. Using the same values as in the previous example, we are given separated into sub-blocks and a string . We are asked to find in each sub-block exactly one column such that they would all sum to . The expected answer is thus , , . This is known to be hard to compute for large matrices.

In 2-RNSD we want to find in each sub-block not one column, but two or zero such that they would sum up to 0000 (and not to ). In the example, we might use column (counting from 0) 2 and 3 from , no column from column 0 and 2 from . More solutions are possible, for example might use no columns from .

Linear cryptanalysis

The provable security of FSB means that finding collisions is NP-complete. But the proof is a reduction to a problem with asymptotically hard worst-case complexity. This offers only limited security assurance as there still can be an algorithm that easily solves the problem for a subset of the problem space. For example, there exists a linearization method that can be used to produce collisions of in a matter of seconds on a desktop PC for early variants of FSB with claimed 2^128 security. It is shown that the hash function offers minimal pre-image or collision resistance when the message space is chosen in a specific way.

Practical security results

The following table shows the complexity of the best known attacks against FSB.

Output size (bits)Complexity of collision searchComplexity of inversion
1602100.32163.6
2242135.32229.0
2562190.02261.0
3842215.52391.5
5122285.62527.4

Genesis

FSB is a speed-up version of syndrome-based hash function (SB). In the case of SB the compression function is very similar to the encoding function of Niederreiter's version of McEliece cryptosystem. Instead of using the parity check matrix of a permuted Goppa code, SB uses a random matrix . From the security point of view this can only strengthen the system.

Other properties

Variants

In 2007, IFSB was published. [3] In 2010, S-FSB was published, which is 30% faster than the original. [4]

In 2011, D. J. Bernstein and Tanja Lange published RFSB, which is 10x faster than the original FSB-256. [5] RFSB was shown to run very fast on the Spartan 6 FPGA, reaching throughputs of around 5 Gbit/s.> [6]

Related Research Articles

<span class="mw-page-title-main">Hash function</span> Mapping arbitrary data to fixed-size values

A hash function is any function that can be used to map data of arbitrary size to fixed-size values, though there are some hash functions that support variable length output. The values returned by a hash function are called hash values, hash codes, hash digests, digests, or simply hashes. The values are usually used to index a fixed-size table called a hash table. Use of a hash function to index a hash table is called hashing or scatter storage addressing.

<span class="mw-page-title-main">HMAC</span> Computer communications hash algorithm

In cryptography, an HMAC is a specific type of message authentication code (MAC) involving a cryptographic hash function and a secret cryptographic key. As with any MAC, it may be used to simultaneously verify both the data integrity and authenticity of a message. An HMAC is a type of keyed hash function that can also be used in a key derivation scheme or a key stretching scheme.

A birthday attack is a bruteforce collision attack that exploits the mathematics behind the birthday problem in probability theory. This attack can be used to abuse communication between two or more parties. The attack depends on the higher likelihood of collisions found between random attack attempts and a fixed degree of permutations (pigeonholes). With a birthday attack, it is possible to find a collision of a hash function with chance in , with being the classical preimage resistance security with the same probability. There is a general result that quantum computers can perform birthday attacks, thus breaking collision resistance, in .

In computer science, a one-way function is a function that is easy to compute on every input, but hard to invert given the image of a random input. Here, "easy" and "hard" are to be understood in the sense of computational complexity theory, specifically the theory of polynomial time problems. Not being one-to-one is not considered sufficient for a function to be called one-way.

<span class="mw-page-title-main">Cryptographic hash function</span> Hash function that is suitable for use in cryptography

A cryptographic hash function (CHF) is a hash algorithm that has special properties desirable for a cryptographic application:

In computer science and cryptography, Whirlpool is a cryptographic hash function. It was designed by Vincent Rijmen and Paulo S. L. M. Barreto, who first described it in 2000.

In cryptography, MDC-2 is a cryptographic hash function. MDC-2 is a hash function based on a block cipher with a proof of security in the ideal-cipher model. The length of the output hash depends on the underlying block cipher used.

The GOST hash function, defined in the standards GOST R 34.11-94 and GOST 34.311-95 is a 256-bit cryptographic hash function. It was initially defined in the Russian national standard GOST R 34.11-94 Information Technology – Cryptographic Information Security – Hash Function. The equivalent standard used by other member-states of the CIS is GOST 34.311-95.

<span class="mw-page-title-main">One-way compression function</span> Cryptographic primitive

In cryptography, a one-way compression function is a function that transforms two fixed-length inputs into a fixed-length output. The transformation is "one-way", meaning that it is difficult given a particular output to compute inputs which compress to that output. One-way compression functions are not related to conventional data compression algorithms, which instead can be inverted exactly or approximately to the original data.

<span class="mw-page-title-main">Merkle–Damgård construction</span> Method of building collision-resistant cryptographic hash functions

In cryptography, the Merkle–Damgård construction or Merkle–Damgård hash function is a method of building collision-resistant cryptographic hash functions from collision-resistant one-way compression functions. This construction was used in the design of many popular hash algorithms such as MD5, SHA-1 and SHA-2.

SHA-3 is the latest member of the Secure Hash Algorithm family of standards, released by NIST on August 5, 2015. Although part of the same series of standards, SHA-3 is internally different from the MD5-like structure of SHA-1 and SHA-2.

In cryptography, Very Smooth Hash (VSH) is a provably secure cryptographic hash function invented in 2005 by Scott Contini, Arjen Lenstra and Ron Steinfeld. Provably secure means that finding collisions is as difficult as some known hard mathematical problem. Unlike other provably secure collision-resistant hashes, VSH is efficient and usable in practice. Asymptotically, it only requires a single multiplication per log(n) message-bits and uses RSA-type arithmetic. Therefore, VSH can be useful in embedded environments where code space is limited.

In cryptography, cryptographic hash functions can be divided into two main categories. In the first category are those functions whose designs are based on mathematical problems, and whose security thus follows from rigorous mathematical proofs, complexity theory and formal reduction. These functions are called Provably Secure Cryptographic Hash Functions. To construct these is very difficult, and few examples have been introduced. Their practical use is limited.

The elliptic curve only hash (ECOH) algorithm was submitted as a candidate for SHA-3 in the NIST hash function competition. However, it was rejected in the beginning of the competition since a second pre-image attack was found.

In cryptography, SWIFFT is a collection of provably secure hash functions. It is based on the concept of the fast Fourier transform (FFT). SWIFFT is not the first hash function based on FFT, but it sets itself apart by providing a mathematical proof of its security. It also uses the LLL basis reduction algorithm. It can be shown that finding collisions in SWIFFT is at least as difficult as finding short vectors in cyclic/ideal lattices in the worst case. By giving a security reduction to the worst-case scenario of a difficult mathematical problem, SWIFFT gives a much stronger security guarantee than most other cryptographic hash functions.

Post-quantum cryptography (PQC), sometimes referred to as quantum-proof, quantum-safe, or quantum-resistant, is the development of cryptographic algorithms that are thought to be secure against a cryptanalytic attack by a quantum computer. The problem with popular algorithms currently used in the market is that their security relies on one of three hard mathematical problems: the integer factorization problem, the discrete logarithm problem or the elliptic-curve discrete logarithm problem. All of these problems could be easily solved on a sufficiently powerful quantum computer running Shor's algorithm or even faster and less demanding alternatives.

In discrete mathematics, ideal lattices are a special class of lattices and a generalization of cyclic lattices. Ideal lattices naturally occur in many parts of number theory, but also in other areas. In particular, they have a significant place in cryptography. Micciancio defined a generalization of cyclic lattices as ideal lattices. They can be used in cryptosystems to decrease by a square root the number of parameters necessary to describe a lattice, making them more efficient. Ideal lattices are a new concept, but similar lattice classes have been used for a long time. For example, cyclic lattices, a special case of ideal lattices, are used in NTRUEncrypt and NTRUSign.

Network coding has been shown to optimally use bandwidth in a network, maximizing information flow but the scheme is very inherently vulnerable to pollution attacks by malicious nodes in the network. A node injecting garbage can quickly affect many receivers. The pollution of network packets spreads quickly since the output of honest node is corrupted if at least one of the incoming packets is corrupted.

In cryptography, an accumulator is a one way membership hash function. It allows users to certify that potential candidates are a member of a certain set without revealing the individual members of the set. This concept was formally introduced by Josh Benaloh and Michael de Mare in 1993.

In computer science, a retrieval data structure, also known as static function, is a space-efficient dictionary-like data type composed of a collection of pairs that allows the following operations:

References

  1. Augot, D.; Finiasz, M.; Sendrier, N. (2003), A fast provably secure cryptographic hash function
  2. Saarinen, Markku-Juhani O. (2007), "Linearization Attacks Against Syndrome Based Hashes", Progress in Cryptology – INDOCRYPT 2007 (PDF), Lecture Notes in Computer Science, vol. 4859, pp. 1–9, doi:10.1007/978-3-540-77026-8_1, ISBN   978-3-540-77025-1 , retrieved 2022-11-12
  3. 1 2 Finiasz, M.; Gaborit, P.; Sendrier, N. (2007), Improved Fast Syndrome Based Cryptographic Hash Functions (PDF), ECRYPT Hash Workshop 2007, archived from the original (PDF) on 2016-03-03, retrieved 2010-01-04
  4. Meziani, Mohammed; Dagdelen, Özgür; Cayrel, Pierre-Louis; El Yousfi Alaoui, Sidi Mohamed (2011). "S-FSB: An Improved Variant of the FSB Hash Family" (PDF). Information Security and Assurance. Communications in Computer and Information Science. Vol. 200. pp. 132–145. doi:10.1007/978-3-642-23141-4_13. ISBN   978-3-642-23140-7. Archived from the original (PDF) on 2015-12-22. Retrieved 2014-12-10.
  5. Bernstein, Daniel J.; Lange, Tanja; Peters, Christiane; Schwabe, Peter (2011), "Really Fast Syndrome-Based Hashing", Progress in Cryptology – AFRICACRYPT 2011 (PDF), Lecture Notes in Computer Science, vol. 6737, pp. 134–152, doi:10.1007/978-3-642-21969-6_9, ISBN   978-3-642-21968-9 , retrieved 2022-11-12
  6. von Maurich, Ingo; Güneysu, Tim (2012), "Embedded Syndrome-Based Hashing", Progress in Cryptology - INDOCRYPT 2012 (PDF), Lecture Notes in Computer Science, vol. 7668, pp. 339–357, doi:10.1007/978-3-642-34931-7_20, ISBN   978-3-642-34930-0, archived from the original (PDF) on 2015-05-02, retrieved 2014-12-10