Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Preimage attack

From Wikipedia, the free encyclopedia
Attack model against cryptographic hash functions

Incryptography, apreimage attack oncryptographic hash functions tries to find amessage that has a specific hash value. A cryptographic hash function should resist attacks on itspreimage (set of possible inputs).

In the context of attack, there are two types of preimage resistance:

  • preimage resistance: for essentially all pre-specified outputs, it is computationally infeasible to find any input that hashes to that output; i.e., giveny, it is difficult to find anx such thath(x) =y.[1]
  • second-preimage resistance: for a specified input, it is computationally infeasible to find another input which produces the same output; i.e., givenx, it is difficult to find a second inputx′ ≠x such thath(x) =h(x′).[1]

These can be compared with acollision resistance, in which it is computationally infeasible to find any two distinct inputsx,x that hash to the same output; i.e., such thath(x) =h(x′).[1]

Collision resistance implies second-preimage resistance, but does not guarantee preimage resistance.[1] However, under certain assumptions of the range of the hash function, collision resistance does imply preimage resistance (by a provisional implication)[1]. Conversely, a second-preimage attack implies a collision attack (trivially, since, in addition tox,x is already known right from the start). Via the provisional implication, a pre-image attack will also imply a second-preimage attack, which then also extends to a collision attack.

Applied preimage attacks

[edit]

By definition, an ideal hash function is such that the fastest way to compute a first or second preimage is through abrute-force attack. For ann-bit hash, this attack has atime complexity2n, which is considered too high for a typical output size ofn = 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 thatquantum computers perform a structured preimage attack in2n=2n2{\displaystyle {\sqrt {2^{n}}}=2^{\frac {n}{2}}}, which also implies second preimage[2] and thus a collision attack.

Faster preimage attacks can be found bycryptanalysing 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[3][4] onMD5 andSHA-1 arecollision attacks.[5] 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 only2n2{\displaystyle 2^{\frac {n}{2}}}.

Restricted preimage space attacks

[edit]

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 storepassword 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.[6] Special hashes calledkey derivation functions have been created to slow searches.SeePassword cracking. For a method to prevent the testing of short passwords seesalt (cryptography).

See also

[edit]

References

[edit]
  1. ^abcdeRogaway, P.; Shrimpton, T. (2004)."Cryptographic Hash-Function Basics: Definitions, Implications, and Separations for Preimage Resistance, Second-Preimage Resistance, and Collision Resistance"(PDF).Fast Software Encryption. Lecture Notes in Computer Science. Vol. 3017. Springer-Verlag. pp. 371–388.doi:10.1007/978-3-540-25937-4_24.ISBN 978-3-540-22171-5. Retrieved17 November 2012.
  2. ^Daniel J. Bernstein (2010-11-12)."Quantum attacks against Blue Midnight Wish, ECHO, Fugue, Grøstl, Hamsi, JH, Keccak, Shabal, SHAvite-3, SIMD, and Skein"(PDF).University of Illinois at Chicago. Retrieved2020-03-29.
  3. ^Bruce Morton; Clayton Smith (2014-01-30)."Why We Need to Move to SHA-2".Certificate Authority Security Council.
  4. ^"Google Online Security Blog: Announcing the first SHA1 collision". Retrieved2017-02-23.
  5. ^"MD5 and Perspectives". 2009-01-01.
  6. ^Goodin, Dan (2012-12-10)."25-GPU cluster cracks every standard Windows password in <6 hours".Ars Technica. Retrieved2020-11-23.
Common functions
SHA-3 finalists
Other functions
Password hashing/
key stretching functions
General purpose
key derivation functions
MAC functions
Authenticated
encryption
modes
Attacks
Design
Standardization
Utilization
General
Mathematics
Retrieved from "https://en.wikipedia.org/w/index.php?title=Preimage_attack&oldid=1336542504"
Category:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp