indcpa library

Functions

indcpadec(Uint8List m, Uint8List c, Uint8List sk) → void
Decapsulates a ciphertext to recover the original message using the secret key.
indcpaenc(Uint8List c, Uint8List m, Uint8List pk, Uint8List coins) → void
Encapsulates a shared secret m using public key pk and coins. c must be a pre-allocated array of at least length KYBER_POLYVECCOMPRESSEDBYTES + KYBER_POLYCOMPRESSEDBYTES.
indcpakeypair(Uint8List pk, Uint8List sk) → void
Generates an IND-CPA keypair.