Class BcTlsMLKemDomain
- java.lang.Object
-
- org.bouncycastle.tls.crypto.impl.bc.BcTlsMLKemDomain
-
- All Implemented Interfaces:
TlsKemDomain
public class BcTlsMLKemDomain extends java.lang.Object implements TlsKemDomain
-
-
Field Summary
Fields Modifier and Type Field Description protected BcTlsCrypto
crypto
protected org.bouncycastle.pqc.crypto.mlkem.MLKEMParameters
domainParameters
protected boolean
isServer
-
Constructor Summary
Constructors Constructor Description BcTlsMLKemDomain(BcTlsCrypto crypto, TlsKemConfig kemConfig)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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()
-
-
-
Field Detail
-
crypto
protected final BcTlsCrypto crypto
-
domainParameters
protected final org.bouncycastle.pqc.crypto.mlkem.MLKEMParameters domainParameters
-
isServer
protected final boolean isServer
-
-
Constructor Detail
-
BcTlsMLKemDomain
public BcTlsMLKemDomain(BcTlsCrypto crypto, TlsKemConfig kemConfig)
-
-
Method Detail
-
getDomainParameters
public static org.bouncycastle.pqc.crypto.mlkem.MLKEMParameters getDomainParameters(TlsKemConfig kemConfig)
-
adoptLocalSecret
public BcTlsSecret adoptLocalSecret(byte[] secret)
-
createKem
public TlsAgreement createKem()
- Specified by:
createKem
in interfaceTlsKemDomain
-
decapsulate
public BcTlsSecret decapsulate(org.bouncycastle.pqc.crypto.mlkem.MLKEMPrivateKeyParameters privateKey, byte[] ciphertext)
-
decodePublicKey
public org.bouncycastle.pqc.crypto.mlkem.MLKEMPublicKeyParameters decodePublicKey(byte[] encoding)
-
encapsulate
public org.bouncycastle.crypto.SecretWithEncapsulation encapsulate(org.bouncycastle.pqc.crypto.mlkem.MLKEMPublicKeyParameters publicKey)
-
encodePublicKey
public byte[] encodePublicKey(org.bouncycastle.pqc.crypto.mlkem.MLKEMPublicKeyParameters publicKey)
-
generateKeyPair
public org.bouncycastle.crypto.AsymmetricCipherKeyPair generateKeyPair()
-
isServer
public boolean isServer()
-
-