General | |
---|---|
Designers | Vadim Lyubashevsky, Daniele Micciancio, Chris Peikert, Alon Rosen |
First published | 2008 |
Related to | FFT-based algorithms |
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 as 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.
Unlike many other provably secure hash functions, the algorithm is quite fast, yielding a throughput of 40MB/s on a 3.2 GHz Intel Pentium 4. Although SWIFFT satisfies many desirable cryptographic and statistical properties, it was not designed to be an "all-purpose" cryptographic hash function. For example, it is not a pseudorandom function, and would not be a suitable instantiation of a random oracle. The algorithm is less efficient than most traditional hash functions that do not give a proof of their collision-resistance. Therefore, its practical use would lie mostly in applications where the proof of collision-resistance is particularly valuable, such as digital signatures that must remain trustworthy for a long time.
A modification of SWIFFT called SWIFFTX was proposed as a candidate for SHA-3 function to the NIST hash function competition[1] and was rejected in the first round.[2]
Contents |
The algorithm is as follows[3]:
We choose concrete values for the parameters n, m, and p as follows: n = 64, m= 16, p= 257. For these parameters, any fixed compression function in the family takes a binary input of length mn = 1024 bits (128 bytes), to an output in the range , which has size . An output in can easily be represented using 528 bits (66 bytes).
The SWIFFT functions can be described as a simple algebraic expression over some polynomial ring . A family of these functions depends on three main parameters: let be a power of 2, let be a small integer, and let be a modulus (not necessarily prime, but is convenient to choose it prime). Define to be the ring , i.e., the ring of polynomials in having integer coefficients, modulo and . An element of can be written as a polynomial of degree having coefficients in . A certain function in the SWIFFT family is specified by fixed elements of the ring , that are called multipliers. The function corresponds to the following equation over the ring R:
The are polynomials with binary coefficients, and corresponding to the binary input of length .
To compute the above expression, the main problem is to compute the polynomial products . A fast way to compute these products is given by the convolution theorem. This says that under certain restrictions the following holds:
Here denotes the Fourier transform and denotes the pointwise product. In the general case of the convolution theorem does not denote multiplication but convolution. It can however be shown that polynomial multiplication is a convolution.
For finding the Fourier transform we will use FFT (Fast Fourier Transform) which finds the transform in time. The multiplication algorithm now goes as follows: We use FFT to compute (all at once) the Fourier coefficients of each polynomial. Then we pointwise multiply the respective Fourier coefficients of the two polynomials, and finally we us an inverse FFT to return a polynomial of degree .
Instead of the normal Fourier transform SWIFFT uses the Number-theoretic transform. Number-theoretic transform uses roots of unity in instead of complex roots of unity. To make this work, we need to ensure that is a field, and that primitive 2nth roots of unity exist in this field. This can be done by taking prime such that divides .
The parameters m,p,n are subject to the following restrictions:
A possible choice is n=64, m=16, p=257. We get a throughput of about 40MB/s, security of about operations for finding collisions, and a digest size of 512 bits.
SWIFFT is an example of a provably secure cryptographic hash function. As with most security proofs, the security proof of SWIFFT relies on a reduction to a certain difficult to solve mathematical problem. Note that this means that the security of SWIFFT relies strongly on the difficulty of this mathematical problem.
The reduction in the case of SWIFFT is to the problem of finding short vectors in cyclic/ideal lattices. It can be proven that the following holds: Suppose we have an algorithm that for a random version of SWIFFT given by can find collisions in within some feasible time , and with probability . It is allowed that the algorithm only works in a small but noticeable fraction of the family SWIFFT. Then we can find also an algorithm which can always find a short vector in any ideal lattice over the ring in some feasible time , depending on and . This means that finding collisions in SWIFFT is at least as difficult as the worst case scenario of finding short vectors in a lattice over . At the moment the fastest algorithms for finding short vectors are all exponential in . Note that this ensures that there is no significant set of "weak instances" where the security of SWIFFT is weak. This guarantee is not given by most other provably secure hash functions.
Known working attacks are: Generalized Birthday Attack, which takes operations and inversion attacks which takes 2448 operations for a standard parameter choice. This is usually considered to be enough to render an attack by an adversary infeasible.