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.
134 questions
4 votes
2 answers
1k views
Is SHA-512 in counter mode secure as stream cipher?
Is this cipher stream generator secure for simple XOR streaming cipher? ...
0 votes
1 answer
112 views
What exactly 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 ...
0 votes
0 answers
52 views
Why do I get the same first byte in the key when using PBKDF2-HMAC-SHA512 while generating a 64 byte key from two different passwords?
StackExchange, I was experimenting out some C++ code using OpenSSL libraries to generate a 64 byte key from a password using: PBKDF2 with HMAC and SHA512 to generate a 64 byte key, and I was a bit ...
4 votes
3 answers
377 views
Is the quality of hash function essential in HKDF?
Hash functions have a number of properties needed, including the property that no collisions must be able to be found. Generally, if we can find collisions for hash functions, we consider the hash ...
2 votes
3 answers
234 views
How to make a function which produces a hash of variable length?
I have been learning about OTP lately and I wondered, if I was to use it for encryption of a file (like a photo or even a video), I would need really looong key. Example program is simple: input is ...
1 vote
1 answer
274 views
Row level database encryption scheme
I am developing a row level database encryption scheme. Ideally I would not do this and instead rely on something vetted, but I haven't been able to find such a scheme online. My primary concerns are: ...
1 vote
2 answers
362 views
SHA-512 for ECDH key derivation
I'm currently working in a constrained environment and need to derive a symmetric key (that will be used for AES-256 in GCM mode later) based on a low-entropy shared secret obtained via X25519. To ...
3 votes
1 answer
943 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 ...
2 votes
2 answers
798 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?
1 vote
0 answers
493 views
Is it better to use PBKDF2 with SHA-512 and 1e6 iterations or SHA-256 and 6e6 iterations?
I'm implementing encryption in my browser extension that will allow users to encrypt their data and then share them with others. And since shared links can be leaked, I want to protect the data as ...
2 votes
1 answer
2k views
When using AES-256 in combination with HMAC-SHA, should we use SHA-256 or SHA-512?
When using AES-256 (cipher mode CBC and padding mode PKCS7) in combination with HMAC-SHA for authenticated encryption (assuming alternatives like TLS and AES-GCM cannot be used), should we use SHA-...
4 votes
2 answers
739 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 ...
1 vote
1 answer
685 views
HKDF-Expand max output length
I'm trying to use HKDF-Expand to derive lots of keying material (> 64GB) from a pseudo-random 512 bit key. Now according to the HKDF RFC, the maximum amount of ...
2 votes
1 answer
357 views
Create a control hash string from different sources, is there a difference, advantage or disadvantage in comparison when using this ways?
I wanna create from several inputs/sources should be formed into one hash value for controlling of different thinks later. Example: String + File String + String File + File String + File + String ...
-1 votes
1 answer
180 views
Is partial digest recognition possible?
TL;DR Does hashing a private key, then XOR[ing] the digest (twice recursively, with offset) on the secret have any glaring issues? Is partial digest recognition possible? Description User provides a ...