<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://en.zaoniao.it/index.php?action=history&amp;feed=atom&amp;title=SWIFFT</id>
	<title>SWIFFT - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://en.zaoniao.it/index.php?action=history&amp;feed=atom&amp;title=SWIFFT"/>
	<link rel="alternate" type="text/html" href="http://en.zaoniao.it/index.php?title=SWIFFT&amp;action=history"/>
	<updated>2026-05-15T12:13:17Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.32.0</generator>
	<entry>
		<id>http://en.zaoniao.it/index.php?title=SWIFFT&amp;diff=6697&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;&lt;amp/&gt; In cryptography, '''SWIFFT''' is a collection of provably secure hash functions. It...&quot;</title>
		<link rel="alternate" type="text/html" href="http://en.zaoniao.it/index.php?title=SWIFFT&amp;diff=6697&amp;oldid=prev"/>
		<updated>2019-07-08T15:10:01Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;amp/&amp;gt; In &lt;a href=&quot;/index.php?title=Cryptography&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Cryptography (page does not exist)&quot;&gt;cryptography&lt;/a&gt;, &amp;#039;&amp;#039;&amp;#039;SWIFFT&amp;#039;&amp;#039;&amp;#039; is a collection of &lt;a href=&quot;/index.php?title=Provably_secure_cryptographic_hash_function&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Provably secure cryptographic hash function (page does not exist)&quot;&gt;provably secure&lt;/a&gt; &lt;a href=&quot;/Cryptographic_hash_function&quot; title=&quot;Cryptographic hash function&quot;&gt;hash functions&lt;/a&gt;. It...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;amp/&amp;gt;&lt;br /&gt;
