New answers tagged

-2

+-------------+------+-----------+ | Name | Bits | Truncates | +-------------+------+-----------+ | SHA-224 | 224 | SHA-256 | +-------------+------+-----------+ | SHA-256 | 256 | (none) | +-------------+------+-----------+ | SHA-384 | 384 | SHA-512 | +-------------+------+-----------+ | SHA-512 | 512 | (none) | +----------...


3

Using SHA-256 or SHA-512 as a substitute for a proper purposefully-slow password-hash is broken for shortish (10-12 character) passwords. Try it with the SHA-256 of test123456 encoded per UTF-8. Even Google finds it! Rainbow tables allow a relatively compact yet efficiently searchable storage of the precomputations. That way of using a hash is just a bad use ...


5

SHA-256 and SHA-512 were designed to be very fast. Their primary goal ist to verify the integrity of long messages or files. Long means not 10-12 bytes but some megabytes and greater. It is not a good idea, to use hash function that is fast by design for password hashing. Instead, for password hashing should be used functions that need essentially more ...


4

When we state that "SHA-256/SHA-512" hasn't been broken, what we mean is that the three security properties of hash functions haven't been violated. Those properties are: Preimage resistance; given a hash, value, it is hard to find a string that hashes to that value. Second preimage resistance; given a message, it is hard to find a second ...


1

Analysis of the C code is off-topic. It outputs a string of SALTSIZE=32 characters each obtained by indexing a string of 64 base-characters encoded in ASCII as a single byte. The indexes are obtained according to the low-order $4\times6$ bits of what seems to a pseudo-random 32-bit value produced by arc4random(). Thus the output is a 32-byte bytestring (not ...


Top 50 recent answers are included