DHKEM
data class DHKEM(val kemId: Int, val kdf: HPKE.KDF, dhGroup: ECCurve) : HPKE.KEM<KeyAgreementPublicValue.ECDH, KeyAgreementPrivateValue.ECDH> , HPKE.KEM.WithAuthEncapDecap<KeyAgreementPublicValue.ECDH, KeyAgreementPrivateValue.ECDH> , HPKE.KEM.WithSerializablePrivateKey<KeyAgreementPublicValue.ECDH, KeyAgreementPrivateValue.ECDH> , SuiteKDFContext(source)
Constructors
Functions
Link copied to clipboard
open override fun AuthDecap(enc: ByteArray, skR: KeyAgreementPrivateValue.ECDH, pkS: KeyAgreementPublicValue.ECDH): ByteArray
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
open override fun AuthEncap(pkR: KeyAgreementPublicValue.ECDH, skS: KeyAgreementPrivateValue.ECDH, ikm: ByteArray? = null): HPKE.EncapResult
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
Link copied to clipboard
open override fun DeriveKeyPair(ikm: ByteArray): HPKE.KeyPair<KeyAgreementPrivateValue.ECDH, KeyAgreementPublicValue.ECDH>
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
Link copied to clipboard
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
open override fun GenerateKeyPair(): HPKE.KeyPair<KeyAgreementPrivateValue.ECDH, KeyAgreementPublicValue.ECDH>
Randomized algorithm to generate a key pair (skX, pkX).
Link copied to clipboard
Link copied to clipboard