Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 4557

A cryptographic hash algorithm is a function which takes a variable size input and produces a fixed size output. The algorithm makes it difficult to find two inputs with the same output or reconstruct the input from the output.

4 votes

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

Your wording is important: "retrieve the original data just from the sha512 hash" - the answer to that (strictly speaking) is no. … The best you can do is to try hashing a given number of possible byte-combinations (eg, the contents of the file) until you find an output that matches your original hash. …
hunter's user avatar
  • 4,007
3 votes

Do sites store login password with hash? If so, can people can use hash collision to log in?

Best practice is to use a slow hashing function like PBKDF2 or Scrypt as brute-forcing the hash of a typical password is trivial. The resulting hash is stored in the database. … When a user logs in, their password is fed through the aforementioned function and the output compared with the hash stored in the database. …
hunter's user avatar
  • 4,007
3 votes
Accepted

Capital passphrases with rainbow tables?

To store the full hash of the many permutations of billions of inputs is expensive. … Note that using a slow hash and salt will render rainbow tables ineffective. …
hunter's user avatar
  • 4,007
29 votes

What is the difference between a HMAC and a hash of data?

Put simply, if you're using a simple hash of a file to guarantee file-integrity, then an attacker could modify the file, re-calculate the hash of the modified file, and replace the old hash with the modified … With a HMAC, a key is used when calculating the hash value, so unless the attacker has the key, they're unable to calculate a valid hash value of the modified data. …
hunter's user avatar
  • 4,007
5 votes
Accepted

Could a very long password theoretically eliminate the need for a slow hash?

Having such a long password would make a slow-hash redundant. With the case of a 43-character password, I doubt that rainbow tables would be issue either. …
hunter's user avatar
  • 4,007
2 votes

scrypt and bcrypt for benefits of both?

I would advise against this. When implementing slow-hashing (such as bcrypt or scrypt), it's usually recommended to select as high a work-factor as is tolerable (in relation to how much time the user …
hunter's user avatar
  • 4,007
2 votes

What is the difference between authenticating and signing a document?

You sign a document with a signature. You authenticate a signature (thus proving the authenticity of the document).
hunter's user avatar
  • 4,007
2 votes

Use of PBKDF2 when no access to HKDF?

If you are going to generate a MasterKey with a CSPRNG, and securely store/retrieve it when encrypting/decrypting, I see no need for a key derivation function of any kind. I suggest you just use the k …
hunter's user avatar
  • 4,007
1 vote

RSA digital signature vs authenticated cipher

Just a note regarding your terminology, I'm not aware that you can specify the hash algorithm (ie, AES-GCM-SHA256) for GCM mode, but I may be wrong. … I guess the advantage is that you can specify your own hash algorithm (such as SHA512, Keccak, or whatever), which may be advantageous if you're ultra-paranoid about security. …
hunter's user avatar
  • 4,007
5 votes

Using one-way hash functions as the encryption method

"Frequency analysis of the output might help determine simple words in the ciphertext such as 'the' etc if that word is repeated and sent multiple times. This isn't necessarily a problem as it' …
hunter's user avatar
  • 4,007
2 votes

How can mega store my login details and still be secure?

Here's a possible scenario: 1) Your password is put through a slow KDF such as Scrypt. The output of Scrypt can be configured to take a long time to calculate, and as such, can mitigate the risk of …
hunter's user avatar
  • 4,007