HOME

TheInfoList



OR:

In
cryptography Cryptography, or cryptology (from grc, , translit=kryptós "hidden, secret"; and ''graphein'', "to write", or ''-logia'', "study", respectively), is the practice and study of techniques for secure communication in the presence of adver ...
, the fast syndrome-based hash functions (FSB) are a family of
cryptographic hash functions A cryptographic hash function (CHF) is a hash algorithm (a map of an arbitrary binary string to a binary string with fixed size of n bits) that has special properties desirable for cryptography: * the probability of a particular n-bit output ...
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 In computational complexity theory, a problem is NP-complete when: # it is a problem for which the correctness of each solution can be verified quickly (namely, in polynomial time) and a brute-force search algorithm can find a solution by tryi ...
problem known as regular syndrome decoding so FSB is
provably secure Provable security refers to any type or level of computer security that can be proved. It is used in different ways by different fields. Usually, this refers to mathematical proofs, which are common in cryptography. In such a proof, the capabiliti ...
. Though it is not known whether
NP-complete In computational complexity theory, a problem is NP-complete when: # it is a problem for which the correctness of each solution can be verified quickly (namely, in polynomial time) and a brute-force search algorithm can find a solution by tryi ...
problems are solvable in
polynomial time In computer science, the time complexity is the computational complexity that describes the amount of computer time it takes to run an algorithm. Time complexity is commonly estimated by counting the number of elementary operations performed by ...
, it is often assumed that they are not. 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 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 A whirlpool is a body of rotating water produced by opposing currents or a current running into an obstacle. Small whirlpools form when a bath or a sink is draining. More powerful ones formed in seas or oceans may be called maelstroms ( ). ''Vo ...
. However, though the authors argue that adding this last compression does not reduce security, it makes a formal security proof impossible.


Description of the hash function

We start with a compression function \phi with parameters such that n > w and w \log(n/w) > r. This function will only work on messages with length s = w\log(n/w); r will be the size of the output. Furthermore, we want n,r,w,s and \log(n/w) to be natural numbers, where \log denotes the
binary logarithm In mathematics, the binary logarithm () is the power to which the number must be raised to obtain the value . That is, for any real number , :x=\log_2 n \quad\Longleftrightarrow\quad 2^x=n. For example, the binary logarithm of is , the b ...
. The reason for w \cdot \log(n/w) > r is that we want \phi to be a compression function, so the input must be larger than the output. We will later use the
Merkle–Damgård construction 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. Goldwasser, S. and Bellare, M.b ...
to extend the domain to inputs of arbitrary lengths. The basis of this function consists of a (randomly chosen) binary r \times n matrix H which acts on a message of n bits by
matrix multiplication In mathematics, particularly in linear algebra, matrix multiplication is a binary operation that produces a matrix from two matrices. For matrix multiplication, the number of columns in the first matrix must be equal to the number of rows in the s ...
. Here we encode the w\log(n/w)-bit message as a vector in (\mathbf_2)^n, the n-dimensional
vector space In mathematics and physics, a vector space (also called a linear space) is a set whose elements, often called ''vectors'', may be added together and multiplied ("scaled") by numbers called '' scalars''. Scalars are often real numbers, but can ...
over the
field Field may refer to: Expanses of open ground * Field (agriculture), an area of land used for agricultural purposes * Airfield, an aerodrome that lacks the infrastructure of an airport * Battlefield * Lawn, an area of mowed grass * Meadow, a grass ...
of two elements, so the output will be a message of r bits. For security purposes as well as to get a faster hash speed we want to use only “regular words of weight w” as input for our matrix.


Definitions

* A message is called a word of weight w and length n if it consists of n bits and exactly w of those bits are ones. * A word of weight w and length n is called regular if in every interval [(i-1)(n/w), i(n/w)) it contains exactly one nonzero entry for all 0 < i < w+1 . More intuitively, this means that if we chop up the message in ''w'' equal parts, then each part contains exactly one nonzero entry.


The compression function

