Class PGPSymmetricKeyEncryptedData

java.lang.Object
org.bouncycastle.openpgp.PGPEncryptedData
org.bouncycastle.openpgp.PGPSymmetricKeyEncryptedData
All Implemented Interfaces:
AEADAlgorithmTags, SymmetricKeyAlgorithmTags
Direct Known Subclasses:
PGPPBEEncryptedData, PGPSessionKeyEncryptedData

public class PGPSymmetricKeyEncryptedData extends PGPEncryptedData
  • Constructor Details

    • PGPSymmetricKeyEncryptedData

      protected PGPSymmetricKeyEncryptedData(InputStreamPacket encData)
  • Method Details

    • createDecryptionStream

      protected InputStream createDecryptionStream(PGPDataDecryptorFactory dataDecryptorFactory, PGPSessionKey sessionKey) throws PGPException
      Throws:
      PGPException
    • useQuickCheck

      protected boolean useQuickCheck()
      Whether 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 by PGPSessionKeyEncryptedData, where the caller states which kind of session key it holds.
      Returns:
      true if a quick check mismatch should be reported, false if it should be ignored.