Questions tagged as ['sha-2']

SHA-2 is a family of cryptographic hash functions designed by the NSA and published by NIST in 2001. The family includes various output lengths (224, 256, 384, and 512 bits).
Score: 0
SHA-256 doesn't follow a uniform distribution?
vn flag
Bob

I have been playing with SHA-2-256 in Julia and I noticed that the hashes produced don't appear to follow a uniform distribution. My understanding of secure hashing algorithms is that they should approximate a uniform distribution well, so they are not predictable.

Here is the Julia code I'm using:

using BitIntegers, Distributions, HypothesisTests, Random, SHA

function sha256_rounds()
    rounds::Arr ...
Score: 10
Arturo Roman avatar
Why is SHA3 more secure than SHA2?
in flag

Why are SHA3 algorithms considered more secure than their SHA2 counterparts? Surely in part, it is due to their resistance to length extension attacks. But specifically, when considering collision resistance they have the same O(n) attack times.

Is it because they are more resistant to preimage attacks?

Score: 0
Curious avatar
Does SHA384 make sense with HMAC-SHA256?
cn flag

In the sense of security level (as defined, for example, by Ferguson and Schneier in the book Practical Cryptography), does it make sense to use SHA384 with HMAC-SHA256 in the general settings. By birthday paradox, HMAC-SHA256 will give a security level of 128 bits, and SHA384 will give 192 bits. To my understanding, the overall security level will be limited to 128 bits and SHA384 is just faking around ...

Score: -2
Arturo Roman avatar
What are the security flaws of SHA?
in flag

I have been researching SHA algorithms extensively, specifically SHA1, SHA2-256, SHA2-512, SHA3-256, and SHA3-512, and have found many instances of successful collision attacks as well as methods.

In my list are the following:

  • Brute Force attacks
    • Birthday attacks
    • Yuval's Birthday attack (improved birthday attack with different conditions)
  • Reduced round attacks
    • Successful on attacks on all SHA al ...