public class BcPGPCompositeKeyParameters
extends org.bouncycastle.crypto.params.AsymmetricKeyParameter
PublicKeyAlgorithmTags.MLDSA65_Ed25519,
PublicKeyAlgorithmTags.MLDSA87_Ed448) or of an ML-KEM + ECDH encryption key
(PublicKeyAlgorithmTags.MLKEM768_X25519,
PublicKeyAlgorithmTags.MLKEM1024_X448).
BcPGPKeyConverter returns an instance of this class for such keys and expects one when asked to
build the OpenPGP key packets, and BcPGPKeyPair takes an AsymmetricCipherKeyPair
whose halves are instances of it. The traditional component is an
Ed25519PublicKeyParameters / Ed448PublicKeyParameters
or X25519PublicKeyParameters / X448PublicKeyParameters
(or the private key counterpart); the post-quantum component is an
MLDSAPublicKeyParameters or MLKEMPublicKeyParameters
(or the private key counterpart).
| Constructor and Description |
|---|
BcPGPCompositeKeyParameters(boolean isPrivate,
org.bouncycastle.crypto.params.AsymmetricKeyParameter traditionalKey,
org.bouncycastle.crypto.params.AsymmetricKeyParameter postQuantumKey)
Combine the two component keys of a composite key.
|
| Modifier and Type | Method and Description |
|---|---|
org.bouncycastle.crypto.params.AsymmetricKeyParameter |
getPostQuantumKey()
Return the post-quantum (ML-DSA or ML-KEM) component key.
|
org.bouncycastle.crypto.params.AsymmetricKeyParameter |
getTraditionalKey()
Return the traditional (EdDSA or ECDH) component key.
|
public BcPGPCompositeKeyParameters(boolean isPrivate,
org.bouncycastle.crypto.params.AsymmetricKeyParameter traditionalKey,
org.bouncycastle.crypto.params.AsymmetricKeyParameter postQuantumKey)
isPrivate - true if both components are private keys, false if both are public keystraditionalKey - the EdDSA or ECDH componentpostQuantumKey - the ML-DSA or ML-KEM componentpublic org.bouncycastle.crypto.params.AsymmetricKeyParameter getTraditionalKey()
public org.bouncycastle.crypto.params.AsymmetricKeyParameter getPostQuantumKey()