public final class StreamingAeadKeyTemplates extends Object
KeyTemplate for StreamingAead keys.
We recommend to avoid this class in order to keep dependencies small.
Instead, we recommend to use KeysetHandle.generateEntryFromParametersName or KeysetHandle.generateEntryFromParameters.
One can use these templates to generate new Keyset with
KeysetHandle. To generate a new keyset that contains a AesGcmHkdfStreamingKey,
one can do:
Config.register(StreamingAeadConfig.TINK_1_0_0);
KeysetHandle handle = KeysetHandle.generateNew(StreamingAeadKeyTemplates.AES128_GCM_HKDF_4KB);
StreamingAead ags = handle.getPrimitive(StreamingAead.class);
| Modifier and Type | Field and Description |
|---|---|
static KeyTemplate |
AES128_CTR_HMAC_SHA256_1MB
A
KeyTemplate that generates new instances of AesCtrHmacStreamingKey with the following parameters:
Size of the main key: 16 bytes
HKDF algo: HMAC-SHA256
Size of AES-CTR derived keys: 16 bytes
Tag algo: HMAC-SHA256
Tag size: 32 bytes
Ciphertext segment size: 1048576 bytes (1 MB)
|
static KeyTemplate |
AES128_CTR_HMAC_SHA256_4KB
A
KeyTemplate that generates new instances of AesCtrHmacStreamingKey with the following parameters:
Size of the main key: 16 bytes
HKDF algo: HMAC-SHA256
Size of AES-CTR derived keys: 16 bytes
Tag algo: HMAC-SHA256
Tag size: 32 bytes
Ciphertext segment size: 4096
|
static KeyTemplate |
AES128_GCM_HKDF_1MB
A
KeyTemplate that generates new instances of AesGcmHkdfStreamingKey with the following parameters:
Size of the main key: 16 bytes
HKDF algo: HMAC-SHA256
Size of AES-GCM derived keys: 16 bytes
Ciphertext segment size: 1048576 bytes (1 MB)
|
static KeyTemplate |
AES128_GCM_HKDF_4KB
A
KeyTemplate that generates new instances of AesGcmHkdfStreamingKey with the following parameters:
Size of the main key: 16 bytes
HKDF algo: HMAC-SHA256
Size of AES-GCM derived keys: 16 bytes
Ciphertext segment size: 4096 bytes
|
static KeyTemplate |
AES256_CTR_HMAC_SHA256_1MB
A
KeyTemplate that generates new instances of AesCtrHmacStreamingKey with the following parameters:
Size of the main key: 32 bytes
HKDF algo: HMAC-SHA256
Size of AES-CTR derived keys: 32 bytes
Tag algo: HMAC-SHA256
Tag size: 32 bytes
Ciphertext segment size: 1048576 bytes (1 MB)
|
static KeyTemplate |
AES256_CTR_HMAC_SHA256_4KB
A
KeyTemplate that generates new instances of AesCtrHmacStreamingKey with the following parameters:
Size of the main key: 32 bytes
HKDF algo: HMAC-SHA256
Size of AES-CTR derived keys: 32 bytes
Tag algo: HMAC-SHA256
Tag size: 32 bytes
Ciphertext segment size: 4096
|
static KeyTemplate |
AES256_GCM_HKDF_1MB
A
KeyTemplate that generates new instances of AesGcmHkdfStreamingKey with the following parameters:
Size of the main key: 32 bytes
HKDF algo: HMAC-SHA256
Size of AES-GCM derived keys: 32 bytes
Ciphertext segment size: 1048576 bytes (1 MB)
|
static KeyTemplate |
AES256_GCM_HKDF_4KB
A
KeyTemplate that generates new instances of AesGcmHkdfStreamingKey with the following parameters:
Size of the main key: 32 bytes
HKDF algo: HMAC-SHA256
Size of AES-GCM derived keys: 32 bytes
Ciphertext segment size: 4096 bytes
|
| Modifier and Type | Method and Description |
|---|---|
static KeyTemplate |
createAesCtrHmacStreamingKeyTemplate(int mainKeySize,
HashType hkdfHashType,
int derivedKeySize,
HashType macHashType,
int tagSize,
int ciphertextSegmentSize) |
static KeyTemplate |
createAesGcmHkdfStreamingKeyTemplate(int mainKeySize,
HashType hkdfHashType,
int derivedKeySize,
int ciphertextSegmentSize) |
public static final KeyTemplate AES128_CTR_HMAC_SHA256_4KB
KeyTemplate that generates new instances of AesCtrHmacStreamingKey with the following parameters:
public static final KeyTemplate AES128_CTR_HMAC_SHA256_1MB
KeyTemplate that generates new instances of AesCtrHmacStreamingKey with the following parameters:
public static final KeyTemplate AES256_CTR_HMAC_SHA256_4KB
KeyTemplate that generates new instances of AesCtrHmacStreamingKey with the following parameters:
public static final KeyTemplate AES256_CTR_HMAC_SHA256_1MB
KeyTemplate that generates new instances of AesCtrHmacStreamingKey with the following parameters:
public static final KeyTemplate AES128_GCM_HKDF_4KB
KeyTemplate that generates new instances of AesGcmHkdfStreamingKey with the following parameters:
public static final KeyTemplate AES128_GCM_HKDF_1MB
KeyTemplate that generates new instances of AesGcmHkdfStreamingKey with the following parameters:
public static final KeyTemplate AES256_GCM_HKDF_4KB
KeyTemplate that generates new instances of AesGcmHkdfStreamingKey with the following parameters:
public static final KeyTemplate AES256_GCM_HKDF_1MB
KeyTemplate that generates new instances of AesGcmHkdfStreamingKey with the following parameters:
public static KeyTemplate createAesCtrHmacStreamingKeyTemplate(int mainKeySize, HashType hkdfHashType, int derivedKeySize, HashType macHashType, int tagSize, int ciphertextSegmentSize)
KeyTemplate containing a AesCtrHmacStreamingKeyFormat with some
specified parameters.public static KeyTemplate createAesGcmHkdfStreamingKeyTemplate(int mainKeySize, HashType hkdfHashType, int derivedKeySize, int ciphertextSegmentSize)
KeyTemplate containing a AesGcmHkdfStreamingKeyFormat
with some specified parameters.