Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You're right. HMAC keys, from the internal hash perspective, are always one block long. So if the key coming into HMAC is less than blocksize, it's zero padded to blocksize. And if the key coming into HMAC is length greater than blocksize, it's hashed down to blocksize. Obviously this does create collisions if the key ends with nulls and is less than 64 bytes, or if the attacker can specify keys.

None of this likely matters in practice.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: