# Tag Info

9

To answer every part of this question in full details would require almost a book. Here, I’ll attempt to address all sub-questions and give a brief summary together with pointers each time. If you want me to develop some specific aspect, you can ask in the comments. Most of what I will say will not be specific to proving knowledge of a SHA-256 preimage, but ...

6

minimum reasonable length for a truncated hash (specifically, a truncated SHA256 hash) to ensure preimage resistance. To answer this one might consider the attacks. Brute-force preimage algorithm: Currently, the collective power of the BitCoin miners reached $\approx 2^{92}$ SHA-256 double hashes per year in 06 Agust 2019. If you assume that the miners ...

5

What is the need for further encoding the hash value? Representing the hash as a string of characters, without increasing the size too much. This is known as Binary-to-text encoding. It is commonly used for cryptographic data (hashes, ciphertexts..), because that can contain arbitrary sequences of bits (or arbitrary sequences of arbitrary bytes), and some ...

2

I'm reading the question as: Prover knows a message (thus its SHA-256 hash, and message length), and position+length of a substring (thus the substring). Verifier knows the hash, the substring and its position (thus length), and message length. Prover should demonstrate knowledge of a message with such SHA-256 hash and length and with such substring at ...

1

What your describing is the core of many password hashing algorithms like bcrypt or pbkdf2. However, these are all complicated functions which don't just iterate. They are very commonly used with salt. If you would hash a password as you described n times, a reasonable choice would be bigger then 100.000. However this is only for storing the password. If ...

1

Yes it most certainly is, on the assumption that the hashing algorithm used is cryptographically secure and uniform in its output. As a thought experiment, consider that after Elliptic Curve Diffie Hellman, the shared secret's (curve point) x co-ordinate is recommended by good practice to be passed through a hashing algorithm to derive a key. This is ...

1

As stated in other answers, yes revealing $y=\operatorname{SHA-256}(\mathrm{secret}\mathbin\|\mathrm{known\_constant})$ in addition to $x=\operatorname{SHA-256}(\mathrm{secret})$ gives extra information about $\mathrm{secret}$. That has both theoretical and practical implications. From a theoretical standpoint, that's very likely to reduce the number of ...

1

Is this possible using the same message? No. But the message / input for SHA-256 is defined as a bit string, which - for most implementations - means an octet string, also known as a byte array. Of course, in practice, this usually means that the function has one or more update methods that accept bytes, and a method that finalizes the input, so that the ...

Only top voted, non community-wiki answers of a minimum length are eligible