Misplaced Pages

Fast syndrome-based hash

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

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. 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.

#995004

52-481: 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. 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

104-455: A bijection from the set of bit strings of length s {\displaystyle s} to the set of regular words of weight w {\displaystyle w} and length n {\displaystyle n} and then the FSB compression function is defined as follows : This version is usually called syndrome-based compression . It is very slow and in practice done in

156-447: A bit string S {\displaystyle S} of length r {\displaystyle r} such that there exists a set of w ′ {\displaystyle w'} columns, two or zero in each H i {\displaystyle H_{i}} , summing to zero. ( 0 < w ′ < 2 w ) {\displaystyle (0<w'<2w)} . Find such

208-417: A bit string S {\displaystyle S} of length r {\displaystyle r} such that there exists a set of w {\displaystyle w} columns, one in each H i {\displaystyle H_{i}} , summing to S {\displaystyle S} . Find such a set of columns. This problem has been proven to be NP-complete by

260-460: A collision-resistant hash function from a collision-resistant compression function. The hash function PARSHA-256 was designed using the parallel algorithm and the compression function of SHA-256. As mentioned in the introduction, the padding scheme used in the Merkle–Damgård construction must be chosen carefully to ensure the security of the scheme. Mihir Bellare gives sufficient conditions for

312-401: 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

364-467: A different and faster way resulting in fast syndrome-based compression . We split H {\displaystyle H} into sub-matrices H i {\displaystyle H_{i}} of size r × n / w {\displaystyle r\times n/w} and we fix a bijection from the bit strings of length w log ⁡ ( n / w ) {\displaystyle w\log(n/w)} to

416-431: A message of n {\displaystyle n} bits by matrix multiplication . Here we encode the w log ⁡ ( n / w ) {\displaystyle w\log(n/w)} -bit message as a vector in ( F 2 ) n {\displaystyle (\mathbf {F} _{2})^{n}} , the n {\displaystyle n} -dimensional vector space over

468-449: A padding scheme to possess to ensure that the MD construction is secure: it suffices that the scheme be "MD-compliant" (the original length-padding scheme used by Merkle is an example of MD-compliant padding). The conditions are: Here, | X | denotes the length of X . With these conditions in place, a collision in the MD hash function exists exactly when there is a collision in

520-832: 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 S {\displaystyle S} 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 . Definition of 2-RNSD: Given w {\displaystyle w} matrices H i {\displaystyle H_{i}} of dimension r × ( n / w ) {\displaystyle r\times (n/w)} and

572-402: A report explaining its evaluation algorithm-by-algorithm. The following hash function submissions were accepted for round two, but did not make it to the final round. As noted in the announcement of the finalists, "none of these candidates was clearly broken". The following hash function submissions were accepted for round one but did not pass to round two. They have neither been conceded by

SECTION 10

#1732786916996

624-627: 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 w {\displaystyle w} such that H w = S {\displaystyle Hw=S} , 2-RNSD is equivalent to finding a 2-regular word w ′ {\displaystyle w'} such that H w ′ = 0 {\displaystyle Hw'=0} . A 2-regular word of length n {\displaystyle n} and weight w {\displaystyle w}

676-403: A smaller output hash size or to guarantee a better mixing and avalanche effect on the bits in the hash sum. The finalisation function is often built by using the compression function. (Note that in some documents a different terminology is used: the act of length padding is called "finalisation". ) The popularity of this construction is due to the fact, proven by Merkle and Damgård , that if

728-399: A wide-pipe hash function can be made approximately twice as fast if the wide-pipe state can be divided in half in the following manner: one half is input to the succeeding compression function while the other half is combined with the output of that compression function. The main idea of the hash construction is to forward half of the previous chaining value forward to XOR it to the output of

780-442: 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

832-1139: Is a bit string of length n {\displaystyle n} such that in every interval [ ( i − 1 ) w , i w ) {\displaystyle [(i-1)w,iw)} 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( m 1 ) = Hash( m 2 ) with m 1 ≠ m 2 {\displaystyle m_{1}\neq m_{2}} . Then we can find two regular words w 1 {\displaystyle w_{1}} and w 2 {\displaystyle w_{2}} such that H w 1 = H w 2 {\displaystyle Hw_{1}=Hw_{2}} . We then have H ( w 1 + w 2 ) = H w 1 + H w 2 = 2 H w 1 = 0 {\displaystyle H(w_{1}+w_{2})=Hw_{1}+Hw_{2}=2Hw_{1}=0} ; ( w 1 + w 2 ) {\displaystyle (w_{1}+w_{2})}

884-612: 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

936-418: Is an incomplete list of known submissions. NIST selected 51 entries for round 1. 14 of them advanced to round 2, from which 5 finalists were selected. The winner was announced to be Keccak on October 2, 2012. NIST selected five SHA-3 candidate algorithms to advance to the third (and final) round: NIST noted some factors that figured into its selection as it announced the finalists: NIST has released

988-444: Is separated into w = 3 {\displaystyle w=3} sub-blocks H 1 {\displaystyle H_{1}} , H 2 {\displaystyle H_{2}} , H 3 {\displaystyle H_{3}} . Algorithm : 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

1040-437: Is shown that the hash function offers minimal pre-image or collision resistance when the message space is chosen in a specific way. The following table shows the complexity of the best known attacks against FSB. 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

1092-516: Is that we want ϕ {\displaystyle \phi } 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 r × n {\displaystyle r\times n} matrix H {\displaystyle H} which acts on

SECTION 20

#1732786916996

1144-468: Is thus s 1 = 1 {\displaystyle s_{1}=1} , s 2 = 0 {\displaystyle s_{2}=0} , s 3 = 3 {\displaystyle s_{3}=3} . 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 r {\displaystyle r} ). In

1196-430: Is very similar to the Merkle–Damgård construction but has a larger internal state size, meaning that the bit-length that is internally used is larger than the output bit-length. If a hash of n bits is desired, then the compression function f takes 2 n bits of chaining value and m bits of the message and compresses this to an output of 2 n bits. Therefore, in a final step, a second compression function compresses

1248-568: The Federal Register on November 2, 2007. "NIST is initiating an effort to develop one or more additional hash algorithms through a public competition, similar to the development process for the Advanced Encryption Standard (AES)." The competition ended on October 2, 2012, when NIST announced that Keccak would be the new SHA-3 hash algorithm. The winning hash function has been published as NIST FIPS 202

1300-527: 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 . The Merkle–Damgård construction was described in Ralph Merkle 's Ph.D. thesis in 1979. Ralph Merkle and Ivan Damgård independently proved that

1352-1337: The Merkle–Damgård construction to generalize the compression function to accept inputs of arbitrary lengths. Situation and initialization : Hash a message s = 010011 {\displaystyle s=010011} using 4 × 12 {\displaystyle 4\times 12} matrix H H = ( 1 0 1 1   0 1 0 0   1 0 1 1 0 1 0 0   0 1 1 1   0 1 0 0 0 1 1 1   0 1 0 0   1 0 1 0 1 1 0 0   1 0 1 1   0 0 0 1 ) {\displaystyle H=\left({\begin{array}{llllcllllcllll}1&0&1&1&~&0&1&0&0&~&1&0&1&1\\0&1&0&0&~&0&1&1&1&~&0&1&0&0\\0&1&1&1&~&0&1&0&0&~&1&0&1&0\\1&1&0&0&~&1&0&1&1&~&0&0&0&1\end{array}}\right)} that

1404-822: The field of two elements, so the output will be a message of r {\displaystyle r} bits. For security purposes as well as to get a faster hash speed we want to use only “regular words of weight w {\displaystyle w} ” as input for our matrix. There are exactly ( n / w ) w {\displaystyle (n/w)^{w}} different regular words of weight w {\displaystyle w} and length n {\displaystyle n} , so we need exactly log ⁡ ( ( n / w ) w ) = w log ⁡ ( n / w ) = s {\displaystyle \log((n/w)^{w})=w\log(n/w)=s} bits of data to encode these regular words. We fix

1456-606: The "SHA-3 Standard", to complement FIPS 180-4, the Secure Hash Standard . The NIST competition has inspired other competitions such as the Password Hashing Competition . Submissions were due October 31, 2008 and the list of candidates accepted for the first round was published on December 9, 2008. NIST held a conference in late February 2009 where submitters presented their algorithms and NIST officials discussed criteria for narrowing down

1508-538: The NIST official round one candidates web site. As such, they are withdrawn from the competition. Several submissions received by NIST were not accepted as first-round candidates, following an internal review by NIST. In general, NIST gave no details as to why each was rejected. NIST also has not given a comprehensive list of rejected algorithms; there are known to be 13, but only the following are public. Merkle%E2%80%93Damg%C3%A5rd construction In cryptography ,

1560-737: The authors argue that adding this last compression does not reduce security, it makes a formal security proof impossible. We start with a compression function ϕ {\displaystyle \phi } with parameters n , r , w {\displaystyle {n,r,w}} such that n > w {\displaystyle n>w} and w log ⁡ ( n / w ) > r {\displaystyle w\log(n/w)>r} . This function will only work on messages with length s = w log ⁡ ( n / w ) {\displaystyle s=w\log(n/w)} ; r {\displaystyle r} will be

1612-405: The block size of the compression function is 8 bytes (64 bits). We get two blocks (the padding octets shown with the lightblue background color): This implies that other messages having the same content but ending with additional zeros at the end will result in the same hash value. In the above example, another almost-identical message (0x48617368496e7075 74 00 ) will generate the same hash value as

Fast syndrome-based hash - Misplaced Pages Continue

1664-587: The collisions pre-images in the original FSB compression function to find a collision in FSB. Solving RSD, we are in the opposite situation as when hashing. Using the same values as in the previous example, we are given H {\displaystyle H} separated into w = 3 {\displaystyle w=3} sub-blocks and a string r = 1111 {\displaystyle r=1111} . We are asked to find in each sub-block exactly one column such that they would all sum to r {\displaystyle r} . The expected answer

1716-465: The compression function ϕ {\displaystyle \phi } is secure. A cryptographic hash function needs to be secure in three different aspects: 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

1768-424: The compression function. In so doing the construction takes in longer message blocks every iteration than the original wide pipe. Using the same function f as before, it takes n -bit chaining values and n + m bits of the message. However, the price to pay is the extra memory used in the construction for feed-forward. The MD construction is inherently sequential. There is a parallel algorithm which constructs

1820-409: The diagram, the one-way compression function is denoted by f , and transforms two fixed length inputs to an output of the same size as one of the inputs. The algorithm starts with an initial value, the initialization vector (IV). The IV is a fixed value (algorithm- or implementation-specific). For each message block, the compression (or compacting) function f takes the result so far, combines it with

1872-483: The example, we might use column (counting from 0) 2 and 3 from H 1 {\displaystyle H_{1}} , no column from H 2 {\displaystyle H_{2}} column 0 and 2 from H 3 {\displaystyle H_{3}} . More solutions are possible, for example might use no columns from H 3 {\displaystyle H_{3}} . The provable security of FSB means that finding collisions

1924-611: The field of candidates for Round 2. The list of 14 candidates accepted to Round 2 was published on July 24, 2009. Another conference was held on August 23–24, 2010 (after CRYPTO 2010) at the University of California, Santa Barbara , where the second-round candidates were discussed. The announcement of the final round candidates occurred on December 10, 2010. On October 2, 2012, NIST announced its winner, choosing Keccak , created by Guido Bertoni, Joan Daemen, and Gilles Van Assche of STMicroelectronics and Michaël Peeters of NXP. This

1976-456: The last internal hash value ( 2 n bits) to the final hash value ( n bits). This can be done as simply as discarding half of the last 2 n -bit output. SHA-512/224 and SHA-512/256 take this form since they are derived from a variant of SHA-512. SHA-384 and SHA-224 are similarly derived from SHA-512 and SHA-256, respectively, but the width of their pipe is much less than 2 n . It has been demonstrated by Mridul Nandi and Souradyuti Paul that

2028-443: The message block, and produces an intermediate result. The last block is padded with zeros as needed and bits representing the length of the entire message are appended. (See below for a detailed length-padding example.) To harden the hash further, the last result is then sometimes fed through a finalisation function . The finalisation function can have several purposes such as compressing a bigger internal state (the last result) into

