Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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

0
votes
1answer
35 views

Hashing user password without database to store salt

I am building an Android app that will run purely locally on the user's device, no servers. It has a database that I want to encrypt with the user's password, which requires a 64 byte key. I've ...
0
votes
1answer
82 views

Hash-Then-Encrypt or Encrypt-the-Hash?

My question is would it make any difference if I use SHA3 and hash a block of data and then encrypt it using RSA is most secure to do the reverse? The question is about Sit-To-Site Transmission where ...
2
votes
1answer
67 views

HMAC-SHA512 output randomness?

This is regarding an online roulette game that claims to be fair. Here is the explanation: Two strings are created: ...
-2
votes
2answers
108 views

VeraCrypt a weak point [closed]

Biggest flaw in VeraCrypt(or other Encryption programs) is Hash Algorithm. VeraCrypt hashes (SHA,Whirlpool,Streebog) it is the only point where can break an encrypted disk. Because break algorithm (...
2
votes
1answer
83 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 ...
8
votes
2answers
382 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 ...
0
votes
1answer
79 views

Which algorithm should be used to replace SHA512withRSA? [closed]

We are working on the web application that is basically generating a self-signed certificate during the installation. It's a Java based app and for generation of the certificate we are using ...
0
votes
0answers
132 views

Security of custom JSON-Object hash

I am currently implementing a signed JSON-Blob, and thus i need to create a hash of any JSON-Object possible. Currently for the hash of the JSON-Object i ended up with the following Java-Code using ...
2
votes
2answers
72 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.). ...
23
votes
4answers
10k 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-...
1
vote
1answer
103 views

Safety of having many passwords hashed with the same salt?

I'm working on a web application where passwords must be hashed on the client before it can be send to the server. This is because the user's raw password is used for cryptography purposes and can't ...
0
votes
1answer
295 views

How long will brute force of salted SHA-512 hash will take, if salt is known and possible characters in password are known?

Suppose I know that the password is composed of characters [A-Za-z0-9], length is unknown, but maybe less than 8. If I have information about the salt use to perform hashing, and also hashing ...
0
votes
4answers
352 views

I think PBKDF2 may be better than Scrypt? Looking for someone to point out my logical error

People seem to mostly recommend scrypt these days, but I'm not sure if this should be the case? I'll structure this post by just making an argument for PBKDF2 over Scrypt and then you can reply ...
1
vote
1answer
173 views

HMACSHA256 2.5 times faster than HMACSHA512

According to the answers to a previous question, the 512 version should be faster on x64 devices. And even if it were executed on an x86 (32 bit) device - there shouldn't be such a big difference. ...
1
vote
1answer
133 views

Hash function composition - security level

When using two hash functions, g(x)=SHA-512 and f(x)=MD5 g(x) has 512 bit output (using salt) f(x) has 128 bit output. Let's say that z(x)=f(g(x)) meaning the output is 128 bit long. The Question: ...
-1
votes
2answers
1k 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?
0
votes
3answers
169 views

What is the probability of a SHA-512 hash containing both digits (0-9) and alphabets (a-f) all the time?

Quite curious to know if ever a SHA-512 hash will contain only digits or only alphabets. Thanks in advance.
-3
votes
1answer
284 views

simple encrypt/decrypt [closed]

I would like to encrypt a file by XORing the source message with a prng of my own. The prng is streaming a flow of sha512 hashes. Each hash is produced from the previous hash plus constant string plus ...
1
vote
2answers
67 views

Is there an advantage to “weak” hashing and stretching over strong hashing?

Is there any sort of practical advantage to using a stretching algorithm such as PBKDF2 on say SHA256 over a straight SHA512 hash? If the purpose of key stretching is to increase the length and ...
-4
votes
1answer
418 views

Would Hashing A Password In Sha512 Using JavaScript Be Secure?

I've created a competition for a few friends of mine that wanted to learn the basics of penetration testing. In said competition, there is one section in which there's a log file you need to check out ...
0
votes
2answers
438 views

How different is SHA512/224 when compared with SHA512?

From http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf Nist document what i understood is while implementing SHA512 and SHA512/224 the two differences are the Initial hash value and the final ...
3
votes
1answer
458 views

Standard hash function of Linux