In [[cryptography]], '''SWIFFT''' is a collection of [[Provably secure cryptographic hash function|provably secure]] [[cryptographic hash function|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 [[Lenstra-Lenstra-Lovász lattice basis reduction algorithm|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 lattice cryptography|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 [[provably secure cryptographic hash function|cryptographic hash functions]].&lt;br /&gt;
&lt;br /&gt;
Unlike many other provably secure hash functions, the algorithm is quite fast, yielding a throughput of 40MB/s on a 3.2&amp;amp;nbsp;GHz Intel Pentium 4. Although SWIFFT satisfies many desirable cryptographic and statistical properties, it was not designed to be an &amp;quot;all-purpose&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
A modification of SWIFFT called [[SWIFFTX]] was proposed as a candidate for SHA-3 function to the [[NIST hash function competition]] and was rejected in the first round.&lt;br /&gt;
&lt;br /&gt;
==The algorithm==&lt;br /&gt;
The algorithm is as follows:&lt;br /&gt;
#Let the [[polynomial]] variable be called &amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt;&lt;br /&gt;
#'''Input''': message &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; of length &amp;lt;math&amp;gt;mn&amp;lt;/math&amp;gt;&lt;br /&gt;
#Convert &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; to a collection of &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; polynomials &amp;lt;math&amp;gt;p_i&amp;lt;/math&amp;gt; in a certain [[polynomial ring]] &amp;lt;math&amp;gt;R&amp;lt;/math&amp;gt; with binary coefficients.&lt;br /&gt;
#Compute the Fourier coefficients of each &amp;lt;math&amp;gt;p_i&amp;lt;/math&amp;gt; using SWIFFT.&lt;br /&gt;
#Define the Fourier coefficients of &amp;lt;math&amp;gt;a_i&amp;lt;/math&amp;gt;, so that they are fixed and depend on a family of SWIFFT.&lt;br /&gt;
#Point-wise multiply the Fourier coefficients &amp;lt;math&amp;gt;p_i&amp;lt;/math&amp;gt; with the Fourier coefficients of &amp;lt;math&amp;gt;a_i&amp;lt;/math&amp;gt; for each &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;.&lt;br /&gt;
#Use inverse FFT to obtain &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; polynomials &amp;lt;math&amp;gt;f_i&amp;lt;/math&amp;gt; of degree &amp;lt;math&amp;gt;&amp;lt;2n&amp;lt;/math&amp;gt;.&lt;br /&gt;
#Compute &amp;lt;math&amp;gt;f = \sum_{i=1}^m (f_i)&amp;lt;/math&amp;gt; modulo &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\alpha^n+1&amp;lt;/math&amp;gt;.&lt;br /&gt;
#Convert &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;n\log(p)&amp;lt;/math&amp;gt; bits and '''output''' it.&lt;br /&gt;
&lt;br /&gt;
* The [[Fast fourier transform|FFT]] operation in step 4 is easy to invert, and is performed to achieve [[Confusion and diffusion|diffusion]], that is, to mix the input bits.&lt;br /&gt;
* The [[linear combination]] in step 6 achieves [[Confusion and diffusion|confusion]], since it compresses the input.&lt;br /&gt;
* This is just a high level description of what the algorithm does, some more advanced optimizations are used to finally yield a high performing algorithm.&lt;br /&gt;
&lt;br /&gt;
===Example===&lt;br /&gt;
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 &amp;lt;math&amp;gt; \mathbb{Z}^n_p &amp;lt;/math&amp;gt;, which has size &amp;lt;math&amp;gt; p^n = 257^{64}&amp;lt;/math&amp;gt;. An output in &amp;lt;math&amp;gt; \mathbb{Z}^n_p &amp;lt;/math&amp;gt; can easily be represented using 528 bits (66 bytes).&lt;br /&gt;
&lt;br /&gt;
==Algebraic description==&lt;br /&gt;
The SWIFFT functions can be described as a simple algebraic expression over some [[polynomial ring]] &amp;lt;math&amp;gt;R&amp;lt;/math&amp;gt;. A family of these functions depends on three main parameters: let &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; be a power of 2, let &amp;lt;math&amp;gt;m &amp;gt; 0&amp;lt;/math&amp;gt; be a small integer, and let &amp;lt;math&amp;gt;p &amp;gt; 0&amp;lt;/math&amp;gt; be a modulus (not necessarily [[prime]], but is convenient to choose it prime). Define &amp;lt;math&amp;gt;R&amp;lt;/math&amp;gt; to be the ring &amp;lt;math&amp;gt;R = \mathbb{Z}_p[\alpha]/(\alpha^n + 1)&amp;lt;/math&amp;gt;, i.e., the ring of polynomials in &amp;lt;math&amp;gt;\alpha &amp;lt;/math&amp;gt; having integer coefficients, modulo &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\alpha^n +1&amp;lt;/math&amp;gt;. An element of &amp;lt;math&amp;gt;R&amp;lt;/math&amp;gt; can be written as a polynomial of degree &amp;lt;math&amp;gt;&amp;lt; n&amp;lt;/math&amp;gt; having coefficients in &amp;lt;math&amp;gt;Z_p&amp;lt;/math&amp;gt;. A certain function in the SWIFFT family is specified by &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; fixed elements &amp;lt;math&amp;gt;a_1,\ldots,a_m \in R&amp;lt;/math&amp;gt; of the ring &amp;lt;math&amp;gt;R&amp;lt;/math&amp;gt;, that are called multipliers. The function corresponds to the following equation over the ring ''R'':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \sum_{i=1}^m (a_i \cdot x_i) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;math&amp;gt;x_1,\ldots, x_m \in R&amp;lt;/math&amp;gt; are polynomials with binary coefficients, and corresponding to the binary input of length &amp;lt;math&amp;gt;mn&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Computing the polynomial product==&lt;br /&gt;
To compute the above expression, the main problem is to compute the polynomial products &amp;lt;math&amp;gt; a_i \cdot x_i &amp;lt;/math&amp;gt;. A fast way to compute these products is given by the [[convolution theorem]]. This says that under certain restrictions the following holds:&lt;br /&gt;
&lt;br /&gt;
: &amp;lt;math&amp;gt;\mathcal{F}\{f*g\} = \mathcal{F}\{f\} \cdot \mathcal{F}\{g\}&amp;lt;/math&amp;gt;&lt;br /&gt;
Here &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; denotes the [[Fourier transform]] and &amp;lt;math&amp;gt;\cdot&amp;lt;/math&amp;gt; denotes the pointwise product. In the general case of the convolution theorem &amp;lt;math&amp;gt;*&amp;lt;/math&amp;gt; does not denote multiplication but [[convolution]]. It can however be shown that polynomial multiplication is a convolution.&lt;br /&gt;
&lt;br /&gt;
===Fast Fourier transform===&lt;br /&gt;
For finding the Fourier transform we will use FFT ([[fast Fourier transform]]) which finds the transform in &amp;lt;math&amp;gt; O(n \log(n))&amp;lt;/math&amp;gt;time. The multiplication algorithm now goes as follows:&lt;br /&gt;
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 &amp;lt;math&amp;gt;&amp;lt; 2n&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Number-theoretic transform===&lt;br /&gt;
Instead of the normal Fourier transform SWIFFT uses the [[number-theoretic transform]]. Number-theoretic transform uses roots of unity in &amp;lt;math&amp;gt;\mathbb{Z}_p&amp;lt;/math&amp;gt; instead of complex roots of unity. To make this work, we need to ensure that &amp;lt;math&amp;gt;\mathbb{Z}_p&amp;lt;/math&amp;gt; is a [[finite field]], and that primitive 2''n''&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; roots of unity exist in this field. This can be done by taking &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; prime such that &amp;lt;math&amp;gt;2n&amp;lt;/math&amp;gt; divides &amp;lt;math&amp;gt;p-1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Parameter choice==&lt;br /&gt;
The parameters ''m'',''p'',''n'' are subject to the following restrictions:&lt;br /&gt;
* ''n'' must be a power of 2&lt;br /&gt;
* ''p'' must be prime&lt;br /&gt;
* ''p''-1 must be a multiple of 2''n''&lt;br /&gt;
* &amp;lt;math&amp;gt;\log(p)&amp;lt;/math&amp;gt; must be greater than ''m'' (otherwise the output will not be smaller than the input)&lt;br /&gt;
&lt;br /&gt;
A possible choice is ''n''=64, ''m''=16, ''p''=257. We get a throughput of about 40MB/s, security of about &amp;lt;math&amp;gt;2^{106}&amp;lt;/math&amp;gt; operations for finding collisions, and a digest size of 512 bits.&lt;br /&gt;
&lt;br /&gt;
==Statistical properties==&lt;br /&gt;
* '''(Universal hashing).''' The SWIFFT family of functions is [[Universal hashing|universal]]. It means that for any fixed distinct &amp;lt;math&amp;gt;x, x'&amp;lt;/math&amp;gt;, the probability (over the random choice of &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; from the family) that &amp;lt;math&amp;gt;f(x) = f(x')&amp;lt;/math&amp;gt; is the inverse of the size of the range.&lt;br /&gt;
* '''(Regularity).''' SWIFFT family of compression functions is regular. A function &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; is said to be regular if, for an input &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; chosen uniformly at random from the domain, the output &amp;lt;math&amp;gt;f(x)&amp;lt;/math&amp;gt; is distributed uniformly over the range.&lt;br /&gt;
* '''(Randomness extractor).''' SWIFFT is a [[randomness extractor]]. For hash tables and related applications, it is usually desirable for the outputs of the hash function to be distributed uniformly (or as close to uniformly as possible), even when the inputs are not uniform. Hash functions that give such guarantees are known as [[randomness extractor]]s, because they ''distill'' the non-uniform randomness of the input down to an (almost) uniformly distributed output. Formally, randomness extraction is actually a property of a family of functions, from which one function is chosen at random (and obliviously to the input).&lt;br /&gt;
&lt;br /&gt;
==Cryptographic properties and security==&lt;br /&gt;
* SWIFFT is not [[Pseudorandom function family|pseudorandom]], due to linearity. For any function &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; from our family and any two inputs &amp;lt;math&amp;gt;x_1&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;x_2&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;x_1+x_2&amp;lt;/math&amp;gt; is also a valid input, we have that &amp;lt;math&amp;gt;f(x_1)+f(x_2) = f(x_1+x_2)&amp;lt;/math&amp;gt;. This relation is very unlikely to hold for a random function, so an adversary can easily distinguish our functions from a random function.&lt;br /&gt;
* It is not claimed by the authors that SWIFFT functions behave like a [[random oracle]]. A function is said to behave like a random oracle if it acts like a truly random function. This differs from pseudorandomness in that the function is fixed and public.&lt;br /&gt;
* SWIFFT family is [[Provably secure cryptographic hash function|provably]] collision resistant (in an asymptotic sense), under a relatively mild assumption about the [[Worst-case complexity|worst-case]] difficulty of finding short vectors in cyclic/ideal lattices. This implies that the family is also second preimage resistant.&lt;br /&gt;
&lt;br /&gt;
===Theoretical security===&lt;br /&gt;
SWIFFT is an example of a [[provably secure cryptographic hash function]]. As with most security proofs, the security proof of SWIFFT relies on a [[Polynomial-time reduction|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.&lt;br /&gt;
&lt;br /&gt;
The reduction in the case of SWIFFT is to the problem of finding short vectors in cyclic/[[Ideal lattice cryptography|ideal lattices]]. It can be proven that the following holds:&lt;br /&gt;
Suppose we have an algorithm that for a random version of SWIFFT given by &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; can find collisions in &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; within some feasible time &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;, and with probability &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt;. 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 &amp;lt;math&amp;gt;f_2&amp;lt;/math&amp;gt; which can ''always'' find a short vector in ''any'' ideal lattice over the ring &amp;lt;math&amp;gt;\mathbb{Z}_p[\alpha]/(\alpha^n + 1)&amp;lt;/math&amp;gt; in some feasible time &amp;lt;math&amp;gt;T_2&amp;lt;/math&amp;gt;, depending on &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt;.&lt;br /&gt;
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 &amp;lt;math&amp;gt;\mathbb{Z}_p[\alpha]/(\alpha^n + 1)&amp;lt;/math&amp;gt;. At the moment the fastest algorithms for finding short vectors are all exponential in &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;. Note that this ensures that there is no significant set of &amp;quot;weak instances&amp;quot; where the security of SWIFFT is weak. This guarantee is not given by most other provably secure hash functions.&lt;br /&gt;
&lt;br /&gt;
===Practical security===&lt;br /&gt;
Known working attacks are the [[Birthday_problem#The_generalized_birthday_problem|generalized birthday attack]], which takes 2&amp;lt;sup&amp;gt;106&amp;lt;/sup&amp;gt; operations and ''inversion attacks'' which takes 2&amp;lt;sup&amp;gt;448&amp;lt;/sup&amp;gt; operations for a standard parameter choice. This is usually considered to be enough to render an attack by an adversary infeasible.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
&lt;br /&gt;
[http://wikipedia.org/ http://wikipedia.org/]&lt;br /&gt;
&lt;br /&gt;
[[Category:Cryptographic algorithms]]&lt;br /&gt;
[[Category:Cryptography]]&lt;br /&gt;
==See Also on BitcoinWiki==&lt;br /&gt;
* [[STAY]]&lt;br /&gt;
* [[UMKA]]&lt;br /&gt;
* [[Phoneum]]&lt;br /&gt;
* [[Yumerium]]&lt;br /&gt;
* [[Cryptfunder]]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
</feed>