public class BcTlsMLKemDomain extends java.lang.Object implements TlsKemDomain
Modifier and Type | Field and Description |
---|---|
protected BcTlsCrypto |
crypto |
protected org.bouncycastle.pqc.crypto.mlkem.MLKEMParameters |
domainParameters |
protected boolean |
isServer |
Constructor and Description |
---|
BcTlsMLKemDomain(BcTlsCrypto crypto,
TlsKemConfig kemConfig) |
Modifier and Type | Method and Description |
---|---|
BcTlsSecret |
adoptLocalSecret(byte[] secret) |
TlsAgreement |
createKem() |
BcTlsSecret |
decapsulate(org.bouncycastle.pqc.crypto.mlkem.MLKEMPrivateKeyParameters privateKey,
byte[] ciphertext) |
org.bouncycastle.pqc.crypto.mlkem.MLKEMPublicKeyParameters |
decodePublicKey(byte[] encoding) |
org.bouncycastle.crypto.SecretWithEncapsulation |
encapsulate(org.bouncycastle.pqc.crypto.mlkem.MLKEMPublicKeyParameters publicKey) |
byte[] |
encodePublicKey(org.bouncycastle.pqc.crypto.mlkem.MLKEMPublicKeyParameters publicKey) |
org.bouncycastle.crypto.AsymmetricCipherKeyPair |
generateKeyPair() |
static org.bouncycastle.pqc.crypto.mlkem.MLKEMParameters |
getDomainParameters(TlsKemConfig kemConfig) |
boolean |
isServer() |
protected final BcTlsCrypto crypto
protected final org.bouncycastle.pqc.crypto.mlkem.MLKEMParameters domainParameters
protected final boolean isServer
public BcTlsMLKemDomain(BcTlsCrypto crypto, TlsKemConfig kemConfig)
public static org.bouncycastle.pqc.crypto.mlkem.MLKEMParameters getDomainParameters(TlsKemConfig kemConfig)
public BcTlsSecret adoptLocalSecret(byte[] secret)
public TlsAgreement createKem()
createKem
in interface TlsKemDomain
public BcTlsSecret decapsulate(org.bouncycastle.pqc.crypto.mlkem.MLKEMPrivateKeyParameters privateKey, byte[] ciphertext)
public org.bouncycastle.pqc.crypto.mlkem.MLKEMPublicKeyParameters decodePublicKey(byte[] encoding)
public org.bouncycastle.crypto.SecretWithEncapsulation encapsulate(org.bouncycastle.pqc.crypto.mlkem.MLKEMPublicKeyParameters publicKey)
public byte[] encodePublicKey(org.bouncycastle.pqc.crypto.mlkem.MLKEMPublicKeyParameters publicKey)
public org.bouncycastle.crypto.AsymmetricCipherKeyPair generateKeyPair()
public boolean isServer()