So I went through my /etc/shadow file in Linux and dicoverd that my passwords were store in $6 mode so Sha512 . But why ? I mean sha512 is not even a secure Password hashing function . Why not bcrypt ...
1
vote
2answers
102 views

Can a attacker compute a hash from another hash of the same plaintext (both using different salt)?

Imagine two PBKDF2-SHA-512 hashes of the same password are generated. Each has individual salt. If an attacker had one hash and the salt of both hashes, would he be able to compute the missing hash or ...
0
votes
1answer
344 views

Securing http session id's by appending HMAC hash?

First, I apologize if this question is off topic as defined here. If so, please let me know and I'll close it. I'm building a sessions middleware for an http service and thought it might be a good ...
3
votes
1answer
2k 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 : ...
1
vote
1answer
285 views

Is key derivation of a token shared secret necessary for usage of token in TOTP as specified by RF6238?

TL;DR: Is it necessary to generate a 'random' key from a shared token secret string before putting it into a TOTP algorithm that follows the RFC 6238 specification? Or is it okay for me to put the ...
3
votes
1answer
150 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? ...
0
votes
1answer
82 views

Using simple hashing function to expand already secure key

Assume I only have only three algorithms available at my disposable: PBKDF2, SHA512, and HMAC-SHA256. (This means I do not have algorithms like HMAC-Expand available.) Assume I also have a ...
2
votes
0answers
166 views

Need help to get correct TOTP [closed]

I am really confused and need help on this problem related to TOTP as specified in RFC6238 here: https://tools.ietf.org/html/rfc6238#section-1.2. So I am now given a task to implement the RFC6238 to ...
0
votes
1answer
195 views

Wikipedia pseudo code is unclear about how to pad SHA-512

In Wikipedia pseudo code of SHA-512 the padding section says pad 1 bit then 0 bits. It then goes on to say append length without 1 or 0 padding. What does that mean? https://en.wikipedia.org/wiki/SHA-...
4
votes
2answers
135 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 ...
-5
votes
1answer
356 views

Why does SHA512 start with “1”?

I just used this hashed = str(bin(int(hashlib.sha512(input1).hexdigest(), 16))[2:]) and then just see that the first bit is always 1 I have noticed quite an ...
2
votes
3answers
284 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, ...
4
votes
1answer
106 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 ...
30
votes
3answers
4k 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 ...
0
votes
1answer
170 views

Secret key out of sha-512

This is a setup to produce a secret key for symmetrical encryption with TweetNaCl: 1) K1 consists of 32 random bytes 2) K2 consists of 32 random bytes (By "random" I mean "obtained from /dev/...
11
votes
1answer
243 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 ...
13
votes
1answer
5k 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 ...
1
vote
1answer
141 views

how to calculate surge of cpu cycles consumption of an ipsec tunnel with aes256/sha512/dhgroup21?

The project I'm involved with needs to establish around 2500 simultaneous ipsec connections between roadwarriors clients and the ipsec concentrator/gateway. In order to be able to estimate the ...
5
votes
2answers
832 views

Vigenère cipher with sha512 and a little foresight turns to one-time pad. How safe can be?

I'm doing some exercises and of course I have read about the weaknesses of Vigenère cipher because it repeats the key. But what if I use a different hash every time? The hash of the "key + an ...
0
votes
0answers
39 views

Is it safe ? Hash based encryption [duplicate]

I was thinking about a very simple way to cript .txt file content in python. I decided to use this method : Enter a passphrase Hash it Make a XOR between the caracter value of the first char in the ....
1
vote
0answers
75 views

SHA-2 attempts for a loop [duplicate]

Say I am hashing hashes (taking the hash of a previous hash) for an endless amount of time. How many times would it take, on average, to fall into a loop when using SHA-2 (more specifically SHA-256 ...
3
votes
1answer
437 views

Change initial hash value of SHA512/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 as I ...
4
votes
1answer
510 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 ...
6
votes
1answer
922 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 ...
2
votes
1answer
1k 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 ...
2
votes
1answer
1k 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. "." ...
3
votes
2answers
1k 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: $$...
2
votes
1answer
674 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)...
46
votes
4answers
37k views

SHA512 faster than SHA256?

I'm getting this strange result that SHA512 is around 50% faster than SHA256. I'm using .net's SHA512Managed and SHA256Managed ...