Function hpke_kem::SerializePublicKey
source · [−]Expand description
Produce a byte string of length Npk
encoding the public key pkX
.
For P-256, P-384 and P-521, the SerializePublicKey()
function of the
KEM performs the uncompressed Elliptic-Curve-Point-to-Octet-String
conversion according to SECG. DeserializePublicKey()
performs the
uncompressed Octet-String-to-Elliptic-Curve-Point conversion.
For X25519 and X448, the SerializePublicKey()
and DeserializePublicKey()
functions are the identity function, since these curves already use
fixed-length byte strings for public keys.
Some deserialized public keys MUST be validated before they can be used.