Hot answers tagged

4

As I have a new hash every 3 second, it's easy for everyone to collect a big numbers of hash. And as the difference between every UUID is always 3000 ms, maybe this could make it easier for the hacker to crack the key. You might be reassured to read up on the security requirements that MACs are designed for. Chapter 9 of the Handbook of Applied ...


3

There is work underway to specify KMAC. It's basically just SHA-3, but with a length specification for the key and a special value to indicate that this is KMAC instead of hashing. These constructions are required to make sure that there are no unfortunate collisions with previously hashed data or - more importantly - key / message pairs where $H(K_1,M_1) = ...


3

HMAC-SHA256 is extremely safe. In the question's use, the key is large (48 characters, likely >160 bits of entropy). From a theoretical standpoint, everything checks. HMAC is demonstrably resistant (to 128-bit level) even if an adversary can obtain the MAC of chosen messages, under weak hypothesis for SHA-256 (see M. Bellare: New Proofs for NMAC and HMAC: ...


1

The commit that added this double HMAC only says it improves "valid MAC detection", but it simultaneously adds the constant-time comparison, so likely the reason is indeed defense against timing attacks: Improve valid MAC detection Implement constant time string comparison as well as double HMAC verification for encryption MACs. Double HMAC is a ...



Only top voted, non community-wiki answers of a minimum length are eligible