Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Whirlpool (hash function)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Cryptographic hash function}} {{redirect|WHIRLPOOL||Whirlpool (disambiguation)}} {{Infobox encryption method |name = Whirlpool |image = |caption = |designers = [[Vincent Rijmen]], [[Paulo S. L. M. Barreto]] |publish date = 2000, 2001, 2003 |series = |derived from = [[Square (cipher)|Square]], [[Advanced Encryption Standard|AES]] |derived to = |related to = |certification = [[NESSIE]] |digest size = 512 bits |key size = <!--(block or stream ciphers)--> |security claim = Large hashsum size |block size = <!--(block ciphers)--> |state size = <!--(stream ciphers)--> |structure = [[Miyaguchi-Preneel]] |rounds = 10 |cryptanalysis = In 2009, a [[rebound attack]] was announced that presents full collisions against 4.5 rounds of Whirlpool in 2<sup>120</sup> operations, semi-free-start collisions against 5.5 rounds in 2<sup>120</sup> time and semi-free-start near-collisions against 7.5 rounds in 2<sup>128</sup> time.<ref>{{cite conference | author=Florian Mendel1, Christian Rechberger, Martin Schläffer, Søren S. Thomsen | date=2009-02-24 | title=The Rebound Attack: Cryptanalysis of Reduced Whirlpool and Grøstl | conference=Fast Software Encryption: 16th International Workshop | url=https://www.cosic.esat.kuleuven.be/fse2009/slides/2402_1150_Schlaeffer.pdf }}</ref> }} In [[computer science]] and [[cryptography]], '''Whirlpool''' (sometimes styled '''WHIRLPOOL''') is a [[cryptographic hash function]]. It was designed by [[Vincent Rijmen]] (co-creator of the [[Advanced Encryption Standard]]) and [[Paulo S. L. M. Barreto]], who first described it in 2000. The hash has been recommended by the [[NESSIE]] project. It has also been adopted by the [[International Organization for Standardization]] (ISO) and the [[International Electrotechnical Commission]] (IEC) as part of the joint ISO/IEC 10118-3 [[international standard]]. == Design features == [[File:Messier51 sRGB.jpg|thumb|190px|right|The [[Whirlpool Galaxy]] (M51), which inspired the name of the algorithm.<ref name="whirlpoolpg">{{cite web | url=http://www.larc.usp.br/~pbarreto/WhirlpoolPage.html | title=The WHIRLPOOL Hash Function | author=Paulo S. L. M. Barreto | date=2008-11-25 | archive-url=https://web.archive.org/web/20171129084214/http://www.larc.usp.br/~pbarreto/WhirlpoolPage.html | archive-date=2017-11-29 | url-status=dead | access-date=2018-08-09}}</ref>]] Whirlpool is a hash designed after the [[Square (cipher)|Square]] [[block cipher]], and is considered to be in that family of block cipher functions. Whirlpool is a [[One-way compression function#Miyaguchi–Preneel|Miyaguchi-Preneel]] construction based on a substantially modified [[Advanced Encryption Standard]] (AES). Whirlpool takes a message of any length less than 2<sup>256</sup> bits and returns a 512-bit [[message digest]].<ref>{{cite journal | author1=Barreto, Paulo S. L. M. | author2=Rijmen, Vincent | name-list-style=amp | title=The WHIRLPOOL Hashing Function | date=2003-05-24 | url=http://www.larc.usp.br/~pbarreto/whirlpool.zip | format=ZIP | archive-url=https://web.archive.org/web/20171026140501/http://www.larc.usp.br/%7Epbarreto/whirlpool.zip | archive-date=2017-10-26 | url-status=dead | access-date=2018-08-09}}</ref> The authors have declared that :"WHIRLPOOL is not (and will never be) [[Patent|patented]]. It may be used free of charge for any purpose."<ref name="whirlpoolpg" /> === Version changes === The original Whirlpool will be called ''Whirlpool-0'', the first revision of Whirlpool will be called ''Whirlpool-T'' and the latest version will be called ''Whirlpool'' in the following test vectors. * In the first revision in 2001, the [[S-box]] was changed from a randomly generated one with good cryptographic properties to one which has better cryptographic properties and is easier to implement in hardware. * In the second revision (2003), a flaw in the [[MDS matrix|diffusion matrix]] was found that lowered the estimated security of the algorithm below its potential.<ref>{{cite journal | title=On the diffusion matrix employed in the Whirlpool hashing function | author1=Kyoji, Shibutani | author2=Shirai, Taizo | name-list-style=amp | date=2003-03-11 | url=https://www.cosic.esat.kuleuven.be/nessie/reports/phase2/whirlpool-20030311.pdf | access-date=2018-08-09}} </ref> Changing the 8x8 rotating matrix constants from (1, 1, 3, 1, 5, 8, 9, 5) to (1, 1, 4, 1, 8, 5, 2, 9) solved this issue. == Internal structure == The Whirlpool hash function is a [[Merkle–Damgård construction]] based on an [[Advanced Encryption Standard|AES]]-like [[block cipher]] W in [[One-way compression function#Miyaguchi–Preneel|Miyaguchi–Preneel]] mode.<ref name="whirlpoolpg" /> The [[block cipher]] W consists of an 8×8 state matrix <math>S</math> of bytes, for a total of 512 bits. The encryption process consists of updating the state with four round functions over 10 rounds. The four round functions are SubBytes (SB), ShiftColumns (SC), MixRows (MR) and AddRoundKey (AK). During each round the new state is computed as <math>S=AK \circ MR \circ SC \circ SB(S) </math>. === SubBytes === The '''SubBytes''' operation applies a non-linear permutation (the S-box) to each byte of the state independently. The 8-bit S-box is composed of 3 smaller 4-bit S-boxes. === ShiftColumns === The '''ShiftColumns''' operation cyclically shifts each byte in each column of the state. Column ''j'' has its bytes shifted downwards by ''j'' positions. === MixRows === The '''MixRows''' operation is a right-multiplication of each row by an 8×8 matrix over <math>GF({2^8})</math>. The matrix is chosen such that the [[branch number]] (an important property when looking at resistance to [[differential cryptanalysis]]) is 9, which is maximal. === AddRoundKey === The '''AddRoundKey''' operation uses bitwise [[Exclusive or|xor]] to add a key calculated by the key schedule to the current state. The key schedule is identical to the encryption itself, except the AddRoundKey function is replaced by an '''AddRoundConstant''' function that adds a predetermined constant in each round. == Whirlpool hashes == The Whirlpool algorithm has undergone two revisions since its original 2000 specification. People incorporating Whirlpool will most likely use the most recent revision of Whirlpool; while there are no known security weaknesses in earlier versions of Whirlpool, the most recent revision has better hardware implementation efficiency characteristics, and is also likely to be more secure. As mentioned earlier, it is also the version adopted in the ISO/IEC 10118-3 [[international standard]]. The 512-bit (64-byte) Whirlpool hashes (also termed ''message digests'') are typically represented as 128-digit [[hexadecimal]] numbers.<br /> The following demonstrates a 43-byte [[ASCII]] input (not including quotes) and the corresponding Whirlpool hashes: {| class="wikitable" |- ! Version !! Input String !! Computed Hash |- | Whirlpool-0 || style="text-align: center;width:22em;"| ''"''[[The quick brown fox jumps over the lazy dog]]''"'' || 4F8F5CB531E3D49A61CF417CD133792CCFA501FD8DA53EE368FED20E5FE0248C 3A0B64F98A6533CEE1DA614C3A8DDEC791FF05FEE6D971D57C1348320F4EB42D |- | Whirlpool-T || style="text-align: center;width:22em;"| ''"''The quick brown fox jumps over the lazy dog''"'' || 3CCF8252D8BBB258460D9AA999C06EE38E67CB546CFFCF48E91F700F6FC7C183 AC8CC3D3096DD30A35B01F4620A1E3A20D79CD5168544D9E1B7CDF49970E87F1 |- | Whirlpool || style="text-align: center;width:22em;"| ''"''The quick brown fox jumps over the lazy dog''"'' || B97DE512E91E3828B40D2B0FDCE9CEB3C4A71F9BEA8D88E75C4FA854DF36725F D2B52EB6544EDCACD6F8BEDDFEA403CB55AE31F03AD62A5EF54E42EE82C3FB35 |} == Implementations == The authors provide [[reference implementation]]s of the Whirlpool algorithm, including a version written in [[C (programming language)|C]] and a version written in [[Java (programming language)|Java]].<ref name="whirlpoolpg" /> These reference implementations have been released into the public domain.<ref name="whirlpoolpg" /> Research on the security analysis of the Whirlpool function however, has revealed that on average, the introduction of 8 random faults is sufficient to compromise the 512-bit Whirlpool hash message being processed and the secret key of HMAC-Whirlpool within the context of Cloud of Things (CoTs). This emphasizes the need for increased security measures in its implementation.<ref>Li, W., Gao, Z., Gu, D., Ge, C., Liao, L., Zhou, Z., Liu, Y., & Liu, Z. (2017). Security Analysis of the Whirlpool Hash Function in the Cloud of Things. KSII Transactions on Internet and Information Systems, 11(1), 536–551. https://doi.org/10.3837/tiis.2017.01.028</ref> == Adoption == Two of the first widely used mainstream cryptographic programs that started using Whirlpool were [[FreeOTFE]], followed by [[TrueCrypt]] in 2005.{{Citation needed|date=February 2018}} [[VeraCrypt]] (a fork of [[TrueCrypt]]) included Whirlpool (the final version) as one of its supported hash algorithms.<ref>{{cite web | url=https://www.veracrypt.fr/en/Whirlpool.html | title=Whirlpool | work=VeraCrypt Documentation | publisher=IDRIX | access-date=2018-08-09}}</ref> == See also == * [[Digital timestamping]] == References == {{reflist}} == External links == * {{webarchive |url=https://web.archive.org/web/20171129084214/http://www.larc.usp.br/~pbarreto/WhirlpoolPage.html |date=2017-11-29 | title=The WHIRLPOOL Hash Function}} * {{SourceForge|jacksum|Jacksum}}, a Java implementation of all three revisions of Whirlpool * {{Github|jzelinskie/whirlpool}} – An open source [[Go_(programming_language)|Go]] implementation of the latest revision of Whirlpool * [https://web.archive.org/web/20120219054743/http://www.karljapetre.com/whirlpool/ A Matlab Implementation of the Whirlpool Hashing Function] * [http://rhash.sourceforge.net/ RHash], an [[open source]] command-line tool, which can calculate and verify Whirlpool hash. * [https://metacpan.org/pod/Digest::Whirlpool Perl Whirlpool] module at [[CPAN]] * [https://rubygems.org/gems/digest-whirlpool Digest module] implementing the Whirlpool hashing algorithm in [[Ruby_(programming_language)|Ruby]] * [http://method-combination.net/lisp/ironclad/ Ironclad] a [[Common Lisp]] cryptography package containing a Whirlpool implementation * [https://www.iso.org/standard/39876.html The ISO/IEC 10118-3:2004 standard] * [https://www.cosic.esat.kuleuven.be/nessie/testvectors/hash/whirlpool/index.html Test vectors for the Whirlpool hash] from the [[NESSIE]] project * [http://csharptest.net/browse/src/Library/Crypto/WhirlpoolManaged.cs Managed C# implementation] * [https://pypi.org/project/Whirlpool/ Python Whirlpool module] {{Cryptography navbox | hash|state=uncollapsed}} {{ISO standards}} [[Category:Cryptographic hash functions]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Citation needed
(
edit
)
Template:Cite journal
(
edit
)
Template:Cite web
(
edit
)
Template:Cryptography navbox
(
edit
)
Template:Github
(
edit
)
Template:ISO standards
(
edit
)
Template:Infobox encryption method
(
edit
)
Template:Redirect
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:SourceForge
(
edit
)
Template:Webarchive
(
edit
)