TransWikia.com

Hash Function Properties

Cryptography Asked by Antonis Paragas on January 19, 2021

What I am trying to understand is shown in all three properties of a secure hash function, I will focus on Preimage attack resistance.

Preimage resistance: given a hash h, it’s difficult to find m s.t. H(m)=h

My question is, what does "given" mean in this case?

Does it mean for a randomly selected h from the output space of H, or can it be a specific hash selected by the adversary?

For example, assume a secure hash function H defined as $H: {0,1}^*rightarrow{0,1}^n$. We will build a hash function H’ that returns $0^n$ when input=0 otherwise returns $H(input)$.

An adversary in that example knows that if the $h=0^n$ then the message could be 0. So in the case that he can select the h he can violate pre-image resistance, otherwise, in the case, the input is randomly selected, since H’ is secure, the probability of getting $0^n$ would be negligible and so the property still holds.

The same goes when selecting two messages m1,m2 for 2nd preimage, and collision resistance.

———————-EDIT——————————

The link @hamidreza posted was really helpful.
In the paper, they describe 3 definitions for preimage resistance, called Pre, e(everywhere)Pre, and an (always)Pre.

Pre: in which the adversary is given a hash of a randomly generated message along with the key (randomly generated as well) of the function.

ePre: I didn’t quite get it, I think the adversary has |Y| shots to generate a random message and its hash be included in the given set of hashes Y for a specific key (randomly generated).

aPre: similar to the first one but stronger, the adversary can find a key for which he will be able to generate a collision for a hash of a randomly generated message.

So, to answer my question, the adversary doesn’t get to choose the hash for any of the suggested definitions.
Based on Pre at least, the H’ that I defined is pre-image resistant since the chance of picking m=0, or any other m s.t. $H(m)==0^n$ is negligible

Are the definitions correct?

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP