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
Preimage attack
(section)
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!
== Applied preimage attacks == By definition, an ideal hash function is such that the fastest way to compute a first or second preimage is through a [[brute-force attack]]. For an {{math|{{var|n}}}}-bit hash, this attack has a [[time complexity]] {{math|1=2{{sup|{{var|n}}}}}}, which is considered too high for a typical output size of {{math|{{var|n}}}} = 128 bits. If such complexity is the best that can be achieved by an adversary, then the hash function is considered preimage-resistant. However, there is a general result that [[quantum computer]]s perform a structured preimage attack in <math>\sqrt{2^{n}} = 2^{\frac{n}{2}}</math>, which also implies second preimage<ref>{{cite web | url=https://cr.yp.to/hash/quantumsha3-20101112.pdf | title=Quantum attacks against Blue Midnight Wish, ECHO, Fugue, Grøstl, Hamsi, JH, Keccak, Shabal, SHAvite-3, SIMD, and Skein | author=Daniel J. Bernstein | work=[[University of Illinois at Chicago]] | date=2010-11-12 | access-date=2020-03-29}}</ref> and thus a collision attack. Faster preimage attacks can be found by [[cryptanalysis|cryptanalysing]] certain hash functions, and are specific to that function. Some significant preimage attacks have already been discovered, but they are not yet practical. If a practical preimage attack is discovered, it would drastically affect many Internet protocols. In this case, "practical" means that it could be executed by an attacker with a reasonable amount of resources. For example, a preimaging attack that costs trillions of dollars and takes decades to preimage one desired hash value or one message is not practical; one that costs a few thousand dollars and takes a few weeks might be very practical. All currently known practical or almost-practical attacks<ref>{{cite web | url=https://casecurity.org/2014/01/30/why-we-need-to-move-to-sha-2/ | title=Why We Need to Move to SHA-2 |author=Bruce Morton |author2=Clayton Smith | publisher=[[Certificate Authority Security Council]] | date=2014-01-30}}</ref><ref>{{cite web | url=https://security.googleblog.com/2017/02/announcing-first-sha1-collision.html | title=Google Online Security Blog: Announcing the first SHA1 collision | access-date=2017-02-23}}</ref> on [[MD5]] and [[SHA-1]] are [[collision attack]]s.<ref>{{cite web |date=2009-01-01 |title=MD5 and Perspectives |url=https://www.cs.cmu.edu/~perspectives/md5.html}}</ref> In general, a collision attack is easier to mount than a preimage attack, as it is not restricted by any set value (any two values can be used to collide). The time complexity of a brute-force collision attack, in contrast to the preimage attack, is only <math>2^{\frac{n}{2}}</math>. ===Restricted preimage space attacks=== The computational infeasibility of a first preimage attack on an ideal hash function assumes that the set of possible hash inputs is too large for a brute force search. However if a given hash value is known to have been produced from a set of inputs that is relatively small or is ordered by likelihood in some way, then a brute force search may be effective. Practicality depends on the input set size and the speed or cost of computing the hash function. A common example is the use of hashes to store [[password]] validation data for authentication. Rather than store the plaintext of user passwords, an access control system stores a hash of the password. When a user requests access, the password they submit is hashed and compared with the stored value. If the stored validation data is stolen, the thief will only have the hash values, not the passwords. However most users choose passwords in predictable ways and many passwords are short enough that all possible combinations can be tested if fast hashes are used, even if the hash is rated secure against preimage attacks.<ref>{{cite web | url=https://arstechnica.com/information-technology/2012/12/25-gpu-cluster-cracks-every-standard-windows-password-in-6-hours/ | title=25-GPU cluster cracks every standard Windows password in <6 hours | date=2012-12-10 | first=Dan | last=Goodin | publisher=[[Ars Technica]] | access-date=2020-11-23}}</ref> Special hashes called [[key derivation function]]s have been created to slow searches. ''See'' [[Password cracking]]. For a method to prevent the testing of short passwords see [[salt (cryptography)]].
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)