New answers tagged

-5

Yes, it is possible provided you allow for hashes that are not necessarily a fixed length. This is essentially what content based addressing is. The content can be "any text, file, or byte" and it is addressed by a hash of it. For an example of this you can check out IPFS. You can share a short address of a file with someone else and they can ...


20

Strictly speaking, all hash functions are compressing since the output can be smaller than the input, but I imagine you're asking about compressing data that can later be losslessly decompressed. This is impossible due to the pigeonhole principle. The fact that the fixed output space of a hash algorithm is smaller than the input space means that there will ...


10

If the question was about (current form) Reversible cryptographic hash functions Then No! One-wayness property of the cryptographic secure hash functions will prevent that. Hash functions don't use keys. So if you can reverse, everybody will reverse and there will be no secure hash function at all. Besides, mathematically impossible, too; hash functions use ...


2

TLDR: (2) is a sufficient condition, but probably not a necessary condition. Most people would probably believe that HMAC-SHA-1 is indeed a PRF, although SHA-1 is not WCR. The 2006 paper by Bellare claims to prove that e.g. HMAC-SHA-1 is a PRF, if the inner compression function of SHA-1 is a PRF. No known attacks break the pseudorandomness of the inner ...


1

ECB is weak because a given 128 bit input block maps to the same encrypted output block. The only thing you can do is look for matches between blocks of the encrypted flag and outputs in the known plaintext ciphertext pairs file. Essentially for each 128 bit chunk of ASCII text in the flag E(plaintext)=ciphertext. The known plaintext ciphertext pair file is ...


3

You can't completely precalculate 1111, however, you can completely precalculate messages that have a length multiple of 512. The reason is simple, SHA-256 uses 512-bit message block per compression, i.e. the compression function of SHA-256 uses 512-bit message inputs and 256-bit previous hash values. $$C:\{0,1\}^{256}\times \{0,1\}^{512} \to \{0,1\}^{256}$$ ...


1

The encoding doesn't change the output of the entropy source. They are reversible operations. You can use what encoding suits you, change to base64 for transmission and strong on the database, and change to byte is a good choice since, in general, the cryptographic hash functions are accepting bytes to process, so it might better to convert them bytes before ...


0

MD5 collisions are imminent, within seconds one can file two collisions, see corkami. Therefore adding MD5 hashes to countermeasure against collision doesn't produce much effort for the attacker. Due to the MD design, a collision can be used to produce many pairs very easily. What the attacker is need produce $2^{128}$ MD5 collision pairs and check that they ...


1

What I mean is can there be two messages M, M' both of the same length such that both md5(M)=md5(M') and sha256(M)=sha256(M')? Yes, such a pair of messages must exist, for the same reason that any function that ranges over a larger set of inputs than its output domain must have collisions. In math this is called the pigeonhole principle. The use case I'm ...


1

It is possible such collisions exist, but because SHA-256 is collision resistant, finding any collisions would be computationally infeasible. You may safely assume without further checking that if two files have the same SHA-256 hash, then they contain the same content. You can so safely assume that, given current cryptographic knowledge, that there's no ...


Top 50 recent answers are included