| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private int | |
| private byte[] | |
| private PublicKeyPacket | |
| private S2K | |
| private int | |
| private byte[] | |
| public static final int | USAGE_AEAD
S2K-usage octet indicating that the secret key material is protected using an AEAD scheme. |
| public static final int | USAGE_CHECKSUM
Deprecated
Use of MalleableCFB is deprecated.
S2K-usage octet indicating that the secret key material is protected using malleable CFB.
|
| public static final int | USAGE_NONE
S2K-usage octet indicating that the secret key material is unprotected. |
| public static final int | USAGE_SHA1
S2K-usage octet indicating that the secret key material is protected using a cipher in CFB mode. |
| Access | Constructor and Description |
|---|---|
| pack-priv | SecretKeyPacket(BCPGInputStream
packet input stream in)Parse a primary OpenPGP secret key packet from the given OpenPGP |
| pack-priv | SecretKeyPacket(BCPGInputStream
packet input stream in, boolean current or legacy packet format newPacketFormat)Parse a primary OpenPGP secret key packet from the given OpenPGP |
| pack-priv | SecretKeyPacket(int
packet type ID keyTag, BCPGInputStream packet input stream in)Parse a |
| pack-priv | SecretKeyPacket(int
packet type ID keyTag, BCPGInputStream packet input stream in, boolean packet format newPacketFormat)Parse a |
| public | SecretKeyPacket(PublicKeyPacket
pubkey packet corresponding to this secret key packet. pubKeyPacket, int algorithm id of the symmetric key algorithm that was used to encrypt the secret key material encAlgorithm, S2K s2k identifier for deriving a key from a passphrase s2k, byte[] IV that was used to encrypt the secret key material iv, byte[] encrypted/checksum'd secret key material secKeyData)Construct a |
| pack-priv | SecretKeyPacket(int
packet type ID keyTag, PublicKeyPacket pubkey packet corresponding to this secret key packet. pubKeyPacket, int algorithm id of the symmetric key algorithm that was used to encrypt the secret key material encAlgorithm, S2K s2k identifier for deriving a key from a passphrase s2k, byte[] IV that was used to encrypt the secret key material iv, byte[] encrypted/checksum'd secret key material secKeyData)Construct a |
| public | SecretKeyPacket(PublicKeyPacket
pubkey packet corresponding to this secret key packet. pubKeyPacket, int algorithm id of the symmetric key algorithm that was used to encrypt the secret key material encAlgorithm, int octet indicating, how the secert key material was protected s2kUsage, S2K s2k identifier for deriving a key from a passphrase s2k, byte[] IV that was used to encrypt the secret key material iv, byte[] encrypted/checksum'd secret key material secKeyData)Construct a |
| public | SecretKeyPacket(PublicKeyPacket
pubkey packet corresponding to this secret key packet. pubKeyPacket, int algorithm id of the symmetric key algorithm that was used to encrypt the secret key material encAlgorithm, int AEAD algorithm scheme used to protect the secret key material with aeadAlgorithm, int octet indicating how the secret key material was encrypted s2kUsage, S2K s2k identifier for deriving a key from a passphrase s2k, byte[] IV that was used to encrypt the secret key material iv, byte[] encrypted/checksum'd secret key material secKeyData)Construct a |
| pack-priv | SecretKeyPacket(int
packet type ID keyTag, PublicKeyPacket pubkey packet corresponding to this secret key packet. pubKeyPacket, int algorithm id of the symmetric key algorithm that was used to encrypt the secret key material encAlgorithm, int AEAD algorithm scheme used to protect the secret key material with aeadAlgorithm, int octet indicating how the secret key material was encrypted s2kUsage, S2K s2k identifier for deriving a key from a passphrase s2k, byte[] IV that was used to encrypt the secret key material iv, byte[] encrypted/checksum'd secret key material secKeyData)Construct a |
| Modifier and Type | Method and Description |
|---|---|
| public void | encode(BCPGOutputStream
packet output stream out)Implements abstract org. Encode the packet into the given |
| private byte[] | |
| public int | Returns: aead algorithm idReturn the algorithm ID of the AEAD algorithm that was used to protect the secret key material. |
| public int | Returns: symmetric key enc algorithm idReturn the algorithm ID of the symmetric key algorithm that was used to encrypt the secret key material. |
| public byte[] | Returns: encoded packet contentsReturn the encoded packet content without packet frame. |
| public byte[] | |
| public PublicKeyPacket | Returns: public key packetReturn the public key packet corresponding to the secret key packet. |
| public S2K | Returns: s2k identifierReturn the S2K identifier describing, how to derive the symmetric key to protect the secret key material with. |
| public int | Returns: s2k usageReturn the S2K usage mode indicating how the secret key material is protected. |
| public byte[] |
| aeadAlgorithm | back to summary |
|---|---|
| private int aeadAlgorithm | |
| encAlgorithm | back to summary |
|---|---|
| private int encAlgorithm | |
| iv | back to summary |
|---|---|
| private byte[] iv | |
| pubKeyPacket | back to summary |
|---|---|
| private PublicKeyPacket pubKeyPacket | |
| s2k | back to summary |
|---|---|
| private S2K s2k | |
| s2kUsage | back to summary |
|---|---|
| private int s2kUsage | |
| secKeyData | back to summary |
|---|---|
| private byte[] secKeyData | |
| USAGE_AEAD | back to summary |
|---|---|
| public static final int USAGE_AEAD S2K-usage octet indicating that the secret key material is protected using an AEAD scheme. This usage protects against above-mentioned attacks. Passphrase-protected secret key material in a v6 Secret Key or v6 Secret Subkey packet SHOULD be protected with AEAD encryption unless it will be transferred to an implementation that is known to not support AEAD. Users should migrate to AEAD with all due speed. | |
| USAGE_CHECKSUM | back to summary |
|---|---|
| public static final int USAGE_CHECKSUM
Deprecated Use of MalleableCFB is deprecated.
For v4 keys, use S2K-usage octet indicating that the secret key material is protected using malleable CFB. Malleable-CFB-encrypted keys are vulnerable to corruption attacks that can cause leakage of secret data when the secret key is used. | |
| USAGE_NONE | back to summary |
|---|---|
| public static final int USAGE_NONE S2K-usage octet indicating that the secret key material is unprotected. | |
| USAGE_SHA1 | back to summary |
|---|---|
| public static final int USAGE_SHA1 S2K-usage octet indicating that the secret key material is protected using a cipher in CFB mode. CFB-encrypted keys are vulnerable to corruption attacks that can cause leakage of secret data when the secret key is use. | |
| SecretKeyPacket | back to summary |
|---|---|
| pack-priv SecretKeyPacket(BCPGInputStream in) throws IOException Parse a primary OpenPGP secret key packet from the given OpenPGP
| |
| SecretKeyPacket | back to summary |
|---|---|
| pack-priv SecretKeyPacket(BCPGInputStream in, boolean newPacketFormat) throws IOException Parse a primary OpenPGP secret key packet from the given OpenPGP newPacketFormatis true, the packet format will be remembered as PacketFormat#CURRENT,
otherwise as PacketFormat#LEGACY.
| |
| SecretKeyPacket | back to summary |
|---|---|
| pack-priv SecretKeyPacket(int keyTag, BCPGInputStream in) throws IOException Parse a keyTag: PacketTags#SECRET_KEY means the result is a SecretKeyPacket.
PacketTags#SECRET_SUBKEY results in a SecretSubkeyPacket.
The packet format will be remembered as PacketFormat#LEGACY.
| |
| SecretKeyPacket | back to summary |
|---|---|
| pack-priv SecretKeyPacket(int keyTag, BCPGInputStream in, boolean newPacketFormat) throws IOException Parse a keyTag: PacketTags#SECRET_KEY means the result is a SecretKeyPacket.
PacketTags#SECRET_SUBKEY results in a SecretSubkeyPacket.
| |
| SecretKeyPacket | back to summary |
|---|---|
| public SecretKeyPacket(PublicKeyPacket pubKeyPacket, int encAlgorithm, S2K s2k, byte[] iv, byte[] secKeyData) Construct a Note secKeyDataneeds to be prepared by applying encryption/checksum beforehand.
| |
| SecretKeyPacket | back to summary |
|---|---|
| pack-priv SecretKeyPacket(int keyTag, PublicKeyPacket pubKeyPacket, int encAlgorithm, S2K s2k, byte[] iv, byte[] secKeyData) Construct a Note secKeyDataneeds to be prepared by applying encryption/checksum beforehand.
| |
| SecretKeyPacket | back to summary |
|---|---|
| public SecretKeyPacket(PublicKeyPacket pubKeyPacket, int encAlgorithm, int s2kUsage, S2K s2k, byte[] iv, byte[] secKeyData) Construct a Note secKeyDataneeds to be prepared by applying encryption/checksum beforehand.
| |
| SecretKeyPacket | back to summary |
|---|---|
| public SecretKeyPacket(PublicKeyPacket pubKeyPacket, int encAlgorithm, int aeadAlgorithm, int s2kUsage, S2K s2k, byte[] iv, byte[] secKeyData) Construct a Note secKeyDataneeds to be prepared by applying encryption/checksum beforehand.
| |
| SecretKeyPacket | back to summary |
|---|---|
| pack-priv SecretKeyPacket(int keyTag, PublicKeyPacket pubKeyPacket, int encAlgorithm, int aeadAlgorithm, int s2kUsage, S2K s2k, byte[] iv, byte[] secKeyData) Construct a Note secKeyDataneeds to be prepared by applying encryption/checksum beforehand.
| |
| encode | back to summary |
|---|---|
| public void encode(BCPGOutputStream out) throws IOException Implements abstract org. Encode the packet into the given
| |
| encodeConditionalParameters | back to summary |
|---|---|
| private byte[] encodeConditionalParameters() throws IOException | |
| getAeadAlgorithm | back to summary |
|---|---|
| public int getAeadAlgorithm() Return the algorithm ID of the AEAD algorithm that was used to protect the secret key material.
| |
| getEncAlgorithm | back to summary |
|---|---|
| public int getEncAlgorithm() Return the algorithm ID of the symmetric key algorithm that was used to encrypt the secret key material.
| |
| getEncodedContents | back to summary |
|---|---|
| public byte[] getEncodedContents() throws IOException Return the encoded packet content without packet frame.
| |
| getIV | back to summary |
|---|---|
| public byte[] getIV() Return the IV that was used to protect the secret key material.
| |
| getPublicKeyPacket | back to summary |
|---|---|
| public PublicKeyPacket getPublicKeyPacket() Return the public key packet corresponding to the secret key packet.
| |
| getS2K | back to summary |
|---|---|
| public S2K getS2K() Return the S2K identifier describing, how to derive the symmetric key to protect the secret key material with.
| |
| getS2KUsage | back to summary |
|---|---|
| public int getS2KUsage() Return the S2K usage mode indicating how the secret key material is protected.
| |
| getSecretKeyData | back to summary |
|---|---|
| public byte[] getSecretKeyData() Return the encrypted/checksum'd secret key data.
| |