@Deprecated public final class HybridKeyTemplates extends Object
KeyTemplate for HybridDecrypt and HybridEncrypt primitives.
One can use these templates to generate new Keyset with
KeysetHandle#generateNew. To generate a new keyset that contains a single EciesAeadHkdfPrivateKey, one can do:
Config.register(HybridConfig.TINK_1_0_0);
KeysetHandle handle = KeysetHandle.generateNew(
HybridKeyTemplates.ECIES_P256_HKDF_HMAC_SHA256_AES128_GCM);
HybridDecrypt decrypter = handle.getPrimitive(HybridDecrypt.class);
HybridEncrypt encrypter = handle.getPublicKeysetHandle().getPrimitive(HybridDecrypt.class);
| Modifier and Type | Field and Description |
|---|---|
static com.google.crypto.tink.proto.KeyTemplate |
ECIES_P256_HKDF_HMAC_SHA256_AES128_CTR_HMAC_SHA256
Deprecated.
A
KeyTemplate that generates new instances of EciesAeadHkdfPrivateKey with the following parameters:
KEM: ECDH over NIST P-256
DEM: AES128-CTR-HMAC-SHA256 with the following parameters
AES key size: 16 bytes
AES CTR IV size: 16 bytes
HMAC key size: 32 bytes
HMAC tag size: 16 bytes
KDF: HKDF-HMAC-SHA256 with an empty salt
|
static com.google.crypto.tink.proto.KeyTemplate |
ECIES_P256_HKDF_HMAC_SHA256_AES128_GCM
Deprecated.
A
KeyTemplate that generates new instances of EciesAeadHkdfPrivateKey with the following parameters:
KEM: ECDH over NIST P-256
DEM: AES128-GCM
KDF: HKDF-HMAC-SHA256 with an empty salt
|
static com.google.crypto.tink.proto.KeyTemplate |
ECIES_P256_HKDF_HMAC_SHA256_AES128_GCM_COMPRESSED_WITHOUT_PREFIX
Deprecated.
A
KeyTemplate that generates new instances of EciesAeadHkdfPrivateKey with the following parameters:
KEM: ECDH over NIST P-256
DEM: AES128-GCM
KDF: HKDF-HMAC-SHA256 with an empty salt
EC Point Format: Compressed
OutputPrefixType: RAW
|
| Constructor and Description |
|---|
HybridKeyTemplates()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static com.google.crypto.tink.proto.KeyTemplate |
createEciesAeadHkdfKeyTemplate(com.google.crypto.tink.proto.EllipticCurveType curve,
com.google.crypto.tink.proto.HashType hashType,
com.google.crypto.tink.proto.EcPointFormat ecPointFormat,
com.google.crypto.tink.proto.KeyTemplate demKeyTemplate,
com.google.crypto.tink.proto.OutputPrefixType outputPrefixType,
byte[] salt)
Deprecated.
|
static com.google.crypto.tink.proto.EciesAeadHkdfParams |
createEciesAeadHkdfParams(com.google.crypto.tink.proto.EllipticCurveType curve,
com.google.crypto.tink.proto.HashType hashType,
com.google.crypto.tink.proto.EcPointFormat ecPointFormat,
com.google.crypto.tink.proto.KeyTemplate demKeyTemplate,
byte[] salt)
Deprecated.
|
public static final com.google.crypto.tink.proto.KeyTemplate ECIES_P256_HKDF_HMAC_SHA256_AES128_GCM
KeyTemplate that generates new instances of EciesAeadHkdfPrivateKey with the following parameters:
Unlike other key templates that use AES-GCM, the instances of HybridDecrypt
generated by this key template has no limitation on Android KitKat (API level 19). They might
not work in older versions though.
public static final com.google.crypto.tink.proto.KeyTemplate ECIES_P256_HKDF_HMAC_SHA256_AES128_GCM_COMPRESSED_WITHOUT_PREFIX
KeyTemplate that generates new instances of EciesAeadHkdfPrivateKey with the following parameters:
Unlike other key templates that use AES-GCM, the instances of HybridDecrypt
generated by this key template has no limitation on Android KitKat (API level 19). They might
not work in older versions though.
public static final com.google.crypto.tink.proto.KeyTemplate ECIES_P256_HKDF_HMAC_SHA256_AES128_CTR_HMAC_SHA256
KeyTemplate that generates new instances of EciesAeadHkdfPrivateKey with the following parameters:
public static com.google.crypto.tink.proto.KeyTemplate createEciesAeadHkdfKeyTemplate(com.google.crypto.tink.proto.EllipticCurveType curve,
com.google.crypto.tink.proto.HashType hashType,
com.google.crypto.tink.proto.EcPointFormat ecPointFormat,
com.google.crypto.tink.proto.KeyTemplate demKeyTemplate,
com.google.crypto.tink.proto.OutputPrefixType outputPrefixType,
byte[] salt)
KeyTemplate containing a EciesAeadHkdfKeyFormat.public static com.google.crypto.tink.proto.EciesAeadHkdfParams createEciesAeadHkdfParams(com.google.crypto.tink.proto.EllipticCurveType curve,
com.google.crypto.tink.proto.HashType hashType,
com.google.crypto.tink.proto.EcPointFormat ecPointFormat,
com.google.crypto.tink.proto.KeyTemplate demKeyTemplate,
byte[] salt)
EciesAeadHkdfParams with the specified parameters.