tink-crypto
Version:
A multi-language, cross-platform library that provides cryptographic APIs that are secure, easy to use correctly, and hard(er) to misuse.
48 lines (47 loc) • 1.49 kB
TypeScript
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { PbKeyTemplate } from '../internal/proto';
/**
* Pre-generated KeyTemplates for keys for hybrid encryption.
*
* One can use these templates to generate new Keyset with
* KeysetHandle.generateNew method. To generate a new keyset that contains a
* single EciesAeadHkdfKey, one can do:
*
* HybridConfig.Register();
* KeysetHandle handle = KeysetHandle.generateNew(
* HybridKeyTemplates.eciesP256HkdfHmacSha256Aes128Gcm());
*
* @final
*/
export declare class HybridKeyTemplates {
/**
* Returns 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
* OutputPrefixType: TINK
*
*/
static eciesP256HkdfHmacSha256Aes128Gcm(): PbKeyTemplate;
/**
* Returns a KeyTemplate that generates new instances of
* EciesAeadHkdfPrivateKey with the following parameters:
*
* KEM: ECDH over NIST P-256
* DEM: AES128-CTR-HMAC-SHA256 with
* - 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
* OutputPrefixType: TINK
*
*/
static eciesP256HkdfHmacSha256Aes128CtrHmacSha256(): PbKeyTemplate;
}