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

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.

2
votes
1answer
88 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 ...
1
vote
1answer
59 views

Strength of Sha512Ctr PRNG

What is the cryptographic strength of sha512ctr when I simply concatenate a counter and 64 bytes from a cryptographic random number generator (in this case RNGCryptoServiceProvider from .net), and ...
9
votes
4answers
931 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?
2
votes
1answer
60 views

Calculate new hash from old hash + appended string

If I have a hash of some string in the form: hash(UNK + "known"), Is there a way to calculate the hash of (UNK + "known" + "append"), given the hash of the original value? Specifically I'm asking ...
-2
votes
4answers
186 views

Size of A Hashed String Using SHA-512

When hashing a messages of size of n, does the SHA2 algorithm always produce the same sized hashed value? The reason I am asking is that I am building an OAuth 2.0 ...
0
votes
1answer
63 views

How long would it take to crack a double hash if salt and final hash are public?

I have a hash of a file $H_1$ and then I add salt and rehash it: $H_2$. I make my $H_2$ and salt public and I use my $H_1$ as a password. How long would it take for this to be cracked with someone ...
-1
votes
1answer
607 views

Decrypting SHA512

I was recently solving a CTF problem and it involved a shadow and passwd file. I got to know the username easily but I am unable to find the password since it is SHA512 hashed. My doubt is that when I ...
0
votes
1answer
82 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
218 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 Site-To-Site transmission ...
2
votes
1answer
193 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
173 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
94 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
396 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
131 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
343 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 ...
3
votes
2answers
126 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.). ...
25
votes
4answers
14k 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
135 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
679 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
500 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
237 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
183 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
4k 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
249 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
339 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
79 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
503 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
592 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
600 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
111 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
465 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 ...
4
votes
1answer
3k 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
378 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
181 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
87 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
236 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 ...
1
vote
1answer
227 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
157 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
411 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
341 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
115 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
244 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
272 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
6k 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
155 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 ...
4
votes
2answers
859 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
40 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
79 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
490 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 ...