Class PGPSessionKeyEncryptedData

All Implemented Interfaces:
AEADAlgorithmTags, SymmetricKeyAlgorithmTags

public class PGPSessionKeyEncryptedData extends PGPSymmetricKeyEncryptedData
The basis of PGP encrypted data - encrypted data encrypted using a symmetric session key.
  • Method Details

    • getAlgorithm

      public int getAlgorithm()
      Description copied from class: PGPEncryptedData
      Return the symmetric encryption algorithm that is used by the packet.
      Overrides:
      getAlgorithm in class PGPEncryptedData
      Returns:
      algorithm
    • getVersion

      public int getVersion()
      Description copied from class: PGPEncryptedData
      Return the version number of the Encrypted Session Key Packet.
      Overrides:
      getVersion in class PGPEncryptedData
      Returns:
      version
    • getDataStream

      public InputStream getDataStream(SessionKeyDataDecryptorFactory dataDecryptorFactory) throws PGPException
      Throws:
      PGPException
    • useQuickCheck

      protected boolean useQuickCheck()
      Description copied from class: PGPSymmetricKeyEncryptedData
      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.
      Overrides:
      useQuickCheck in class PGPSymmetricKeyEncryptedData
      Returns:
      true if a quick check mismatch should be reported, false if it should be ignored.