Package org.bouncycastle.openpgp.api
package org.bouncycastle.openpgp.api
The
apipackage contains a high-level OpenPGP API layer on top of the
openpgpmid-level API. It is tailored to provide a modern OpenPGP experience, following the guidance from rfc9580 ("OpenPGP v6"), while also being interoperable with rfc4880 ("OpenPGP v4").
From an architectural point of view, the hierarchy of the individual layers is as follows:
-
api
specifies a high-level API using mid-level implementations fromopenpgp
. This layer strives to be easy to use, hard to misuse and secure by default. -
openpgp
defines a powerful, flexible, but quite verbose API using packet definitions frombcpg
. -
bcpg
implements serialization / deserialization of OpenPGP packets. It does not contain any business logic.
-
ClassDescriptionDoubleBufferedInputStream<I extends InputStream>Implementation of an
InputStreamthat double-buffers data from an underlying input stream.Encryption Mode.Callback to generate aPGPKeyPairfrom aPGPKeyPairGeneratorinstance.Encryption mode (SEIPDv1 / SEIPDv2 / OED) and algorithms.Main entry to the high level OpenPGP API.OpenPGP certificates (TPKs - transferable public keys) are long-living structures that may change during their lifetime.Component on an OpenPGP certificate.A component key is either anOpenPGPCertificate.OpenPGPPrimaryKey, or anOpenPGPCertificate.OpenPGPSubkey.OpenPGP Signature made over someOpenPGPCertificate.OpenPGPCertificateComponenton aOpenPGPCertificate.An identity bound to theOpenPGPCertificate.OpenPGPPrimaryKeyof aOpenPGPCertificate.The primary key of aOpenPGPCertificate.Chain ofsignatures."Positive" signature chain link.Link in aOpenPGPCertificate.OpenPGPSignatureChain."Negative" signature chain link.Collection of multipleOpenPGPCertificate.OpenPGPSignatureChainobjects.A subkey on aOpenPGPCertificate.A UserAttribute.A UserId.High-Level OpenPGP Signature Generator for Detached Signatures.High-Level Processor for Messages Signed Using Detached OpenPGP Signatures.Bouncy Castle provides two implementations of OpenPGP operators.AnOpenPGPKey(TSK - transferable secret key) is the pendant to anOpenPGPCertificate, but containing the secret key material in addition to the public components.UnlockedOpenPGPKey.OpenPGPSecretKey.Secret key component of aOpenPGPCertificate.OpenPGPPrimaryKeyorOpenPGPCertificate.OpenPGPSubkey.High-level generator class for OpenPGP v6 keys.OpenPGPKeyMaterialPool<M extends OpenPGPCertificate>Implementation of theOpenPGPKeyMaterialProviderwhich caches items in aHashMap.Implementation ofOpenPGPKeyMaterialPooltailored to providingOpenPGPCertificates.Implementation ofOpenPGPKeyMaterialPooltailored to provideOpenPGPKeys.OpenPGPKeyMaterialProvider<M extends OpenPGPCertificate>Interface for providing OpenPGP keys or certificates.Interface for requestingOpenPGPCertificatesby providing aKeyIdentifier.Interface for requestingOpenPGPKeysby providing aKeyIdentifier.Reader forOpenPGPKeysorOpenPGPCertificates.Generator for OpenPGP messages.AnInputStreamthat processes an OpenPGP message.Implementation of anOutputStreamtailored to creating OpenPGP messages.Factory class for wrapping output streams.Factory interface for creating PGPPadding objects.Callback to handlePGPExceptions.Policy for OpenPGP algorithms and features.TheOpenPGPPolicy.OpenPGPNotationRegistrycan be used to register known notations, such that signatures containing notation instances of the same name, which are marked as critical do not invalidate the signature.An OpenPGP signature.AnOpenPGPSignaturemade over a binary or textual document (e.g.SignatureSubpacketand theOpenPGPSignaturethat contains it.Parameters for signature generation.Callback, allowing the user to modifySignatureParametersbefore use.Callback to modify the contents of aPGPSignatureSubpacketGenerator.Interface for selecting a subset of keys from aPGPKeyRing.