public final class MLKEM extends Object
| Modifier and Type | Field and Description |
|---|---|
static KeyFactory | MLKEM1024KeyFactoryMLKEM-1024 key factory |
static KeyFactory | MLKEM512KeyFactoryMLKEM-512 key factory |
static KeyFactory | MLKEM768KeyFactoryMLKEM-768 key factory |
| Modifier and Type | Method and Description |
|---|---|
static byte[] | decaps(EncType type,
byte[] ciphertext,
byte[] decapkey)Alice side
Note that this will not fail??? |
static byte[][] | encaps(EncType type,
byte[] pub)Bob side |
static byte[][] | generateKeys(EncType type)Alice side |
static KeyPair | getKeys(EncType type)Alice side |
public static final KeyFactory MLKEM1024KeyFactory
public static final KeyFactory MLKEM512KeyFactory
public static final KeyFactory MLKEM768KeyFactory
public static byte[] decaps(EncType type, byte[] ciphertext, byte[] decapkey) throws GeneralSecurityException
type - the encryption typeciphertext - the ciphertext to decryptdecapkey - the decapsulation keyGeneralSecurityException - on failurepublic static byte[][] encaps(EncType type, byte[] pub) throws GeneralSecurityException
type - the encryption typepub - the public keyGeneralSecurityException - on failurepublic static byte[][] generateKeys(EncType type) throws GeneralSecurityException
type - must be one of the internal types MLKEM*_INTGeneralSecurityException - on failurepublic static KeyPair getKeys(EncType type) throws GeneralSecurityException
type - must be one of the internal types MLKEM*_INTGeneralSecurityException - on failure