Class MLKEMIndCpa
java.lang.Object
org.bouncycastle.pqc.crypto.mlkem.MLKEMIndCpa
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]decrypt(byte[] secretKey, byte[] cipherText) byte[]encrypt(byte[] publicKeyInput, byte[] msg, byte[] coins) (package private) byte[][]generateKeyPair(byte[] d) Generates IndCpa Key PairvoidgenerateMatrix(PolyVec[] aMatrix, byte[] seed, boolean transposed) byte[]packPublicKey(PolyVec publicKeyPolyVec, byte[] seed) byte[]packSecretKey(PolyVec secretKeyPolyVec) byte[]unpackPublicKey(PolyVec publicKeyPolyVec, byte[] publicKey) voidunpackSecretKey(PolyVec secretKeyPolyVec, byte[] secretKey)
-
Field Details
-
KyberGenerateMatrixNBlocks
public final int KyberGenerateMatrixNBlocks
-
-
Constructor Details
-
MLKEMIndCpa
-
-
Method Details
-
generateKeyPair
byte[][] generateKeyPair(byte[] d) Generates IndCpa Key Pair- Returns:
- KeyPair where each key is represented as bytes
-
encrypt
public byte[] encrypt(byte[] publicKeyInput, byte[] msg, byte[] coins) -
packPublicKey
-
unpackPublicKey
-
packSecretKey
-
unpackSecretKey
-
generateMatrix
-
decrypt
public byte[] decrypt(byte[] secretKey, byte[] cipherText)
-