Package com.amazonaws.encryptionsdk.internal


package com.amazonaws.encryptionsdk.internal
Contains the internal classes that handle the cryptographic defined by the message formats and algorithms. The package also includes auxiliary classes that implement serialization of encryption context, parser for deserializing bytes into primitives, and generation of random bytes.

No classes in this package are intended for public consumption. They may be changed at any time without concern for API compatibility.

  • the CryptoHandler interface that defines the contract for the methods that must be implemented by classes that perform encryption and decryption in this library.
  • the EncryptionHandler and DecryptionHandler classes handle the creation and parsing of the ciphertext headers as described in the message format. These two classes delegate the actual encryption and decryption of content to the Block and Frame handlers.
  • the BlockEncryptionHandler and BlockDecryptionHandler classes handle the encryption and decryption of content stored as a single-block as described in the message format.
  • the FrameEncryptionHandler and FrameDecryptionHandler classes handle the encryption and decryption of content stored as frames as described in the message format.
  • the CipherHandler that provides methods to cryptographically transform bytes using a block cipher. Currently, it only uses AES-GCM block cipher.
  • the EncContextSerializer provides methods to serialize a map containing the encryption context into bytes, and deserialize bytes into a map containing the encryption context.
  • the PrimitivesParser provides methods to parse primitive types from bytes. These methods are used by deserialization code.
  • the ContentAadGenerator provides methods to generate the Additional Authenticated Data (AAD) used in encrypting the content.
  • the Constants class that contains the constants and default values used in the library.