Constructors

Link copied to clipboard
constructor(kemId: Int, kdf: HPKE.KDF, dhGroup: ECCurve)

Properties

Link copied to clipboard
open override val kdf: HPKE.KDF
Link copied to clipboard
open override val kemId: Int

RFC 9180 kem_id

Link copied to clipboard
open override val Nenc: BitLength

The length in bytes of an encapsulated key produced by this KEM.

Link copied to clipboard
open override val Npk: BitLength

The length in bytes of an encoded public key for this KEM.

Link copied to clipboard
open override val Nsecret: BitLength

The length in bytes of a KEM shared secret produced by this KEM.

Link copied to clipboard
open override val Nsk: BitLength

The length in bytes of an encoded private key for this KEM.

Link copied to clipboard
open override val suiteId: ByteArray

RFC 9180 suite_id

Functions

Link copied to clipboard

Same as Decap, and the recipient is assured that the KEM shared secret was generated by the holder of the private key skS.

Link copied to clipboard

Same as Encap, and the outputs encode an assurance that the KEM shared secret was generated by the holder of the private key skS.

Link copied to clipboard

Deterministic algorithm using the private key skR to recover the ephemeral symmetric key (the KEM shared secret) from its encapsulated representation enc. This function can raise a DecapError on decapsulation failure.

Link copied to clipboard

Deterministic algorithm to derive a key pair (skX, pkX) from the byte string ikm, where ikm SHOULD have at least Nsk bytes of entropy.

Link copied to clipboard

Parse a byte string of length Nsk to recover a private key. This function can raise a DeserializeError error upon skXm deserialization failure.

Link copied to clipboard

Parse a byte string of length Npk to recover a public key. This function can raise a DeserializeError error upon pkXm deserialization failure.

Link copied to clipboard
open override fun Encap(pkR: KeyAgreementPublicValue.ECDH, ikm: ByteArray? = null): HPKE.EncapResult

Randomized algorithm to generate an ephemeral, fixed-length symmetric key (the KEM shared secret) and a fixed-length encapsulation of that key that can be decapsulated by the holder of the private key corresponding to pkR. This function can raise an EncapError on encapsulation failure.

Link copied to clipboard

Randomized algorithm to generate a key pair (skX, pkX).

Link copied to clipboard

Produce a byte string of length Nsk encoding the private key skX.

Link copied to clipboard

Produce a byte string of length Npk encoding the public key pkX.