@Deprecated public final class AeadKeyTemplates extends Object
KeyTemplate for Aead keys.
One can use these templates to generate new Keyset with
KeysetHandle.generateNew(com.google.crypto.tink.proto.KeyTemplate). To generate a new keyset that contains a
single AesGcmKey, one can do:
Config.register(AeadConfig.TINK_1_1_0);
KeysetHandle handle = KeysetHandle.generateNew(AeadKeyTemplates.AES128_GCM);
Aead aead = handle.getPrimitive(Aead.class);
| Modifier and Type | Field and Description |
|---|---|
static com.google.crypto.tink.proto.KeyTemplate |
AES128_CTR_HMAC_SHA256
Deprecated.
A
KeyTemplate that generates new instances of AesCtrHmacAeadKey with the following parameters:
AES key size: 16 bytes
AES CTR IV size: 16 byte
HMAC key size: 32 bytes
HMAC tag size: 16 bytes
HMAC hash function: SHA256
|
static com.google.crypto.tink.proto.KeyTemplate |
AES128_EAX
Deprecated.
A
KeyTemplate that generates new instances of com.google.crypto.tink.proto.AesEaxKey with the following parameters:
Key size: 16 bytes
IV size: 16 bytes
|
static com.google.crypto.tink.proto.KeyTemplate |
AES128_GCM
Deprecated.
A
KeyTemplate that generates new instances of AesGcmKey with the following parameters:
Key size: 16 bytes
|
static com.google.crypto.tink.proto.KeyTemplate |
AES256_CTR_HMAC_SHA256
Deprecated.
A
KeyTemplate that generates new instances of AesCtrHmacAeadKey with the following parameters:
AES key size: 32 bytes
AES CTR IV size: 16 byte
HMAC key size: 32 bytes
HMAC tag size: 32 bytes
HMAC hash function: SHA256
|
static com.google.crypto.tink.proto.KeyTemplate |
AES256_EAX
Deprecated.
A
KeyTemplate that generates new instances of AesEaxKey with the following parameters:
Key size: 32 bytes
IV size: 16 bytes
|
static com.google.crypto.tink.proto.KeyTemplate |
AES256_GCM
Deprecated.
A
KeyTemplate that generates new instances of AesGcmKey with the following parameters:
Key size: 32 bytes
|
static com.google.crypto.tink.proto.KeyTemplate |
CHACHA20_POLY1305
Deprecated.
A
KeyTemplate that generates new instances of ChaCha20Poly1305Key. |
static com.google.crypto.tink.proto.KeyTemplate |
XCHACHA20_POLY1305
Deprecated.
A
KeyTemplate that generates new instances of XChaCha20Poly1305Key. |
| Constructor and Description |
|---|
AeadKeyTemplates()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static com.google.crypto.tink.proto.KeyTemplate |
createAesCtrHmacAeadKeyTemplate(int aesKeySize,
int ivSize,
int hmacKeySize,
int tagSize,
com.google.crypto.tink.proto.HashType hashType)
Deprecated.
|
static com.google.crypto.tink.proto.KeyTemplate |
createAesEaxKeyTemplate(int keySize,
int ivSize)
Deprecated.
|
static com.google.crypto.tink.proto.KeyTemplate |
createAesGcmKeyTemplate(int keySize)
Deprecated.
|
static com.google.crypto.tink.proto.KeyTemplate |
createKmsAeadKeyTemplate(String keyUri)
Deprecated.
|
static com.google.crypto.tink.proto.KeyTemplate |
createKmsEnvelopeAeadKeyTemplate(String kekUri,
com.google.crypto.tink.proto.KeyTemplate dekTemplate)
Deprecated.
|
public static final com.google.crypto.tink.proto.KeyTemplate AES128_GCM
KeyTemplate that generates new instances of AesGcmKey with the following parameters:
On Android KitKat (API level 19), the Aead instance generated
by this key template does not support associated data. It might not work at all in older
versions.
public static final com.google.crypto.tink.proto.KeyTemplate AES256_GCM
KeyTemplate that generates new instances of AesGcmKey with the following parameters:
On Android KitKat (API level 19), the Aead instance generated
by this key template does not support associated data. It might not work at all in older
versions.
public static final com.google.crypto.tink.proto.KeyTemplate AES128_EAX
KeyTemplate that generates new instances of com.google.crypto.tink.proto.AesEaxKey with the following parameters:
public static final com.google.crypto.tink.proto.KeyTemplate AES256_EAX
KeyTemplate that generates new instances of AesEaxKey with the following parameters:
public static final com.google.crypto.tink.proto.KeyTemplate AES128_CTR_HMAC_SHA256
KeyTemplate that generates new instances of AesCtrHmacAeadKey with the following parameters:
public static final com.google.crypto.tink.proto.KeyTemplate AES256_CTR_HMAC_SHA256
KeyTemplate that generates new instances of AesCtrHmacAeadKey with the following parameters:
public static final com.google.crypto.tink.proto.KeyTemplate CHACHA20_POLY1305
KeyTemplate that generates new instances of ChaCha20Poly1305Key.public static final com.google.crypto.tink.proto.KeyTemplate XCHACHA20_POLY1305
KeyTemplate that generates new instances of XChaCha20Poly1305Key.public static com.google.crypto.tink.proto.KeyTemplate createAesGcmKeyTemplate(int keySize)
KeyTemplate containing a AesGcmKeyFormat with some specified
parameters.public static com.google.crypto.tink.proto.KeyTemplate createAesEaxKeyTemplate(int keySize,
int ivSize)
KeyTemplate containing a AesEaxKeyFormat with some specified
parameters.public static com.google.crypto.tink.proto.KeyTemplate createAesCtrHmacAeadKeyTemplate(int aesKeySize,
int ivSize,
int hmacKeySize,
int tagSize,
com.google.crypto.tink.proto.HashType hashType)
KeyTemplate containing a AesCtrHmacAeadKeyFormat with some specific
parameters.public static com.google.crypto.tink.proto.KeyTemplate createKmsAeadKeyTemplate(String keyUri)
KeyTemplate that can generate a KmsAeadKey pointing to keyUri.public static com.google.crypto.tink.proto.KeyTemplate createKmsEnvelopeAeadKeyTemplate(String kekUri, com.google.crypto.tink.proto.KeyTemplate dekTemplate)
KeyTemplate that can generate a KmsEnvelopeAeadKey whose KEK is pointing to kekUri
and DEK template is dekTemplate.