public final class StreamingAeadKeyTemplates extends Object
KeyTemplate for StreamingAead keys.
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 = StreamingAeadFactory.getPrimitive(handle);
| Modifier and Type | Field and Description |
|---|---|
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_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_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_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
|
| Constructor and Description |
|---|
StreamingAeadKeyTemplates() |
| 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 AES256_CTR_HMAC_SHA256_4KB
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 AES256_GCM_HKDF_4KB
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.