Questions tagged [sha-512]

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

Filter by
Sorted by
Tagged with
73 votes
6 answers
63k views

SHA-512 faster than SHA-256?

I'm getting this strange result that SHA-512 is around 50% faster than SHA-256. I'm using .net's SHA512Managed and SHA256Managed ...
ispiro's user avatar
  • 2,005
68 votes
2 answers
25k views

Is truncating a SHA512 hash to the first 160 bits as secure as using SHA1?

I am from a web development background (I don't know an awful lot about cryptography or how the algorithms themselves work), so I am asking this question in simple terms. Consider a hash of the word '...
BadHorsie's user avatar
  • 813
41 votes
4 answers
59k views

How can hashes be unique if they are limited in number? [duplicate]

I'm curious, how can for example SHA-256 be unique if there are only a limited number of them?! For clarification: how many MD5 hashes are there? $16^{32}$ MD5 hashes can be produced. $16^{64}$ SHA-...
M D P's user avatar
  • 529
30 votes
3 answers
5k views

Dropbox Password security

Dropbox have recently published How Dropbox securely stores your passwords Is this really more secure than using bcrypt with a complexity of 11 or 12 ? The password "chain" is secure as its weakest ...
exussum's user avatar
  • 403
23 votes
2 answers
16k views

Are the SHA family hash outputs practically random?

Say I hashed the output from a random number generator (with nonce), would the resulting SHA256 hash be as random as the inputted number? And If I used the first 5 hex characters, and then used the ...
John T's user avatar
  • 477
16 votes
4 answers
4k views

Is there a way to use bcrypt with passwords longer than 72 bytes securely?

From my understanding BCrypt truncates the password to 72 bytes. If a password is longer than 72 bytes, what is a way to store that password using bcrypt securely without compromising it? Or is this ...
thames's user avatar
  • 263
13 votes
1 answer
11k views

Is there any benefit from using SHA-512 over SHA-256 when AES just truncates it anyway?

I am still not very clear on how AES-256-CBC can use SHA-512 bit keys, but I assume that it just truncates the 512bit hash down to 256bit. In software like GnuPG and OpenPGP, is there any real benefit ...
user4191887's user avatar
12 votes
3 answers
4k views

Is deriving the IV from the password secure?

I came across an encryption scheme to encrypt files with AES-256. You can see the initialization of the decryption routine below: ...
Jonas's user avatar
  • 223
12 votes
1 answer
512 views

Does SHA-512 leak info about SHA-256?

Does the SHA-512 value of an input leak any information about the SHA-256 value of that same input? Specifically, if I'm using SHA-512 to derive encryption and HMAC keys from a 256 bit ECDH shared ...
user avatar
11 votes
4 answers
4k views

Why is SHA-512 limited to an input of $2^{128}$ bits?

Both SHA-384 and SHA-512 are limited to an input size of less than $2^{128}$ bits. Considering SHA-512 has a higher output size, couldn't it include more input data?
w0f's user avatar
  • 213
10 votes
2 answers
837 views

Which attacks are prevented by the different initial hash values for SHA-2 with truncated output?

NIST specified SHA-2 hash functions with truncated output. Those hashes use different initialization values than SHA-256 or SHA-512. SHA-224 is based on SHA-256. SHA-384, SHA-512/224 and SHA-512/256 ...
Maarten Bodewes's user avatar
  • 92.6k
8 votes
2 answers
2k views

SHA-512 - How difficult is it to find a hash digest beginning with at least twelve zeros?

I know it's possible to find a hash value with multiple zeroes in it, I know of some BitCoin hashes with it, but how difficult is it to find/create a hash digest with 12 or more leading hex zeroes in ...
sha512guest's user avatar
8 votes
1 answer
3k views

Does salt size affect password hash security?

I use PBKDF2-SHA512 with an iteration count of 128,000 to hash my passwords. I use a CSPRNG to generate a salt per password. However, I am unsure about the ideal size of the salt. I have read a lot of ...
Pascal Bergeron's user avatar
7 votes
2 answers
3k views

Why SHA-512/256 when we already have SHA-384?

Both of them are just SHA-512 with different IV's and truncation. What's the point of having 2 of them? (Actually we have 3 of them as SHA-512/224 is the exact same thing.)
hanshenrik's user avatar
7 votes
1 answer
2k views

Significance of rotation constants in SHA-512?

In a single round of SHA-512, in the operations $\Sigma_0(A)$, $\Sigma_1(E)$ why are the constants $28$, $34$, and $39$ used for the number of rotations? What significance do these numbers have? What ...
user avatar
6 votes
2 answers
4k views

Why might SHA-384 throughput be lower than SHA-512 throughput in hashcat and more secure?

I found a hashcat benchmark results in the internet: hashcat results: SHA-384 is 17065.4 MH/s SHA-512 is 17280.3 MH/s Why does SHA-512 take less time? SHA-512 is longer and I thought it therefore ...
sluge's user avatar
  • 197
6 votes
5 answers
18k views

Would it be possible to generate the original data from a SHA-512 checksum?

So, I have a file that is XY Exabytes big. I create a SHA-512 hash from it. Are there any theoretical chances that I can retrieve the original data just from the sha512 hash? Also, are there any ...
gasko peter's user avatar
6 votes
1 answer
22k views

Benchmark differences between SHA-512 and bcrypt

So I recently made a benchmark SHA-512 vs bcrypt with hashcat CUDA. Here are the results : ...
Richard R. Matthews's user avatar
6 votes
1 answer
4k views

Transforming SHA-512 into SHA-512/256?

Based on my skimming over FIPS 180-4 it looks like the only difference between SHA-512 and SHA-512/256 is the initial hash value and the fact that the final output is truncated to 256 bits. My ...
neubert's user avatar
  • 2,927
6 votes
1 answer
2k views

How does the HOTP dynamic truncation function generalize to longer hashes?

HOTP, the HMAC-based One-Time Password algorithm from RFC 4226, uses a "dynamic truncation" function to turn the 20 byte HMAC-SHA-1 value into a 31 bit string. The dynamic truncation (from Section 5.3)...
otus's user avatar
  • 32.1k
5 votes
2 answers
32k views

What is the length field in SHA-512 padding?

If I am using SHA-512 on a message and need to determine the padding field and length field, how do I determine the length field? I think I understand the padding, but not the length field. For ...
Jesse's user avatar
  • 415
5 votes
1 answer
821 views

EdDSA Signature Algorithm - hash of secret key

Why does EdDSA use the (SHA-512) hash of the secret key as the exponent for the public key rather than using the secret key value directly? This seems inefficient, and I can't see how it adds any ...
geoff_h's user avatar
  • 337
4 votes
2 answers
822 views

Is it possible to generate an infinite number of collisions given an infinite amount of strings?

Let us assume that we have a string $w$ such that it belongs the set $C$, where every member of $C$ is not null, and contains every string of characters that can be permuted (numbers, letters etc.). ...
user avatar
4 votes
2 answers
1k views

Does a Vigenère cipher with SHA-512 and a little foresight turn into a one-time pad? How safe can it be?

I'm doing some exercises. Of course, I have read about the weaknesses of the Vigenère cipher because it repeats the key. But what if I use a different hash every time? The hash of the "key + an ...
nicanz's user avatar
  • 141
4 votes
2 answers
645 views

What is the purpose of placing the most significant byte first?

When the SHA algorithm states "A block of 128 bits is appended to the message. This block is treated as an unsigned 128-bit integer (most significant byte first) [emphasis added] and contains the ...
Anton Rasmussen's user avatar
4 votes
2 answers
556 views

Does combining multiple PBKDF2 keys result higher iteration count when using same password but different salts?

I did some experimenting with web subtle crypto. I derived a key using PBKDF2 with SHA-512 and 100 000 iterations and timed it. Doing same with 200 000 rounds doubled the time as expected. Then I did ...
Puruporo's user avatar
4 votes
1 answer
274 views

What is SHA-512's input space, taking into account variable message size?

The SHA-512 hash function accepts any message from a single bit to $2^{128}$ bits. Because the function takes into account the message length, I can't just represent every message as a $2^{128}$-bit ...
forest's user avatar
  • 15.2k
4 votes
1 answer
180 views

Is it possible to work out the hash using length extension attack but with different hashes type?

For example, I have: Unknown: A secret variable, lets call it secret, that is unknown to me Known: The length of secret, (lets ...
Joe Tannoury's user avatar
4 votes
1 answer
2k views

Worth taking performance hit of HMAC to gain additional security?

It seems like SHA-512 truncated to 256 bits is usable as a MAC [1]. The advantage is that it's ~50% faster than HMAC-SHA-256 on 64-bit CPUs and ~50% faster than HMAC-SHA-512 on short inputs. (My use ...
Kannan Goundan's user avatar
4 votes
2 answers
9k views

SHA512withRSA - Looking for details about the Signature Algorithm

I am trying to find information about the Signature Algorithm SHA512withRSA and have been unsuccessful so far. In the current state, the signature is too long, so I would like to check the code for ...
KrNeki's user avatar
  • 97
3 votes
1 answer
4k views

Why are these specific values used to initialise the hash buffer in SHA-512?

I'm reading the book Network Security Essentials written by William Stallings. To create a message digest with SHA-512, we have to go through some steps: append padding bits. append length ...
Ravindra Bagale's user avatar
3 votes
2 answers
3k views

Combine two sha512 hashes to a single hash

Assume I have two data fragments: $Frag_1$ and $Frag_2$. I can build sha512 hashes the usual way with $SHA512(Frag_1)$ and $SHA512(Frag_2)$ and then hash the two fragments appended to each other: $$...
Cybran's user avatar
  • 183
3 votes
2 answers
23k views

Is it possible to break SHA-512?

Is it possible to break the SHA-512 hash algorithm? Are there any successful attacks out there?
Martin's user avatar
  • 63
3 votes
2 answers
4k views

521-bit ECC keys are the same strength as RSA 15,360-bit keys

521 bit ECC uses key sizes 7.5 times smaller than the RSA standard while offering encryption that is magnitudes more secure. An RSA 2048-bit key's secure enough for banking, but a 521-bit ECC key is ...
djuture's user avatar
  • 31
3 votes
2 answers
1k views

PBKDF2 with SHA-256/512 for low entropy input?

Is there any reason to use something stronger than SHA-1 with PBKDF2 if my input is fairly low entropy? I.e. if the passwords being hashed are only about 30-bits of entropy. I can't find it now, ...
AaronLS's user avatar
  • 133
3 votes
2 answers
281 views

What is the proof that a hash output contains random binary numbers

I have heard quotes by many that a SHA-512 hash output is random. Does anyone know what method was used to come to this conclusion? If it is not randomized, how could that be shown?
Jon Hutton's user avatar
3 votes
2 answers
3k views

Using bcrypt derived keys for encryption?

Sorry for this ignorant question but I am currently weighing up the advantages and disadvantages of BCrypt over PBKDF2 and from what I have read BCrypt is considered more secure but from what I have ...
HighAsAKite's user avatar
3 votes
1 answer
2k views

estimate of time required to crack sha512crypt password with JtR + OpenCL

OK, I have a shadow file with a password that I know, it is 4 letters followed by two numbers. Using John The Ripper with OpenCL support, on a laptop with AMD Radeon Mobility graphics, how long would ...
BenjiWiebe's user avatar
3 votes
1 answer
192 views

Entropy extraction from a Zener diode TRNG

My project is to build a true random number generator that relies on the avalanche effect in a Zener diode. This for a messaging device that uses one-time-pad encryption. Reading about similar ...
Björn Morén's user avatar
3 votes
1 answer
593 views

Why is SHA2 used for file verification if it's susceptible to length extension attacks?

Am I misunderstanding length extension attacks, or is there some different reason, or is it really a bad idea to use SHA2 for file verification? If the answer is that it's really a bad idea, would ...
ispiro's user avatar
  • 2,005
3 votes
1 answer
2k views

Standard hash function of Linux

So I went through my /etc/shadow file in Linux and discovered that my passwords were stored in SHA-512-based crypt ('sha512crypt') mode, so SHA-512. But why? I mean ...
Richard R. Matthews's user avatar
3 votes
1 answer
892 views

Change initial hash value of SHA-512/$t$

Fips 180-4 defines under 5.3.6 how to calculate initial hash values for SHA512/$t$ for a given value $t$. Can someone explain me how the t actually affects the outcome of the procedure (which, as far ...
s.k.'s user avatar
  • 33
3 votes
1 answer
341 views

Given a sha-512 hash of a value picked at random from the $2^{128}$ key space, how hard would it be to recover the original value?

More specifically is it reasonable to assume that someone with the resources of a state actor can feasibly compute a rainbow table of all the sha-512 hashes of values within the $2^{128}$ key space? ...
elemetrics's user avatar
3 votes
1 answer
1k views

Padding password before SHA-512 hashing to avoid info leak via timing

I've noticed that SHA-512 password hashing leaks some information about the password length. There's a weak correlation between password length and time to hash. It's roughly linear, but in steps of ...
Tom Zych's user avatar
  • 328
2 votes
1 answer
3k views

Are there ANY text strings that will generate the same SHA-512 Hash output? [duplicate]

Are there ANY text strings that will generate the same SHA-512 Hash output? Please provide an example, and how you came to that conclusion. I've tried thousands of variations, including ".." vs. "." ...
synicalsyntax's user avatar
2 votes
3 answers
8k views

19 out of 24 words of BIP39 passphrase (brute-force last 5?)

I have managed to lose 5 words of my 24 word Ledger Nano S recovery phrase. I have words 1-19 but I am missing words 20-24. I have significant holdings on the wallet so would very much like to recover ...
JGoodwin10's user avatar
2 votes
2 answers
3k views

HMAC-SHA-512 output randomness?

This is regarding an online roulette game that claims to be fair. Here is the explanation: Two strings are created: STRING1 = "[NONCE]:[SERVER SEED]:[NONCE]" STRING2 = "[NONCE]:[CLIENT ...
user61363's user avatar
2 votes
3 answers
720 views

How much original entropy is lost if a part of the hash is known?

You have an entropy source of n bits You hash it with SHA-512 for example k bits of the SHA-512 output are publicly revealed, ...
cryptonoob400's user avatar
2 votes
2 answers
689 views

How secure is the password from the hash sum (SHA-512) of a long sentence

If I convert a long sentence (>50 characters) to c and use the result (128 hex characters) as a password, how secure is it?
NewLinux's user avatar
  • 121
2 votes
1 answer
2k views

Using a SHA512 hash to encrypt data

How can I judge the level of security with the following algorithm: I create a 64 byte hash using SHA512 via some input. I use this hash to iterate over the plaintext, byte by byte, and similarly ...
Ron's user avatar
  • 121