4 ms·
> Actually I use HMAC-SHA512 with key sizes between 1024-Bit to 2048-Bit. This is utterly pointless security theater. You don't just get more security by rubbi
by lvh 10y ago
> Actually I use HMAC-SHA512 with key sizes between 1024-Bit to 2048-Bit.
This is utterly pointless security theater. You don't just get more security by rubbing bigger key sizes on it. The key goes through the hash function (twice, in HMAC; once via ipad, once via opad); the HMAC standard defines keys larger than the hash function's block size to go through the hash function first. With good reason, HMAC recommends key sizes to be equal to the hash function's output length; that's 16 bytes (128 bits) for MD5, and 20 bytes (160 bits) for SHA-1.
Relatedly: GCM supports large nonces, but I don't understand why you would ever use anything other than a 96 bit one. (Larger nonces go through GHASH.)