Class PGPSessionKeyEncryptedData
java.lang.Object
org.bouncycastle.openpgp.PGPEncryptedData
org.bouncycastle.openpgp.PGPSymmetricKeyEncryptedData
org.bouncycastle.openpgp.PGPSessionKeyEncryptedData
- All Implemented Interfaces:
AEADAlgorithmTags, SymmetricKeyAlgorithmTags
The basis of PGP encrypted data - encrypted data encrypted using a symmetric session key.
-
Nested Class Summary
Nested classes/interfaces inherited from class PGPEncryptedData
PGPEncryptedData.TruncatedStream -
Field Summary
Fields inherited from interface AEADAlgorithmTags
EAX, GCM, OCBFields inherited from interface SymmetricKeyAlgorithmTags
AES_128, AES_192, AES_256, BLOWFISH, CAMELLIA_128, CAMELLIA_192, CAMELLIA_256, CAST5, DES, IDEA, NULL, SAFER, TRIPLE_DES, TWOFISH -
Method Summary
Modifier and TypeMethodDescriptionintReturn the symmetric encryption algorithm that is used by the packet.getDataStream(SessionKeyDataDecryptorFactory dataDecryptorFactory) intReturn the version number of the Encrypted Session Key Packet.protected booleanWhether the legacy CFB "quick check" on the two repeated prefix bytes of a SEIPD v1 (or SED) packet is applied when this data is decrypted.Methods inherited from class PGPSymmetricKeyEncryptedData
createDecryptionStreamMethods inherited from class PGPEncryptedData
getEncData, getInputStream, isAEAD, isIntegrityProtected, verify
-
Method Details
-
getAlgorithm
public int getAlgorithm()Description copied from class:PGPEncryptedDataReturn the symmetric encryption algorithm that is used by the packet.- Overrides:
getAlgorithmin classPGPEncryptedData- Returns:
- algorithm
-
getVersion
public int getVersion()Description copied from class:PGPEncryptedDataReturn the version number of the Encrypted Session Key Packet.- Overrides:
getVersionin classPGPEncryptedData- Returns:
- version
-
getDataStream
public InputStream getDataStream(SessionKeyDataDecryptorFactory dataDecryptorFactory) throws PGPException - Throws:
PGPException
-
useQuickCheck
protected boolean useQuickCheck()Description copied from class:PGPSymmetricKeyEncryptedDataWhether the legacy CFB "quick check" on the two repeated prefix bytes of a SEIPD v1 (or SED) packet is applied when this data is decrypted. Reporting a mismatch is what lets a wrong passphrase be detected - and the stream rewound to try the next SKESK packet - so the password-based path keeps it, while a session key recovered from a public key operation suppresses it: there the report is the Mister-Zuccherato oracle on the CFB prefix and the MDC is the integrity check. Overridden byPGPSessionKeyEncryptedData, where the caller states which kind of session key it holds.- Overrides:
useQuickCheckin classPGPSymmetricKeyEncryptedData- Returns:
- true if a quick check mismatch should be reported, false if it should be ignored.
-