Tag Info

New answers tagged

12

The SHA-2 family consists of multiple closely related hash functions. It is essentially a single algorithm in which a few minor parameters are different among the variants. The initial spec only covered 224, 256, 384 and 512 bit variants. The most significant difference between the variants is that some are 32 bit variants and some are 64 bit variants. In ...


39

Just to cite wikipedia: http://en.wikipedia.org/wiki/SHA-2: The SHA-2 family consists of six hash functions with digests (hash values) that are 224, 256, 384 or 512 bits: SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224, SHA-512/256. So yes, SHA-2 is a range of hash functions and includes SHA-256.


3

I think many of your questions (eg SHA-512 vs bcrypt) are answered in the guide linked to by AviD. But it doesn't actually say anything about PHP, so I'll answer that part. Hashing a Password in PHP5 It's good that you want to understand the underlying concepts, but actually securely hashing a password in PHP5 is quite easy: $hashedPassword = ...


6

This construct can (crudely) protect against a length extension attack, which in particular affects hashes built using the Merkle-Damgård construction (such as MD5, SHA-1, and the SHA-2 family). The gist of the attack is that an attacker who knows H(s || m) and m for a hash H, secret s, and message m can trivially forge a hash of the form H(s || m || p || ...


-1

I am going to base my answer on a couple of assumptions as below. The secret key is randomly generated or not easily guessable The secret key is just that, a secret. Using two private keys in this instance has no viable benefits to security, presuming that the key was never accessed by a third party (So you are looking at reverse cryptographic attacks). ...



Top 50 recent answers are included