Class MLKEMEngine
java.lang.Object
org.bouncycastle.pqc.crypto.mlkem.MLKEMEngine
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[][]byte[][]generateKemKeyPairInternal(byte[] d, byte[] z) intintintintintintstatic intintstatic intintintintintintintintintvoidgetRandomBytes(byte[] buf) voidinit(SecureRandom random) byte[]kemDecrypt(byte[] secretKey, byte[] cipherText) byte[]kemDecryptInternal(byte[] secretKey, byte[] cipherText) byte[][]kemEncrypt(byte[] publicKeyInput, byte[] randBytes) byte[][]kemEncryptInternal(byte[] publicKeyInput, byte[] randBytes)
-
Field Details
-
KyberN
public static final int KyberN- See Also:
-
KyberQ
public static final int KyberQ- See Also:
-
KyberQinv
public static final int KyberQinv- See Also:
-
KyberSymBytes
public static final int KyberSymBytes- See Also:
-
KyberPolyBytes
public static final int KyberPolyBytes- See Also:
-
-
Constructor Details
-
MLKEMEngine
public MLKEMEngine(int k)
-
-
Method Details
-
getSymmetric
-
getKyberEta2
public static int getKyberEta2() -
getKyberIndCpaMsgBytes
public static int getKyberIndCpaMsgBytes() -
getCryptoCipherTextBytes
public int getCryptoCipherTextBytes() -
getCryptoPublicKeyBytes
public int getCryptoPublicKeyBytes() -
getCryptoSecretKeyBytes
public int getCryptoSecretKeyBytes() -
getCryptoBytes
public int getCryptoBytes() -
getKyberCipherTextBytes
public int getKyberCipherTextBytes() -
getKyberSecretKeyBytes
public int getKyberSecretKeyBytes() -
getKyberIndCpaPublicKeyBytes
public int getKyberIndCpaPublicKeyBytes() -
getKyberIndCpaSecretKeyBytes
public int getKyberIndCpaSecretKeyBytes() -
getKyberIndCpaBytes
public int getKyberIndCpaBytes() -
getKyberPublicKeyBytes
public int getKyberPublicKeyBytes() -
getKyberPolyCompressedBytes
public int getKyberPolyCompressedBytes() -
getKyberK
public int getKyberK() -
getKyberPolyVecBytes
public int getKyberPolyVecBytes() -
getKyberPolyVecCompressedBytes
public int getKyberPolyVecCompressedBytes() -
getKyberEta1
public int getKyberEta1() -
init
-
generateKemKeyPair
public byte[][] generateKemKeyPair() -
generateKemKeyPairInternal
public byte[][] generateKemKeyPairInternal(byte[] d, byte[] z) -
kemEncryptInternal
public byte[][] kemEncryptInternal(byte[] publicKeyInput, byte[] randBytes) -
kemDecryptInternal
public byte[] kemDecryptInternal(byte[] secretKey, byte[] cipherText) -
kemEncrypt
public byte[][] kemEncrypt(byte[] publicKeyInput, byte[] randBytes) -
kemDecrypt
public byte[] kemDecrypt(byte[] secretKey, byte[] cipherText) -
getRandomBytes
public void getRandomBytes(byte[] buf)
-