2080-409: The message length value (see SHA-1 pseudocode ). Further improvement can be made by inserting the length value in the last block if there is enough space. Doing so avoids having an extra block for the message length. If we assume the length value is encoded on 5 bytes (40 bits), the message becomes: Storing the message length out-of-band in metadata, or otherwise embedded at the start of the message,

2132-440: The one-way compression function f is collision resistant , then so is the hash function constructed using it. Unfortunately, this construction also has several undesirable properties: Due to several structural weaknesses of Merkle–Damgård construction, especially the length extension problem and multicollision attacks, Stefan Lucks proposed the use of the wide-pipe hash instead of Merkle–Damgård construction. The wide-pipe hash

Fast syndrome-based hash - Misplaced Pages Continue

2184-426: The original message "HashInput" above. In other words, any message having extra zeros at the end makes it indistinguishable from the one without them. To prevent this situation, the first bit of the first padding octet is changed to "1" (0x80), yielding: However, most common implementations use a fixed bit-size (generally 64 or 128 bits in modern algorithms) at a fixed position at the end of the last block for inserting

2236-406: The parity check matrix of a permuted Goppa code , SB uses a random matrix H {\displaystyle H} . From the security point of view this can only strengthen the system. In 2007, IFSB was published. In 2010, S-FSB was published, which is 30% faster than the original. In 2011, D. J. Bernstein and Tanja Lange published RFSB, which is 10x faster than the original FSB-256. RFSB

2288-399: 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. As said before,

2340-413: The result into blocks of fixed size, and processes them one at a time with the compression function, each time combining a block of the input with the output of the previous round. In order to make the construction secure, Merkle and Damgård proposed that messages be padded with a padding that encodes the length of the original message. This is called length padding or Merkle–Damgård strengthening . In

2392-571: 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 w {\displaystyle w} matrices H i {\displaystyle H_{i}} of dimension r × ( n / w ) {\displaystyle r\times (n/w)} and

2444-522: The set of sequences of w {\displaystyle w} numbers between 1 and n / w {\displaystyle n/w} . This is equivalent to a bijection to the set of regular words of length n {\displaystyle n} and weight w {\displaystyle w} , since we can see such a word as a sequence of numbers between 1 and n / w {\displaystyle n/w} . The compression function looks as follows: We can now use

2496-489: The size of the output. Furthermore, we want n , r , w , s {\displaystyle n,r,w,s} and log ⁡ ( n / w ) {\displaystyle \log(n/w)} to be natural numbers, where log {\displaystyle \log } denotes the binary logarithm . The reason for w ⋅ log ⁡ ( n / w ) > r {\displaystyle w\cdot \log(n/w)>r}

2548-464: The structure is sound: that is, if an appropriate padding scheme is used and the compression function is collision-resistant , then the hash function will also be collision-resistant. The Merkle–Damgård hash function first applies an MD-compliant padding function to create an input whose size is a multiple of a fixed number (e.g. 512 or 1024) — this is because compression functions cannot handle inputs of arbitrary size. The hash function then breaks

2600-410: The submitters nor have had substantial cryptographic weaknesses. However, most of them have some weaknesses in the design components, or performance issues. The following non-conceded round one entrants have had substantial cryptographic weaknesses announced: The following round one entrants have been officially retracted from the competition by their submitters; they are considered broken according to

2652-470: The underlying compression function. Therefore, the Merkle–Damgård construction is provably secure when the underlying compression function is secure. To be able to feed the message to the compression function, the last block must be padded with constant data (generally with zeroes) to a full block. For example, suppose the message to be hashed is "HashInput" (9 octet string, 0x48617368496e707574 in ASCII ) and

SECTION 50

#1732786916996

2704-545: Was shown to run very fast on the Spartan 6 FPGA, reaching throughputs of around 5 Gbit/s.> NIST hash function competition The NIST hash function competition was an open competition held by the US National Institute of Standards and Technology (NIST) to develop a new hash function called SHA-3 to complement the older SHA-1 and SHA-2 . The competition was formally announced in

#995004