| Modifier and Type | Field and Description |
|---|---|
| public static final int | BINARY_DOCUMENT
The signature is made over some binary data. |
| public static final int | CANONICAL_TEXT_DOCUMENT
The signature is made over text data. |
| public static final int | CASUAL_CERTIFICATION
Casual certification over a user-id or user-attribute. |
| public static final int | CERTIFICATION_REVOCATION
The signature is used to revoke a user-id certification signature
( |
| public static final int | DEFAULT_CERTIFICATION
Generic certification over a user-id or user-attribute. |
| public static final int | DIRECT_KEY
The signature is made directly over a primary key. |
| public static final int | KEY_REVOCATION
The signature is used to revoke a primary key (and in turn the whole certificate with all its subkeys). |
| public static final int | NO_CERTIFICATION
Persona certification over a user-id or user-attribute. |
| public static final int | POSITIVE_CERTIFICATION
Positive certification over a user-id or user-attribute. |
| public static final int | PRIMARYKEY_BINDING
Primary-Key Binding Signature to bind a signing-capable subkey to a primary key. |
| private final SignaturePacket | |
| public static final int | STAND_ALONE
The signature is made only over its own signature subpackets. |
| public static final int | SUBKEY_BINDING
Subkey Binding Signature to bind a subkey to a primary key. |
| public static final int | SUBKEY_REVOCATION
The signature is used to revoke the binding of a particular subkey. |
| public static final int | THIRD_PARTY_CONFIRMATION
This signature is issued over another signature and can act as an attestation of that signature. |
| public static final int | TIMESTAMP
The signature is only meaningful for the timestamp contained in it. |
| private final TrustPacket | |
| private volatile PGPContentVerifier |
| Access | Constructor and Description |
|---|---|
| public | PGPSignature(BCPGInputStream
packet input stream pIn)Parse a |
| pack-priv | |
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private static SignaturePacket | |
| private void | |
| private PGPSignatureSubpacketVector | |
| pack-priv PGPContentVerifierBuilder | |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv boolean | |
| public void | |
| public void | encode(OutputStream
stream to write the key encoding to. outStream, boolean if the purpose of encoding is to send key to other users. forTransfer)Encode the signature to outStream, with trust packets stripped out if forTransfer is true. |
| private List | |
| public Date | |
| public byte[] | |
| public byte[] | |
| public byte[] | Returns: a encoded byte array representing the key.if the purpose of encoding is to send key to other users. forTransfer)Return an encoding of the signature, with trust packets stripped out if forTransfer is true. |
| public int | Returns: signature hash algorithm.Return the hash algorithm associated with this signature. |
| public List | Returns: hashed key identifiersReturn a list of all |
| public PGPSignatureSubpacketVector | Returns: hashed signature subpacketsReturn the hashed subpackets of the signature. |
| public int | Returns: signature key algorithm.Return the key algorithm associated with this signature. |
| public long | Returns: keyID of the signatures corresponding key.Return the id of the key that created the signature. |
| public List | Returns: all detectableKeyIdentifiersCreate a list of |
| pack-priv byte[] | |
| public byte[] | Returns: cryptographic signatureReturn the cryptographic raw signature contained in the OpenPGP signature packet. |
| public byte[] | |
| public int | |
| public List | Returns: unhashed key identifiersReturn a list of all |
| public PGPSignatureSubpacketVector | Returns: unhashed signature subpacketsReturn the unhashed subpackets of the signature. |
| public int | |
| public boolean | Returns: true if either hashed or unhashed subpackets are present, false otherwise.Return true if the signature has either hashed or unhashed subpackets. |
| public void | init(PGPContentVerifierBuilderProvider
provide the implementation for signature verification verifierBuilderProvider, PGPPublicKey issuer public key pubKey)Initialize the signature for verification. |
| pack-priv void | |
| public boolean | Returns: true if this signature represents a certification, false otherwise.Return true if this signature represents a certification. |
| public static boolean | Returns: true if signatureType is a certification, false otherwise.Return true if the passed in signature type represents a certification, false if the signature type is not. |
| public static boolean | Returns: true if both signatures contain the same cryptographic signaturefirst signature sig1, PGPSignature second signature sig2)Return true, if the cryptographic signature encoding of the two signatures match. |
| public static PGPSignature | Returns: merged signaturefirst signature sig1, PGPSignature second signature sig2)Join two copies of the same signature. |
| private void | |
| public boolean | Returns: true if the signature is correctFinish the verification and return true if the signature is "correct". |
| public boolean | Returns: true if the signature matches, false otherwise.user attributes the key was stored under userAttributes, PGPPublicKey the key to be verified. key)Verify the signature as certifying the passed in public key as associated with the passed in user attributes. |
| public boolean | Returns: true if the signature matches, false otherwise.id the key was stored under id, PGPPublicKey the key to be verified. key)Verify the signature as certifying the passed in public key as associated with the passed in id. |
| public boolean | Returns: true if the signature matches, false otherwise.id the key was stored under in its raw byte form. rawID, PGPPublicKey the key to be verified. key)Verify the signature as certifying the passed in public key as associated with the passed in rawID. |
| public boolean | Returns: true if the certification is valid, false otherwise.the key we are verifying against. masterKey, PGPPublicKey the key we are verifying. pubKey)Verify a certification for the passed in key against the passed in master key. |
| public boolean | Returns: true if the certification is valid, false otherwise.the key we are checking. pubKey)Verify a key certification, such as a revocation, for the passed in key. |
| BINARY_DOCUMENT | back to summary |
|---|---|
| public static final int BINARY_DOCUMENT The signature is made over some binary data.
No preprocessing is applied.
| |
| CANONICAL_TEXT_DOCUMENT | back to summary |
|---|---|
| public static final int CANONICAL_TEXT_DOCUMENT The signature is made over text data.
In a preprocessing step, the text data is canonicalized (line endings may be altered).
| |
| CASUAL_CERTIFICATION | back to summary |
|---|---|
| public static final int CASUAL_CERTIFICATION Casual certification over a user-id or user-attribute.
The issuer of a casual certification did some casual verification to check the authenticity of the
identity claim.
| |
| CERTIFICATION_REVOCATION | back to summary |
|---|---|
| public static final int CERTIFICATION_REVOCATION The signature is used to revoke a user-id certification signature
( | |
| DEFAULT_CERTIFICATION | back to summary |
|---|---|
| public static final int DEFAULT_CERTIFICATION Generic certification over a user-id or user-attribute.
The issuer of a generic certification does not make any claims as to what extent they checked
the authenticity of the identity claim.
| |
| DIRECT_KEY | back to summary |
|---|---|
| public static final int DIRECT_KEY The signature is made directly over a primary key. If issued as a self-signature, its contents apply to the whole certificate, meaning this signature is appropriate to set algorithm preferences which also apply to its subkeys. Issued as a signature over a third-party certificate, it can be used to mark said certificate as a CA.
| |
| KEY_REVOCATION | back to summary |
|---|---|
| public static final int KEY_REVOCATION The signature is used to revoke a primary key (and in turn the whole certificate with all its subkeys).
| |
| NO_CERTIFICATION | back to summary |
|---|---|
| public static final int NO_CERTIFICATION Persona certification over a user-id or user-attribute.
The issuer of a persona certification did explicitly not check the authenticity of the identity claim.
| |
| POSITIVE_CERTIFICATION | back to summary |
|---|---|
| public static final int POSITIVE_CERTIFICATION Positive certification over a user-id or user-attribute.
The issuer of a positive certification did extensive effort to check the authenticity of the identity claim.
| |
| PRIMARYKEY_BINDING | back to summary |
|---|---|
| public static final int PRIMARYKEY_BINDING Primary-Key Binding Signature to bind a signing-capable subkey to a primary key.
This (back-) signature is used as an embedded signature in a | |
| sigPck | back to summary |
|---|---|
| private final SignaturePacket sigPck | |
| STAND_ALONE | back to summary |
|---|---|
| public static final int STAND_ALONE The signature is made only over its own signature subpackets.
| |
| SUBKEY_BINDING | back to summary |
|---|---|
| public static final int SUBKEY_BINDING Subkey Binding Signature to bind a subkey to a primary key. This signature type is used to bind a subkey to the primary key of a certificate.
| |
| SUBKEY_REVOCATION | back to summary |
|---|---|
| public static final int SUBKEY_REVOCATION The signature is used to revoke the binding of a particular subkey. | |
| THIRD_PARTY_CONFIRMATION | back to summary |
|---|---|
| public static final int THIRD_PARTY_CONFIRMATION This signature is issued over another signature and can act as an attestation of that signature. This concept can be used to "approve" third-party certifications over the own key, allowing third-party certifications to be published on key-servers that usually strip such signatures to prevent certificate flooding. | |
| TIMESTAMP | back to summary |
|---|---|
| public static final int TIMESTAMP The signature is only meaningful for the timestamp contained in it.
| |
| trustPck | back to summary |
|---|---|
| private final TrustPacket trustPck | |
| verifier | back to summary |
|---|---|
| private volatile PGPContentVerifier verifier | |
| PGPSignature | back to summary |
|---|---|
| public PGPSignature(BCPGInputStream pIn) throws IOException, PGPException Parse a
| |
| PGPSignature | back to summary |
|---|---|
| pack-priv PGPSignature(PGPSignature signature) | |
| PGPSignature | back to summary |
|---|---|
| pack-priv PGPSignature(SignaturePacket sigPacket) | |
| PGPSignature | back to summary |
|---|---|
| pack-priv PGPSignature(SignaturePacket sigPacket, TrustPacket trustPacket) | |
| addTrailer | back to summary |
|---|---|
| private void addTrailer() | |
| cast | back to summary |
|---|---|
| private static SignaturePacket cast(Packet packet) throws IOException | |
| checkSaltSize | back to summary |
|---|---|
| private void checkSaltSize() throws PGPException | |
| createSubpacketVector | back to summary |
|---|---|
| private PGPSignatureSubpacketVector createSubpacketVector(SignatureSubpacket[] pcks) | |
| createVerifierProvider | back to summary |
|---|---|
| pack-priv PGPContentVerifierBuilder createVerifierProvider(PGPContentVerifierBuilderProvider verifierBuilderProvider) throws PGPException | |
| doVerifyCertification | back to summary |
|---|---|
| pack-priv boolean doVerifyCertification(PGPUserAttributeSubpacketVector userAttributes, PGPPublicKey key) throws PGPException | |
| doVerifyCertification | back to summary |
|---|---|
| pack-priv boolean doVerifyCertification(byte[] rawID, PGPPublicKey key) throws PGPException | |
| doVerifyCertification | back to summary |
|---|---|
| pack-priv boolean doVerifyCertification(PGPPublicKey masterKey, PGPPublicKey pubKey) throws PGPException | |
| doVerifyCertification | back to summary |
|---|---|
| pack-priv boolean doVerifyCertification(PGPPublicKey pubKey) throws PGPException | |
| encode | back to summary |
|---|---|
| public void encode(OutputStream outStream) throws IOException Encode the signature to an OpenPGP packet stream. This method does not strip out any trust packets.
| |
| encode | back to summary |
|---|---|
| public void encode(OutputStream outStream, boolean forTransfer) throws IOException Encode the signature to outStream, with trust packets stripped out if forTransfer is true.
| |
| extractKeyIdentifiers | back to summary |
|---|---|
| private List | |
| getCreationTime | back to summary |
|---|---|
| public Date getCreationTime() Return the creation time of the signature.
| |
| getDigestPrefix | back to summary |
|---|---|
| public byte[] getDigestPrefix() Return the digest prefix of the signature.
| |
| getEncoded | back to summary |
|---|---|
| public byte[] getEncoded() throws IOException Return the OpenPGP packet encoding of the signature.
| |
| getEncoded | back to summary |
|---|---|
| public byte[] getEncoded(boolean forTransfer) throws IOException Return an encoding of the signature, with trust packets stripped out if forTransfer is true.
| |
| getHashAlgorithm | back to summary |
|---|---|
| public int getHashAlgorithm() Return the hash algorithm associated with this signature.
| |
| getHashedKeyIdentifiers | back to summary |
|---|---|
| public List Return a list of all
| |
| getHashedSubPackets | back to summary |
|---|---|
| public PGPSignatureSubpacketVector getHashedSubPackets() Return the hashed subpackets of the signature. Hashed signature subpackets are covered by the signature.
| |
| getKeyAlgorithm | back to summary |
|---|---|
| public int getKeyAlgorithm() Return the key algorithm associated with this signature.
| |
| getKeyID | back to summary |
|---|---|
| public long getKeyID() Return the id of the key that created the signature. Note Since signatures of version 4 or later encode the issuer information inside a
signature subpacket (
| |
| getKeyIdentifiers | back to summary |
|---|---|
| public List Create a list of
| |
| getSalt | back to summary |
|---|---|
| pack-priv byte[] getSalt() Return the salt of a v6 signature.
| |
| getSignature | back to summary |
|---|---|
| public byte[] getSignature() throws PGPException Return the cryptographic raw signature contained in the OpenPGP signature packet. The value is dependent on the signing algorithm.
| |
| getSignatureTrailer | back to summary |
|---|---|
| public byte[] getSignatureTrailer() | |
| getSignatureType | back to summary |
|---|---|
| public int getSignatureType() Return the type id of the signature.
| |
| getUnhashedKeyIdentifiers | back to summary |
|---|---|
| public List Return a list of all
| |
| getUnhashedSubPackets | back to summary |
|---|---|
| public PGPSignatureSubpacketVector getUnhashedSubPackets() Return the unhashed subpackets of the signature.
As unhashed signature subpackets are NOT covered by the signature, an attacker might inject false
information after the fact, therefore only "self-authenticating" information from this area can
be trusted.
Self-authenticating information are for example the
| |
| getVersion | back to summary |
|---|---|
| public int getVersion() Return the OpenPGP version number for this signature.
| |
| hasSubpackets | back to summary |
|---|---|
| public boolean hasSubpackets() Return true if the signature has either hashed or unhashed subpackets.
| |
| init | back to summary |
|---|---|
| public void init(PGPContentVerifierBuilderProvider verifierBuilderProvider, PGPPublicKey pubKey) throws PGPException Initialize the signature for verification.
| |
| init | back to summary |
|---|---|
| pack-priv void init(PGPContentVerifier verifier) throws PGPException | |
| isCertification | back to summary |
|---|---|
| public boolean isCertification() Return true if this signature represents a certification.
| |
| isCertification | back to summary |
|---|---|
| public static boolean isCertification(int signatureType) Return true if the passed in signature type represents a certification, false if the signature type is not.
| |
| isSignatureEncodingEqual | back to summary |
|---|---|
| public static boolean isSignatureEncodingEqual(PGPSignature sig1, PGPSignature sig2) Return true, if the cryptographic signature encoding of the two signatures match.
| |
| join | back to summary |
|---|---|
| public static PGPSignature join(PGPSignature sig1, PGPSignature sig2) throws PGPException Join two copies of the same signature.
As an entity might append additional information to an existing signatures unhashed subpacket area
(e.g. an embedded
| |
| updateWithSalt | back to summary |
|---|---|
| private void updateWithSalt() throws PGPException | |
| verify | back to summary |
|---|---|
| public boolean verify() throws PGPException Finish the verification and return true if the signature is "correct". Note The fact that this method returned truedoes not yet mean that the signature is valid. A correct signature may very well be expired, the issuer key may be revoked, etc. All these constraints are not checked by this method.
| |
| verifyCertification | back to summary |
|---|---|
| public boolean verifyCertification(PGPUserAttributeSubpacketVector userAttributes, PGPPublicKey key) throws PGPException Verify the signature as certifying the passed in public key as associated with the passed in user attributes.
| |
| verifyCertification | back to summary |
|---|---|
| public boolean verifyCertification(String id, PGPPublicKey key) throws PGPException Verify the signature as certifying the passed in public key as associated with the passed in id.
| |
| verifyCertification | back to summary |
|---|---|
| public boolean verifyCertification(byte[] rawID, PGPPublicKey key) throws PGPException Verify the signature as certifying the passed in public key as associated with the passed in rawID.
| |
| verifyCertification | back to summary |
|---|---|
| public boolean verifyCertification(PGPPublicKey masterKey, PGPPublicKey pubKey) throws PGPException Verify a certification for the passed in key against the passed in master key.
| |
| verifyCertification | back to summary |
|---|---|
| public boolean verifyCertification(PGPPublicKey pubKey) throws PGPException Verify a key certification, such as a revocation, for the passed in key.
| |