Package net.i2p.router.crypto.pqc
Class MLKEM
java.lang.Object
net.i2p.router.crypto.pqc.MLKEM
Wrapper around bouncycastle
- Since:
- 0.9.67
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final KeyFactorystatic final KeyFactory512 and 1024 are non-threaded for now.static final KeyFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]Alice side Note that this will not fail???static byte[][]Bob sidestatic byte[][]generateKeys(EncType type) Alice sidestatic KeyPairAlice side
-
Field Details
-
MLKEM512KeyFactory
512 and 1024 are non-threaded for now. 768 thread is started by ECIESAEADEngine. -
MLKEM768KeyFactory
-
MLKEM1024KeyFactory
-
-
Constructor Details
-
MLKEM
public MLKEM()
-
-
Method Details
-
getKeys
Alice side- Parameters:
type- must be one of the internal types MLKEM*_INT- Returns:
- encapkey decapkey
- Throws:
GeneralSecurityException
-
generateKeys
Alice side- Parameters:
type- must be one of the internal types MLKEM*_INT- Returns:
- encapkey decapkey
- Throws:
GeneralSecurityException
-
encaps
Bob side- Returns:
- ciphertext sharedkey, non-null
- Throws:
GeneralSecurityException
-
decaps
public static byte[] decaps(EncType type, byte[] ciphertext, byte[] decapkey) throws GeneralSecurityException Alice side Note that this will not fail???- Returns:
- sharedkey, 32 bytes, non-null
- Throws:
GeneralSecurityException
-