Class JceExternalPublicKeyDataDecryptorFactoryBuilder

java.lang.Object
org.bouncycastle.openpgp.api.operator.jcajce.JceExternalPublicKeyDataDecryptorFactoryBuilder

public abstract class JceExternalPublicKeyDataDecryptorFactoryBuilder extends Object
Builder for a PublicKeyDataDecryptorFactory whose private key material is held outside the OpenPGP key - typically on a hardware token - as described by OpenPGP External Secret Keys and signalled by SecretKeyPacket.USAGE_EXTERNAL. This is the JCA/JCE analogue of BcExternalPublicKeyDataDecryptorFactory.

All session-key recovery logic (packet parsing, length checks, the RFC 6637 / RFC 9580 KDF and key unwrap sequencing) is inherited from AbstractExternalPublicKeyDataDecryptorFactory, with the cryptographic primitives bound to the configured JCA provider; a subclass supplies only the raw private-key operation by implementing build(OpenPGPKey.OpenPGPSecretKey) with a JceExternalPublicKeyDataDecryptorFactoryBuilder.PublicKeyCryptoCallback, which receives the sender's ephemeral key as a JCA PublicKey built through the configured provider.

Note that a secret key handled through this builder need not actually be external: if the supplied key carries usable software key material, the factory built delegates to JcePublicKeyDataDecryptorFactoryBuilder so the (much cheaper) in-process path is used instead.