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.
78 lines (77 loc) • 2.26 kB
TypeScript
/**
* @license
* Copyright 2023 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { PbKeyTemplate } from '../../../internal/proto';
/**
* Pre-generated KeyTemplates for keys for HPKE.
*
* One can use these templates to generate new Keyset with
* KeysetHandle.generateNew method. To generate a new keyset that contains a
* single HpkeKey, one can do:
*
* HybridConfig.Register();
* KeysetHandle handle = KeysetHandle.generateNew(
* hpkeP256HkdfSha256Aes128Gcm());
*/
/**
* Returns a KeyTemplate that generates new instances of
* HpkePrivateKey with the following parameters:
*
* KEM: DHKEM_P256_HKDF_SHA256
* KDF: HKDF_SHA256
* AEAD: AES_128_GCM
* OutputPrefixType: RAW
*/
export declare function hpkeP256HkdfSha256Aes128GcmRaw(): PbKeyTemplate;
/**
* Returns a KeyTemplate that generates new instances of
* HpkePrivateKey with the following parameters:
*
* KEM: DHKEM_P256_HKDF_SHA256
* KDF: HKDF_SHA256
* AEAD: AES_128_GCM
* OutputPrefixType: TINK
*/
export declare function hpkeP256HkdfSha256Aes128Gcm(): PbKeyTemplate;
/**
* Returns a KeyTemplate that generates new instances of
* HpkePrivateKey with the following parameters:
*
* KEM: DHKEM_P256_HKDF_SHA256
* KDF: HKDF_SHA256
* AEAD: AES_256_GCM
* OutputPrefixType: RAW
*/
export declare function hpkeP256HkdfSha256Aes256GcmRaw(): PbKeyTemplate;
/**
* Returns a KeyTemplate that generates new instances of
* HpkePrivateKey with the following parameters:
*
* KEM: DHKEM_P256_HKDF_SHA256
* KDF: HKDF_SHA256
* AEAD: AES_256_GCM
* OutputPrefixType: TINK
*/
export declare function hpkeP256HkdfSha256Aes256Gcm(): PbKeyTemplate;
/**
* Returns a KeyTemplate that generates new instances of
* HpkePrivateKey with the following parameters:
*
* KEM: DHKEM_P521_HKDF_SHA512
* KDF: HKDF_SHA256
* AEAD: AES_256_GCM
* OutputPrefixType: RAW
*/
export declare function hpkeP521HkdfSha512Aes256GcmRaw(): PbKeyTemplate;
/**
* Returns a KeyTemplate that generates new instances of
* HpkePrivateKey with the following parameters:
*
* KEM: DHKEM_P521_HKDF_SHA512
* KDF: HKDF_SHA256
* AEAD: AES_256_GCM
* OutputPrefixType: TINK
*/
export declare function hpkeP521HkdfSha512Aes256Gcm(): PbKeyTemplate;