Class CipherSpecs


  • public class CipherSpecs
    extends java.lang.Object
    Defines and identifies the application supported CipherSpecs.

    These cipher specs are used by the MultiCipherOutputStream to encrypt data, and by the MultiCipherInputStream to decrypt data. The cipher spec identifiers are used in the crypto format header to identify the crypto algorithms used for encryption.

    The class defines a well defined (and developer-approved) set of allowed cipher algorithms, modes and key sizes. The number of allowed ciphers is greatly restricted to follow the application-specific security standards. Most prominently, this includes:

    • The block cipher mode must be authenticated (GCM, EAX, etc.). Unauthenticated modes are not supported and will be rejected by the CipherSpec sanity checks.
    • The block cipher mode must require an initialization vector (IV). Modes that do not require an IV (e.g. ECB) will be rejected by the CipherSpec sanity checks.