File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -169,10 +169,12 @@ def fullname(self, implementation):
169169# There is currently no OpenSSL one-shot named function and there will likely
170170# be none in the future.
171171_EXPLICIT_HMAC_CONSTRUCTORS = {
172- hid : None if hid .is_xof else f"_hmac.compute_{ hid !s} "
173- # names slightly differ for keyed hash functions
174- for hid in HID if not hid .is_keyed
172+ HID (name ): f"_hmac.compute_{ name } "
173+ for name in CANONICAL_DIGEST_NAMES
175174}
175+ # Neither HACL* nor OpenSSL supports HMAC over XOFs.
176+ _EXPLICIT_HMAC_CONSTRUCTORS [HID .shake_128 ] = None
177+ _EXPLICIT_HMAC_CONSTRUCTORS [HID .shake_256 ] = None
176178# Strictly speaking, HMAC-BLAKE is meaningless as BLAKE2 is already a
177179# keyed hash function. However, as it's exposed by HACL*, we test it.
178180_EXPLICIT_HMAC_CONSTRUCTORS [HID .blake2s ] = "_hmac.compute_blake2s_32"
You can’t perform that action at this time.
0 commit comments