Package | Description |
---|---|
org.bouncycastle.openpgp |
High level classes for dealing with OpenPGP objects.
|
org.bouncycastle.openpgp.bc |
BC light weight based OpenPGP objects.
|
org.bouncycastle.openpgp.examples |
Examples of use of the org.bouncycastle.openpgp package.
|
org.bouncycastle.openpgp.jcajce |
JCA/JCE provider based OpenPGP objects.
|
org.bouncycastle.openpgp.operator |
Interfaces and abstract classes to provide the framework to support operations on the OpenPGP high level classes.
|
org.bouncycastle.openpgp.operator.bc |
BC lightweight operators for dealing with OpenPGP objects.
|
org.bouncycastle.openpgp.operator.jcajce |
JCA/JCE based operators for dealing with OpenPGP objects.
|
Modifier and Type | Class and Description |
---|---|
class |
PGPDataValidationException
Thrown if the iv at the start of a data stream indicates the wrong key
is being used.
|
class |
PGPKeyValidationException
Thrown if the key checksum is invalid.
|
Modifier and Type | Method and Description |
---|---|
void |
PGPKeyRingGenerator.addSubKey(PGPKeyPair keyPair)
Add a sub key to the key ring to be generated with default certification and inheriting
the hashed/unhashed packets of the master key.
|
void |
PGPKeyRingGenerator.addSubKey(PGPKeyPair keyPair,
PGPSignatureSubpacketVector hashedPcks,
PGPSignatureSubpacketVector unhashedPcks)
Add a subkey with specific hashed and unhashed packets associated with it and default
certification.
|
boolean |
PGPSecretKeyRingCollection.contains(long keyID)
Return true if a key matching the passed in key ID is present, false otherwise.
|
boolean |
PGPPublicKeyRingCollection.contains(long keyID)
Return true if a key matching the passed in key ID is present, false otherwise.
|
static PGPSecretKey |
PGPSecretKey.copyWithNewPassword(PGPSecretKey key,
PBESecretKeyDecryptor oldKeyDecryptor,
PBESecretKeyEncryptor newKeyEncryptor)
Return a copy of the passed in secret key, encrypted using a new
password and the passed in algorithm.
|
static PGPSecretKeyRing |
PGPSecretKeyRing.copyWithNewPassword(PGPSecretKeyRing ring,
PBESecretKeyDecryptor oldKeyDecryptor,
PBESecretKeyEncryptor newKeyEncryptor)
Return a copy of the passed in secret key ring, with the private keys (where present) associated with the master key and sub keys
are encrypted using a new password and the passed in algorithm.
|
PGPPrivateKey |
PGPSecretKey.extractPrivateKey(PBESecretKeyDecryptor decryptorFactory)
Extract a PGPPrivate key from the SecretKey's encrypted contents.
|
PGPSignature |
PGPV3SignatureGenerator.generate()
Return a V3 signature object containing the current signature state.
|
PGPSignature |
PGPSignatureGenerator.generate()
Return a signature object containing the current signature state.
|
PGPSignature |
PGPSignatureGenerator.generateCertification(PGPPublicKey pubKey)
Generate a certification, such as a revocation, for the passed in key.
|
PGPSignature |
PGPSignatureGenerator.generateCertification(PGPPublicKey masterKey,
PGPPublicKey pubKey)
Generate a certification for the passed in key against the passed in
master key.
|
PGPSignature |
PGPSignatureGenerator.generateCertification(PGPUserAttributeSubpacketVector userAttributes,
PGPPublicKey pubKey)
Generate a certification for the passed in userAttributes
|
PGPSignature |
PGPSignatureGenerator.generateCertification(java.lang.String id,
PGPPublicKey pubKey)
Generate a certification for the passed in id and key.
|
PGPOnePassSignature |
PGPV3SignatureGenerator.generateOnePassVersion(boolean isNested)
Return the one pass header associated with the current signature.
|
PGPOnePassSignature |
PGPSignatureGenerator.generateOnePassVersion(boolean isNested)
Return the one pass header associated with the current signature.
|
java.io.InputStream |
PGPCompressedData.getDataStream()
Return an input stream that decompresses and returns data in the compressed packet.
|
java.io.InputStream |
PGPPBEEncryptedData.getDataStream(PBEDataDecryptorFactory dataDecryptorFactory)
Open an input stream which will provide the decrypted data protected by this object.
|
java.io.InputStream |
PGPPublicKeyEncryptedData.getDataStream(PublicKeyDataDecryptorFactory dataDecryptorFactory)
Open an input stream which will provide the decrypted data protected by this object.
|
PGPSignatureList |
PGPSignatureSubpacketVector.getEmbeddedSignatures() |
java.util.Iterator<PGPSecretKeyRing> |
PGPSecretKeyRingCollection.getKeyRings(java.lang.String userID)
Return an iterator of the key rings associated with the passed in userID.
|
java.util.Iterator<PGPPublicKeyRing> |
PGPPublicKeyRingCollection.getKeyRings(java.lang.String userID)
Return an iterator of the key rings associated with the passed in userID.
|
java.util.Iterator<PGPSecretKeyRing> |
PGPSecretKeyRingCollection.getKeyRings(java.lang.String userID,
boolean matchPartial)
Return an iterator of the key rings associated with the passed in userID.
|
java.util.Iterator<PGPPublicKeyRing> |
PGPPublicKeyRingCollection.getKeyRings(java.lang.String userID,
boolean matchPartial)
Return an iterator of the key rings associated with the passed in userID.
|
java.util.Iterator<PGPSecretKeyRing> |
PGPSecretKeyRingCollection.getKeyRings(java.lang.String userID,
boolean matchPartial,
boolean ignoreCase)
Return an iterator of the key rings associated with the passed in userID.
|
java.util.Iterator<PGPPublicKeyRing> |
PGPPublicKeyRingCollection.getKeyRings(java.lang.String userID,
boolean matchPartial,
boolean ignoreCase)
Return an iterator of the key rings associated with the passed in userID.
|
PGPPublicKey |
PGPPublicKeyRingCollection.getPublicKey(long keyID)
Return the PGP public key associated with the given key id.
|
PGPPublicKeyRing |
PGPPublicKeyRingCollection.getPublicKeyRing(long keyID)
Return the public key ring which contains the key referred to by keyID.
|
PGPSecretKey |
PGPSecretKeyRingCollection.getSecretKey(long keyID)
Return the PGP secret key associated with the given key id.
|
PGPSecretKeyRing |
PGPSecretKeyRingCollection.getSecretKeyRing(long keyID)
Return the secret key ring which contains the key referred to by keyID.
|
byte[] |
PGPSignature.getSignature() |
int |
PGPPBEEncryptedData.getSymmetricAlgorithm(PBEDataDecryptorFactory dataDecryptorFactory)
Return the symmetric key algorithm required to decrypt the data protected by this object.
|
int |
PGPPublicKeyEncryptedData.getSymmetricAlgorithm(PublicKeyDataDecryptorFactory dataDecryptorFactory)
Return the symmetric key algorithm required to decrypt the data protected by this object.
|
void |
PGPV3SignatureGenerator.init(int signatureType,
PGPPrivateKey key)
Initialise the generator for signing.
|
void |
PGPSignatureGenerator.init(int signatureType,
PGPPrivateKey key)
Initialise the generator for signing.
|
void |
PGPSignature.init(PGPContentVerifierBuilderProvider verifierBuilderProvider,
PGPPublicKey pubKey) |
void |
PGPOnePassSignature.init(PGPContentVerifierBuilderProvider verifierBuilderProvider,
PGPPublicKey pubKey)
Initialise the signature object for verification.
|
static byte[] |
PGPUtil.makeRandomKey(int algorithm,
java.security.SecureRandom random)
Generates a random key for a
symmetric encryption algorithm
. |
java.io.OutputStream |
PGPEncryptedDataGenerator.open(java.io.OutputStream out,
byte[] buffer)
Create an OutputStream which will encrypt the data as it is written to it.
|
java.io.OutputStream |
PGPCompressedDataGenerator.open(java.io.OutputStream out,
byte[] buffer)
Return an OutputStream which will compress the data as it is written to it.
|
java.io.OutputStream |
PGPEncryptedDataGenerator.open(java.io.OutputStream out,
long length)
Create an OutputStream based on the configured methods to write a single encrypted object of
known length.
|
static PGPSecretKey |
PGPSecretKey.parseSecretKeyFromSExpr(java.io.InputStream inputStream,
PBEProtectionRemoverFactory keyProtectionRemoverFactory,
KeyFingerPrintCalculator fingerPrintCalculator)
Parse a secret key from one of the GPG S expression keys.
|
static PGPSecretKey |
PGPSecretKey.parseSecretKeyFromSExpr(java.io.InputStream inputStream,
PBEProtectionRemoverFactory keyProtectionRemoverFactory,
PGPPublicKey pubKey)
Parse a secret key from one of the GPG S expression keys associating it with the passed in public key.
|
boolean |
PGPSignature.verify() |
boolean |
PGPEncryptedData.verify()
Verifies the integrity of the packet against the modification detection code associated with
it in the stream.
|
boolean |
PGPOnePassSignature.verify(PGPSignature pgpSig)
Verify the calculated signature against the passed in PGPSignature.
|
boolean |
PGPSignature.verifyCertification(byte[] rawID,
PGPPublicKey key)
Verify the signature as certifying the passed in public key as associated
with the passed in rawID.
|
boolean |
PGPSignature.verifyCertification(PGPPublicKey pubKey)
Verify a key certification, such as a revocation, for the passed in key.
|
boolean |
PGPSignature.verifyCertification(PGPPublicKey masterKey,
PGPPublicKey pubKey)
Verify a certification for the passed in key against the passed in
master key.
|
boolean |
PGPSignature.verifyCertification(PGPUserAttributeSubpacketVector userAttributes,
PGPPublicKey key)
Verify the signature as certifying the passed in public key as associated
with the passed in user attributes.
|
boolean |
PGPSignature.verifyCertification(java.lang.String id,
PGPPublicKey key)
Verify the signature as certifying the passed in public key as associated
with the passed in id.
|
Constructor and Description |
---|
PGPKeyRingGenerator(int certificationLevel,
PGPKeyPair masterKey,
java.lang.String id,
PGPDigestCalculator checksumCalculator,
PGPSignatureSubpacketVector hashedPcks,
PGPSignatureSubpacketVector unhashedPcks,
PGPContentSignerBuilder keySignerBuilder,
PBESecretKeyEncryptor keyEncryptor)
Create a new key ring generator.
|
PGPPublicKey(PublicKeyPacket publicKeyPacket,
KeyFingerPrintCalculator fingerPrintCalculator)
Create a PGP public key from a packet descriptor using the passed in fingerPrintCalculator to do calculate
the fingerprint and keyID.
|
PGPPublicKeyRingCollection(byte[] encoding,
KeyFingerPrintCalculator fingerPrintCalculator) |
PGPPublicKeyRingCollection(java.util.Collection<PGPPublicKeyRing> collection) |
PGPPublicKeyRingCollection(java.io.InputStream in,
KeyFingerPrintCalculator fingerPrintCalculator)
Build a PGPPublicKeyRingCollection from the passed in input stream.
|
PGPSecretKey(int certificationLevel,
PGPKeyPair keyPair,
java.lang.String id,
PGPDigestCalculator checksumCalculator,
PGPSignatureSubpacketVector hashedPcks,
PGPSignatureSubpacketVector unhashedPcks,
PGPContentSignerBuilder certificationSignerBuilder,
PBESecretKeyEncryptor keyEncryptor)
Construct a PGPSecretKey using the passed in private/public key pair and binding it to the passed in id
using a generated certification of certificationLevel.
|
PGPSecretKey(int certificationLevel,
PGPKeyPair keyPair,
java.lang.String id,
PGPSignatureSubpacketVector hashedPcks,
PGPSignatureSubpacketVector unhashedPcks,
PGPContentSignerBuilder certificationSignerBuilder,
PBESecretKeyEncryptor keyEncryptor)
Construct a PGPSecretKey using the passed in private/public key pair and binding it to the passed in id
using a generated certification of certificationLevel.The secret key checksum is calculated using the original
non-digest based checksum.
|
PGPSecretKey(PGPPrivateKey privKey,
PGPPublicKey pubKey,
PGPDigestCalculator checksumCalculator,
boolean isMasterKey,
PBESecretKeyEncryptor keyEncryptor)
Construct a PGPSecretKey using the passed in private key and public key.
|
PGPSecretKeyRing(byte[] encoding,
KeyFingerPrintCalculator fingerPrintCalculator) |
PGPSecretKeyRing(java.io.InputStream in,
KeyFingerPrintCalculator fingerPrintCalculator) |
PGPSecretKeyRingCollection(byte[] encoding,
KeyFingerPrintCalculator fingerPrintCalculator) |
PGPSecretKeyRingCollection(java.util.Collection<PGPSecretKeyRing> collection) |
PGPSecretKeyRingCollection(java.io.InputStream in,
KeyFingerPrintCalculator fingerPrintCalculator)
Build a PGPSecretKeyRingCollection from the passed in input stream.
|
Constructor and Description |
---|
BcPGPPublicKeyRingCollection(byte[] encoding) |
BcPGPPublicKeyRingCollection(java.util.Collection collection) |
BcPGPPublicKeyRingCollection(java.io.InputStream in) |
BcPGPSecretKeyRing(byte[] encoding) |
BcPGPSecretKeyRing(java.io.InputStream in) |
BcPGPSecretKeyRingCollection(byte[] encoding) |
BcPGPSecretKeyRingCollection(java.util.Collection collection) |
BcPGPSecretKeyRingCollection(java.io.InputStream in) |
Modifier and Type | Method and Description |
---|---|
static byte[] |
ByteArrayHandler.decrypt(byte[] encrypted,
char[] passPhrase)
decrypt the passed in message stream
|
static byte[] |
ByteArrayHandler.encrypt(byte[] clearData,
char[] passPhrase,
java.lang.String fileName,
int algorithm,
boolean armor)
Simple PGP encryptor between byte[].
|
Constructor and Description |
---|
JcaPGPPublicKeyRingCollection(byte[] encoding) |
JcaPGPPublicKeyRingCollection(java.util.Collection collection) |
JcaPGPPublicKeyRingCollection(java.io.InputStream in) |
JcaPGPSecretKeyRing(byte[] encoding) |
JcaPGPSecretKeyRing(java.io.InputStream in) |
JcaPGPSecretKeyRingCollection(byte[] encoding) |
JcaPGPSecretKeyRingCollection(java.util.Collection collection) |
JcaPGPSecretKeyRingCollection(java.io.InputStream in) |
Modifier and Type | Method and Description |
---|---|
PGPDataEncryptor |
PGPDataEncryptorBuilder.build(byte[] keyBytes)
Builds a data encryptor using the algorithm configured for this builder.
|
PGPContentSigner |
PGPContentSignerBuilder.build(int signatureType,
PGPPrivateKey privateKey) |
PGPContentVerifier |
PGPContentVerifierBuilder.build(PGPPublicKey publicKey) |
byte[] |
KeyFingerPrintCalculator.calculateFingerprint(PublicKeyPacket publicPk) |
PGPDataDecryptor |
PGPDataDecryptorFactory.createDataDecryptor(boolean withIntegrityPacket,
int encAlgorithm,
byte[] key)
Constructs a data decryptor.
|
PBESecretKeyDecryptor |
PBEProtectionRemoverFactory.createDecryptor(java.lang.String protection) |
byte[] |
RFC6637KDFCalculator.createKey(org.bouncycastle.asn1.ASN1ObjectIdentifier curveOID,
org.bouncycastle.math.ec.ECPoint s,
byte[] recipientFingerPrint)
Deprecated.
|
static byte[] |
RFC6637Utils.createUserKeyingMaterial(PublicKeyPacket pubKeyData,
KeyFingerPrintCalculator fingerPrintCalculator) |
byte[] |
PBESecretKeyEncryptor.encryptKeyData(byte[] key,
byte[] iv,
byte[] keyData,
int keyOff,
int keyLen)
Encrypt the passed in keyData using the key and the iv provided.
|
abstract byte[] |
PBESecretKeyEncryptor.encryptKeyData(byte[] key,
byte[] keyData,
int keyOff,
int keyLen) |
byte[] |
PBESecretKeyEncryptor.encryptKeyData(byte[] keyData,
int keyOff,
int keyLen)
Key encryption method invoked for V4 keys and greater.
|
protected abstract byte[] |
PBEKeyEncryptionMethodGenerator.encryptSessionInfo(int encAlgorithm,
byte[] key,
byte[] sessionInfo) |
protected abstract byte[] |
PublicKeyKeyEncryptionMethodGenerator.encryptSessionInfo(PGPPublicKey pubKey,
byte[] sessionInfo) |
ContainedPacket |
PublicKeyKeyEncryptionMethodGenerator.generate(int encAlgorithm,
byte[] sessionInfo) |
abstract ContainedPacket |
PGPKeyEncryptionMethodGenerator.generate(int encAlgorithm,
byte[] sessionInfo)
Generates a packet encoding the details of this encryption method.
|
ContainedPacket |
PBEKeyEncryptionMethodGenerator.generate(int encAlgorithm,
byte[] sessionInfo) |
PGPDigestCalculator |
PGPDigestCalculatorProvider.get(int algorithm)
Construct a new instance of a cryptographic digest.
|
PGPContentVerifierBuilder |
PGPContentVerifierBuilderProvider.get(int keyAlgorithm,
int hashAlgorithm) |
PGPDigestCalculator |
PBESecretKeyDecryptor.getChecksumCalculator(int hashAlgorithm) |
byte[] |
PBESecretKeyEncryptor.getKey() |
byte[] |
PBEKeyEncryptionMethodGenerator.getKey(int encAlgorithm)
Generate a key for a symmetric encryption algorithm using the PBE configuration in this
method.
|
static org.bouncycastle.asn1.ASN1ObjectIdentifier |
RFC6637Utils.getKeyEncryptionOID(int algID) |
byte[] |
PBESecretKeyDecryptor.makeKeyFromPassPhrase(int keyAlgorithm,
S2K s2k) |
byte[] |
PBEDataDecryptorFactory.makeKeyFromPassPhrase(int keyAlgorithm,
S2K s2k)
Generates an encryption key using the pass phrase and digest calculator configured for this
factory.
|
byte[][] |
PublicKeyKeyEncryptionMethodGenerator.processSessionInfo(byte[] encryptedSessionInfo) |
abstract byte[] |
PBESecretKeyDecryptor.recoverKeyData(int encAlgorithm,
byte[] key,
byte[] iv,
byte[] keyData,
int keyOff,
int keyLen) |
byte[] |
PublicKeyDataDecryptorFactory.recoverSessionData(int keyAlgorithm,
byte[][] secKeyData) |
abstract byte[] |
PBEDataDecryptorFactory.recoverSessionData(int keyAlgorithm,
byte[] key,
byte[] seckKeyData)
Decrypts session data from an encrypted data packet.
|
static byte[] |
PGPPad.unpadSessionData(byte[] encoded) |
Modifier and Type | Method and Description |
---|---|
PGPDataEncryptor |
BcPGPDataEncryptorBuilder.build(byte[] keyBytes) |
PGPContentSigner |
BcPGPContentSignerBuilder.build(int signatureType,
PGPPrivateKey privateKey) |
byte[] |
BcKeyFingerprintCalculator.calculateFingerprint(PublicKeyPacket publicPk) |
PGPDataDecryptor |
BcPublicKeyDataDecryptorFactory.createDataDecryptor(boolean withIntegrityPacket,
int encAlgorithm,
byte[] key) |
PGPDataDecryptor |
BcPBEDataDecryptorFactory.createDataDecryptor(boolean withIntegrityPacket,
int encAlgorithm,
byte[] key) |
protected byte[] |
BcPBEKeyEncryptionMethodGenerator.encryptSessionInfo(int encAlgorithm,
byte[] key,
byte[] sessionInfo) |
protected byte[] |
BcPublicKeyKeyEncryptionMethodGenerator.encryptSessionInfo(PGPPublicKey pubKey,
byte[] sessionInfo) |
PGPDigestCalculator |
BcPGPDigestCalculatorProvider.get(int algorithm) |
PGPContentVerifierBuilder |
BcPGPContentVerifierBuilderProvider.get(int keyAlgorithm,
int hashAlgorithm) |
PGPPrivateKey |
BcPGPKeyConverter.getPGPPrivateKey(PGPPublicKey pubKey,
org.bouncycastle.crypto.params.AsymmetricKeyParameter privKey) |
PGPPublicKey |
BcPGPKeyConverter.getPGPPublicKey(int algorithm,
PGPAlgorithmParameters algorithmParameters,
org.bouncycastle.crypto.params.AsymmetricKeyParameter pubKey,
java.util.Date time)
Create a PGPPublicKey from the passed in JCA one.
|
org.bouncycastle.crypto.params.AsymmetricKeyParameter |
BcPGPKeyConverter.getPrivateKey(PGPPrivateKey privKey) |
org.bouncycastle.crypto.params.AsymmetricKeyParameter |
BcPGPKeyConverter.getPublicKey(PGPPublicKey publicKey) |
byte[] |
BcPublicKeyDataDecryptorFactory.recoverSessionData(int keyAlgorithm,
byte[][] secKeyData) |
byte[] |
BcPBEDataDecryptorFactory.recoverSessionData(int keyAlgorithm,
byte[] key,
byte[] secKeyData) |
Constructor and Description |
---|
BcPGPKeyPair(int algorithm,
org.bouncycastle.crypto.AsymmetricCipherKeyPair keyPair,
java.util.Date date) |
BcPGPKeyPair(int algorithm,
PGPAlgorithmParameters parameters,
org.bouncycastle.crypto.AsymmetricCipherKeyPair keyPair,
java.util.Date date) |
Modifier and Type | Method and Description |
---|---|
PGPDigestCalculatorProvider |
JcaPGPDigestCalculatorProviderBuilder.build()
Constructs a new PGPDigestCalculatorProvider
|
PGPDataEncryptor |
JcePGPDataEncryptorBuilder.build(byte[] keyBytes) |
PBESecretKeyDecryptor |
JcePBESecretKeyDecryptorBuilder.build(char[] passPhrase) |
PGPContentSigner |
JcaPGPContentSignerBuilder.build(int signatureType,
long keyID,
java.security.PrivateKey privateKey) |
PGPContentSigner |
JcaPGPContentSignerBuilder.build(int signatureType,
PGPPrivateKey privateKey) |
byte[] |
JcaKeyFingerprintCalculator.calculateFingerprint(PublicKeyPacket publicPk) |
PBESecretKeyDecryptor |
JcePBEProtectionRemoverFactory.createDecryptor(java.lang.String protection) |
protected byte[] |
JcePBEKeyEncryptionMethodGenerator.encryptSessionInfo(int encAlgorithm,
byte[] key,
byte[] sessionInfo) |
protected byte[] |
JcePublicKeyKeyEncryptionMethodGenerator.encryptSessionInfo(PGPPublicKey pubKey,
byte[] sessionInfo) |
PGPContentVerifierBuilder |
JcaPGPContentVerifierBuilderProvider.get(int keyAlgorithm,
int hashAlgorithm) |
PGPPrivateKey |
JcaPGPKeyConverter.getPGPPrivateKey(PGPPublicKey pub,
java.security.PrivateKey privKey)
Convert a PrivateKey into a PGPPrivateKey.
|
PGPPublicKey |
JcaPGPKeyConverter.getPGPPublicKey(int algorithm,
PGPAlgorithmParameters algorithmParameters,
java.security.PublicKey pubKey,
java.util.Date time)
Create a PGPPublicKey from the passed in JCA one.
|
PGPPublicKey |
JcaPGPKeyConverter.getPGPPublicKey(int algorithm,
java.security.PublicKey pubKey,
java.util.Date time)
Create a PGPPublicKey from the passed in JCA one.
|
java.security.PrivateKey |
JcaPGPKeyConverter.getPrivateKey(PGPPrivateKey privKey) |
java.security.PublicKey |
JcaPGPKeyConverter.getPublicKey(PGPPublicKey publicKey) |
Constructor and Description |
---|
JcaPGPKeyPair(int algorithm,
java.security.KeyPair keyPair,
java.util.Date date) |
JcaPGPKeyPair(int algorithm,
PGPAlgorithmParameters parameters,
java.security.KeyPair keyPair,
java.util.Date date) |