Frank Denis 84b89d7cfe
crypto.hmac: set the recommended key size to the block size (#15031)
HMAC supports arbitrary key sizes, and there are no practical reasons
to use more than 256 bit keys.

It still makes sense to match the security level, though, especially
since a distinction between the block size and the key size can be
confusing.

Using HMAC.key_size instead of HMAC.mac_size caused our TLS
implementation to compute wrong shared secrets when SHA-384 was
used. So, fix it directly in `crypto.hmac` in order to prevent
other misuses.
2023-03-22 06:17:52 +00:00
..
2023-01-31 15:09:35 -07:00
2023-01-31 15:09:35 -07:00
2023-01-02 19:18:33 -05:00
2022-08-04 18:02:01 -07:00
2022-08-04 18:09:10 -07:00
2023-02-04 15:19:53 -05:00
2022-11-04 00:09:27 +03:30