Tag Info

New answers tagged

3

As with any question of "is X secure" the answer will, to some extent, be "that depends on your exact requirements from a security standpoint, the threats you face, the type of application and the environment that you'll deploy in" However with that caveat out of the way, I'd say that the scheme outlined above sounds relatively reasonable from a security ...


2

Obligatory disclaimer: If at all possible, don't implement your own crypto. Verifying the validity of the decrypted file first and then decrypting it regardless of whether the MAC matches is the most secure way of doing this. After this, make sure that if any error occurs the same kind of error is always returned. Disclosing any information on the reason ...


0

The server should never even attempt to decrypt the message. If the HMAC keys are different between the server and the client, the authentication should fail (the server won't be able to create the same MAC from the ciphertext and the server key, since the server key is not the same as the client key, and the process should abort. Now, if you're doing ...


3

I created the Node Scrypt module. HMAC adds additional security. Using it also lends the scheme to be used as a header in an encrypted file format (like it is done in tarsnap) and not just in an authentication server's database. Also, Colin Percival (who created scrypt) uses this scheme to verify (I actually just copied it from him). To explain why HMAC is ...


2

Key stretching basically gives a key with low entropy more strength, by deriving a hash from it created by multiple iterations. A 64 character hex string, assuming it is completely randomly generated will have 256 bits of entropy. When authenticating a string with a HMAC, anything 128 bits or greater is considered "unbreakable". Key stretching mitigates ...



Top 50 recent answers are included