-
Hello, I would like to understand why src/example/kyber.cpp uses "HKDF(SHA-512)" as the KDF. Should it not be SHAKE-256 as in the standard as specified in the submission? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
There are two layers here: Internally, Kyber uses SHAKE for various things (including key derivation), and SHA-3 for ordinary hashing. The specified KDF in the example ( Botan generally allows passing the output of any key agreement (or key encapsulation) mechanism through a KDF. Historically (e.g. for Diffie-Hellman) this was generally a good idea. For Kyber you don't have to do that anymore, but the library still allows you to do it for API consistency. |
Beta Was this translation helpful? Give feedback.
Perhaps you need to remove the
salt
from theencrypt()
anddecrypt()
calls? The following works for me: