decapsulate

open suspend override fun decapsulate(privateKey: PrivateKey, ciphertext: ByteArray): ByteArray(source)

ML-KEM.Decaps (FIPS 203 Algorithm 21). A ciphertext that was tampered with yields a different, pseudorandom secret rather than an error (implicit rejection), so the failure surfaces when the derived keys are used.

Throws

when ciphertext has the wrong length or the key fails the checks of FIPS 203 §7.3.