Questions tagged [sha-256]

SHA-256 is part of the SHA-2 family of hash functions with a 256-bit output and a 128-bit security level.

SHA-256 is one of the algorithms in the SHA-2 family of cryptographic hash functions defined by NIST. It processes the input in 512-bit block and has a 256-bit output, for a 128-bit security level. It is defined in terms of operations on 32-bit words.

External links

597 questions
8
votes
3 answers

Can two files/strings have the same SHA-256 value?

I was wondering whether, theoretically, 2 files can have the same SHA-256 value. Since there are only $16^{256}$ or $2^{1024}$ SHA256 sums, all 1024-bit files (with $2^{1024}$ different combinations) will have to have different SHA256 sums (if I'm…
The Holy See
  • 183
  • 1
  • 1
  • 3
7
votes
1 answer

How to generate the SHA-2 constants?

The SHA spec states - eg, in the case of SHA-224 and SHA-256 - that the constants "represent the first 32-bits of the fractional parts of the cube roots of the first 64 primes". How are these values "represented"? Beginning with a prime number, and…
5
votes
1 answer

Is there a way to tell if a given string is a sha256 hash?

Just like, for instance, we can easily check if a given number is a visa card number, by verifying prefix and checksum - can we do anything similar for hash?
shal
  • 207
  • 1
  • 2
  • 6
4
votes
1 answer

What is the rationale for including addition in SHA-256?

Short Version: SHA-256 uses addition alongside a variety of bit-wise operations. What's up with that? I was reading a description of how SHA-256 worked and it included a description of the various internal operations that take place on the blocks of…
billpg
  • 711
  • 5
  • 14
3
votes
1 answer

Difference between SHA 512, SHA 512 Half, SHA 256

I was trying to create a python wrapper for RIPPLE crypto currency, and i ran into SHA 512 half which i have no idea or reverse googled it to no avail. Can someone help me understand the difference. Currently i am assuming its any 256 bits of…
Vipin Mohan
  • 133
  • 1
  • 1
  • 5
3
votes
1 answer

What inputs can SHA 256 take?

I'm a complete cryptography beginner and I'm interested in the cryptography behind Bitcoin, hashing, key cryptography etc. I suspect that SHA-256 can only take Alpha-Numerics but I was wondering if anybody could confirm this or explain otherwise,…
Teddy Krish
  • 31
  • 1
  • 2
3
votes
3 answers

Any weakness when performing SHA-256 repeatedly?

Is it significantly easier to reverse a SHA-256 hash if you know that the input was a 32 byte output of SHA-256? I assume for most outputs of SHA-256 there will be zero, one or two possible 32 byte inputs. Mapping and storing all of the values is…
fadedbee
  • 916
  • 1
  • 10
  • 29
2
votes
2 answers

What are the first bits of a bitstring, for instance generated using SHA-256?

I have a string that generates from SHA-256 x = fea5f97f9ca1e1a0a2ae344f4e12a3ab0c4d9221e6bb5d70bc567e39f8fbc3d5 What's are the first 10 bits are of the value of x?
2
votes
3 answers

What happens if a padding sequence is encountered at the end of input for SHA-256?

I am acquiring binary data from a sensor and storing it in a file. As each byte of data is read from the sensor, it goes into a SHA256 hash. The length of the acquired data stream varies from one session to another. It is possible that an individual…
2
votes
2 answers

Is SHA-256 bijective on a certain domain?

Following the discussion on bijectivity and given that function inverse is studied on domain/codomain, I would like to ask whether we can find subsets where this function can be bijective. Let's say the subset of all alphanumeric strings of exactly…
Roman Gherta
  • 144
  • 9
2
votes
1 answer

Do any other factors aside from length of input affect the runtime of the SHA-256 hashing algorithm?

To my understanding, the only factor that (even if ever so slightly on most implementations) affects the run time of SHA-256 is the amount of padded chunks the extension & compression function have to run over. The only way to alter the amount of…
user80785
2
votes
0 answers

Is there a reason behind the number of bit rotations used in SHA-256?

SHA-256 uses the following bitwise functions during the hash algorithm: $$\begin{align*} \Sigma_0^{\{256\}}(x)&=\operatorname{ROTR}^{…
inersha
  • 63
  • 1
  • 10
2
votes
1 answer

SHA-256 Hash identical on two similar but not exact items

There are two discs that we have that have all the same files. However, using a new method for burning the discs, the second disc had modified file dates of 5/30/2018 while the original disc has dates of 2013. The hash value of each CD is…
J. Doe
  • 23
  • 2
2
votes
2 answers

What would the implications be of a single randomly discovered SHA-256 collision?

Imagine if someone messing around with hashes accidentally came across two inputs to SHA-256 that produced the same output. Not a concerted effort, not Google/NSA or crypanalysis. No tin foil hats. Just random chance in say a high school. And they…
Paul Uszak
  • 15,390
  • 2
  • 28
  • 77
2
votes
1 answer

SHA256 message bytes

I have been reviewing the documentation for SHA256 and I believe the last two words (64 bits) for each chunk are not used in creating the message schedule. From Wikipedia... Extend the first 16 words into the remaining 48 words w[16..63] of the…
Andrew
1
2 3