There are exactly (n/w)^w different regular words of weight w and length n, so we need exactly \log((n/w)^w)= w \log(n/w) = s bits of data to encode these regular words. We fix a bijection from the set of bit strings of length s to the set of regular words of weight w and length n and then the FSB compression function is defined as follows : # input: a message of size s # convert to regular word of length n and weight w # multiply by the matrix H # output: hash of size r 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 H into sub-matrices H_i of size r \times n/w and we fix a bijection from the bit strings of length w\log(n/w) to the set of sequences of w numbers between 1 and n/w. This is equivalent to a bijection to the set of regular words of length n and weight w, since we can see such a word as a sequence of numbers between 1 and n/w. The compression function looks as follows: # Input: message of size s # Convert s to a sequence of w numbers s_1,\dots,s_w between 1 and n/w # Add the corresponding columns of the matrices H_i to obtain a binary string a length r # Output: hash of size r We can now use the
Merkle–Damgård construction 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. Goldwasser, S. and Bellare, M.b ...
to generalize the compression function to accept inputs of arbitrary lengths.


Example of the compression

Situation and initialization: Hash a message s = 010011 using 4 \times 12 matrix H
H = \left(\begin 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\right)
that is separated into w = 3 sub-blocks H_1, H_2, H_3. Algorithm: # We split the input s into w = 3 parts of length \log_2(12/3) = 2 and we get s_1 = 01, s_2 = 00, s_3 = 11. # We convert each s_i into an integer and get s_1 = 1, s_2 = 0, s_3 = 3. # From the first sub-matrix H_1, we pick the column 2, from the second sub-matrix H_2 the column 1 and from the third sub-matrix the column 4. # We add the chosen columns and obtain the result r = 0111 \oplus 0001 \oplus 1001 = 1111.


Security proof of FSB

The
Merkle–Damgård construction 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. Goldwasser, S. and Bellare, M.b ...
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 \phi is secure. A cryptographic hash function needs to be secure in three different aspects: # Pre-image resistance: Given a Hash ''h'' it should be hard to find a message ''m'' such that Hash(''m'')=''h'' # Second pre-image resistance: Given a message ''m''1 it should be hard to find a message ''m''2 such that Hash(''m''1) = Hash(''m''2) # Collision resistance: It should be hard to find two different messages ''m''1 and ''m''2 such that Hash(''m''1)=Hash(''m''2) 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 decoding methods, syndrome decoding and is defined as follows: Definition of RSD: given w matrices H_i of dimension r \times (n/w) and a bit string S of length r such that there exists a set of w columns, one in each H_i, summing to S. Find such a set of columns. This problem has been proven to be
NP-complete In computational complexity theory, a problem is NP-complete when: # it is a problem for which the correctness of each solution can be verified quickly (namely, in polynomial time) and a brute-force search algorithm can find a solution by tryi ...
by a reduction from
3-dimensional matching In the mathematical discipline of graph theory, a 3-dimensional matching is a generalization of bipartite matching (also known as 2-dimensional matching) to 3-partite hypergraphs, which consist of hyperedges each of which contains 3 vertices (inste ...
. Again, though it is not known whether there exist
polynomial time In computer science, the time complexity is the computational complexity that describes the amount of computer time it takes to run an algorithm. Time complexity is commonly estimated by counting the number of elementary operations performed by ...
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 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 w matrices H_i of dimension r \times (n/w) and a bit string S of length r such that there exists a set of w' columns, two or zero in each H_i, summing to zero. (0 < w' < 2w). Find such a set of columns. 2-RNSD has also been proven to be
NP-complete In computational complexity theory, a problem is NP-complete when: # it is a problem for which the correctness of each solution can be verified quickly (namely, in polynomial time) and a brute-force search algorithm can find a solution by tryi ...
by a reduction from
3-dimensional matching In the mathematical discipline of graph theory, a 3-dimensional matching is a generalization of bipartite matching (also known as 2-dimensional matching) to 3-partite hypergraphs, which consist of hyperedges each of which contains 3 vertices (inste ...
. Just like RSD is in essence equivalent to finding a regular word w such that Hw = S, 2-RNSD is equivalent to finding a 2-regular word w' such that Hw'=0. A 2-regular word of length n and weight w is a bit string of length n such that in every interval
Whirlpool_ A_whirlpool_is_a_body_of_rotating_water_produced_by_opposing_currents_or_a_current_running_into_an_obstacle._Small_whirlpools_form_when_a_bath_or_a_sink_is_draining._More_powerful_ones_formed_in_seas_or_oceans_may_be_called_maelstroms_(_)._''Vo_...
_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_H_separated_into_w=3_sub-blocks_and_a_string_r_=_1111._We_are_asked_to_find_in_each_sub-block_exactly_one_column_such_that_they_would_all_sum_to_r._The_expected_answer_is_thus_s_1_=_1,_s_2_=_0,_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)._In_the_example,_we_might_use_column_(counting_from_0)_2_and_3_from_H_1,_no_column_from_H_2_column_0_and_2_from_H_3._More_solutions_are_possible,_for_example_might_use_no_columns_from_H_3.


_Linear_cryptanalysis

The_Provably_secure_cryptographic_hash_function.html" "title="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\neq m_2. Then we can find two regular words w_1 and w_2 such that Hw_1=Hw_2 . We then have H(w_1+w_2)= Hw_1 + Hw_2 =2Hw_1=0; (w_1 + w_2) 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 A whirlpool is a body of rotating water produced by opposing currents or a current running into an obstacle. Small whirlpools form when a bath or a sink is draining. More powerful ones formed in seas or oceans may be called maelstroms ( ). ''Vo ...
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 H separated into w=3 sub-blocks and a string r = 1111. We are asked to find in each sub-block exactly one column such that they would all sum to r. The expected answer is thus s_1 = 1, s_2 = 0, 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). In the example, we might use column (counting from 0) 2 and 3 from H_1, no column from H_2 column 0 and 2 from H_3. More solutions are possible, for example might use no columns from H_3.


Linear cryptanalysis

The Provably secure cryptographic hash function">provable security Provable security refers to any type or level of computer security that can be proved. It is used in different ways by different fields. Usually, this refers to mathematical proofs, which are common in cryptography. In such a proof, the capabiliti ...
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 Linear cryptanalysis, 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.


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 cryptosystem, Niederreiter's version of
McEliece cryptosystem In cryptography, the McEliece cryptosystem is an asymmetric encryption algorithm developed in 1978 by Robert McEliece. It was the first such scheme to use randomization in the encryption process. The algorithm has never gained much acceptance in ...
. Instead of using the parity check matrix of a permuted
Goppa code In mathematics, an algebraic geometric code (AG-code), otherwise known as a Goppa code, is a general type of linear code constructed by using an algebraic curve X over a finite field \mathbb_q. Such codes were introduced by Valerii Denisovich Go ...
, SB uses a random matrix H. From the security point of view this can only strengthen the system.


Other properties

* Both the block size of the hash function and the output size are completely scalable. * The speed can be adjusted by adjusting the number of bitwise operations used by FSB per input bit. * The security can be adjusted by adjusting the output size. * Bad instances exist and one must take care when choosing the matrix H. * The matrix used in the compression function may grow large in certain situations. This might be a limitation when trying to use FSB on memory constrained devices. This problem was solved in the related hash function called Improved FSB, which is still
provably secure Provable security refers to any type or level of computer security that can be proved. It is used in different ways by different fields. Usually, this refers to mathematical proofs, which are common in cryptography. In such a proof, the capabiliti ...
, but relies on slightly stronger assumptions.


Variants

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 Tanja Lange is a German cryptographer and number theorist at the Eindhoven University of Technology. She is known for her research on post-quantum cryptography. Education and career Lange earned a diploma in mathematics in 1998 from the Technic ...
published RFSB, which is 10x faster than the original FSB-256. RFSB was shown to run very fast on the Spartan 6 FPGA, reaching throughputs of around 5 Gbit/s.>


References


External links


FSB website for SHA-3 competition
{{Cryptography navbox , hash Cryptographic hash functions