Class MLKEMIndCpa
java.lang.Object
org.bouncycastle.pqc.crypto.mlkem.MLKEMIndCpa
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voiddecrypt(byte[] secretKey, byte[] cipherText, byte[] m) (package private) byte[]encrypt(byte[] pk, int pkOff, byte[] msg, int msgOff, byte[] coins, int coinsOff) (package private) byte[][]generateKeyPair(byte[] d) Generates IndCpa Key Pair(package private) voidgenerateMatrixA(PolyVec[] aMatrix, byte[] seed, boolean transpose) (package private) byte[]packPublicKey(PolyVec publicKeyPolyVec, byte[] seed) (package private) byte[]packSecretKey(PolyVec secretKeyPolyVec) (package private) byte[]unpackPublicKey(PolyVec publicKeyPolyVec, byte[] pk, int pkOff) (package private) voidunpackSecretKey(PolyVec secretKeyPolyVec, byte[] secretKey)
-
Constructor Details
-
MLKEMIndCpa
MLKEMIndCpa(MLKEMEngine engine)
-
-
Method Details
-
generateKeyPair
byte[][] generateKeyPair(byte[] d) Generates IndCpa Key Pair- Returns:
- KeyPair where each key is represented as bytes
-
decrypt
void decrypt(byte[] secretKey, byte[] cipherText, byte[] m) -
encrypt
byte[] encrypt(byte[] pk, int pkOff, byte[] msg, int msgOff, byte[] coins, int coinsOff) -
packPublicKey
-
unpackPublicKey
-
packSecretKey
-
unpackSecretKey
-
generateMatrixA
-