Mirror of BoringSSL (grpc依赖)
https://boringssl.googlesource.com/boringssl
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
461 lines
17 KiB
461 lines
17 KiB
/* Copyright (c) 2020, Google Inc. |
|
* |
|
* Permission to use, copy, modify, and/or distribute this software for any |
|
* purpose with or without fee is hereby granted, provided that the above |
|
* copyright notice and this permission notice appear in all copies. |
|
* |
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY |
|
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION |
|
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN |
|
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ |
|
|
|
#include <assert.h> |
|
#include <string.h> |
|
|
|
#include <openssl/aead.h> |
|
#include <openssl/bytestring.h> |
|
#include <openssl/curve25519.h> |
|
#include <openssl/digest.h> |
|
#include <openssl/err.h> |
|
#include <openssl/evp_errors.h> |
|
#include <openssl/hkdf.h> |
|
#include <openssl/rand.h> |
|
#include <openssl/sha.h> |
|
|
|
#include "../internal.h" |
|
#include "internal.h" |
|
|
|
|
|
// This file implements draft-irtf-cfrg-hpke-08. |
|
|
|
struct evp_hpke_kdf_st { |
|
uint16_t id; |
|
// We only support HKDF-based KDFs. |
|
const EVP_MD *(*hkdf_md_func)(void); |
|
}; |
|
|
|
struct evp_hpke_aead_st { |
|
uint16_t id; |
|
const EVP_AEAD *(*aead_func)(void); |
|
}; |
|
|
|
#define KEM_CONTEXT_LEN (2 * X25519_PUBLIC_VALUE_LEN) |
|
|
|
static const char kHpkeVersionId[] = "HPKE-v1"; |
|
|
|
static int add_label_string(CBB *cbb, const char *label) { |
|
return CBB_add_bytes(cbb, (const uint8_t *)label, strlen(label)); |
|
} |
|
|
|
// The suite_id for the KEM is defined as concat("KEM", I2OSP(kem_id, 2)). Note |
|
// that the suite_id used outside of the KEM also includes the kdf_id and |
|
// aead_id. |
|
static const uint8_t kX25519SuiteID[] = { |
|
'K', 'E', 'M', EVP_HPKE_DHKEM_X25519_HKDF_SHA256 >> 8, |
|
EVP_HPKE_DHKEM_X25519_HKDF_SHA256 & 0x00ff}; |
|
|
|
static int hpke_labeled_extract(const EVP_MD *hkdf_md, uint8_t *out_key, |
|
size_t *out_len, const uint8_t *salt, |
|
size_t salt_len, const uint8_t *suite_id, |
|
size_t suite_id_len, const char *label, |
|
const uint8_t *ikm, size_t ikm_len) { |
|
// labeledIKM = concat("HPKE-v1", suite_id, label, IKM) |
|
CBB labeled_ikm; |
|
int ok = CBB_init(&labeled_ikm, 0) && |
|
add_label_string(&labeled_ikm, kHpkeVersionId) && |
|
CBB_add_bytes(&labeled_ikm, suite_id, suite_id_len) && |
|
add_label_string(&labeled_ikm, label) && |
|
CBB_add_bytes(&labeled_ikm, ikm, ikm_len) && |
|
HKDF_extract(out_key, out_len, hkdf_md, CBB_data(&labeled_ikm), |
|
CBB_len(&labeled_ikm), salt, salt_len); |
|
CBB_cleanup(&labeled_ikm); |
|
return ok; |
|
} |
|
|
|
static int hpke_labeled_expand(const EVP_MD *hkdf_md, uint8_t *out_key, |
|
size_t out_len, const uint8_t *prk, |
|
size_t prk_len, const uint8_t *suite_id, |
|
size_t suite_id_len, const char *label, |
|
const uint8_t *info, size_t info_len) { |
|
// labeledInfo = concat(I2OSP(L, 2), "HPKE-v1", suite_id, label, info) |
|
CBB labeled_info; |
|
int ok = CBB_init(&labeled_info, 0) && |
|
CBB_add_u16(&labeled_info, out_len) && |
|
add_label_string(&labeled_info, kHpkeVersionId) && |
|
CBB_add_bytes(&labeled_info, suite_id, suite_id_len) && |
|
add_label_string(&labeled_info, label) && |
|
CBB_add_bytes(&labeled_info, info, info_len) && |
|
HKDF_expand(out_key, out_len, hkdf_md, prk, prk_len, |
|
CBB_data(&labeled_info), CBB_len(&labeled_info)); |
|
CBB_cleanup(&labeled_info); |
|
return ok; |
|
} |
|
|
|
static int hpke_extract_and_expand(const EVP_MD *hkdf_md, uint8_t *out_key, |
|
size_t out_len, |
|
const uint8_t dh[X25519_PUBLIC_VALUE_LEN], |
|
const uint8_t kem_context[KEM_CONTEXT_LEN]) { |
|
uint8_t prk[EVP_MAX_MD_SIZE]; |
|
size_t prk_len; |
|
if (!hpke_labeled_extract(hkdf_md, prk, &prk_len, NULL, 0, kX25519SuiteID, |
|
sizeof(kX25519SuiteID), "eae_prk", dh, |
|
X25519_PUBLIC_VALUE_LEN)) { |
|
return 0; |
|
} |
|
if (!hpke_labeled_expand(hkdf_md, out_key, out_len, prk, prk_len, |
|
kX25519SuiteID, sizeof(kX25519SuiteID), |
|
"shared_secret", kem_context, KEM_CONTEXT_LEN)) { |
|
return 0; |
|
} |
|
return 1; |
|
} |
|
|
|
// This is strlen("HPKE") + 3 * sizeof(uint16_t). |
|
#define HPKE_SUITE_ID_LEN 10 |
|
|
|
// The suite_id for non-KEM pieces of HPKE is defined as concat("HPKE", |
|
// I2OSP(kem_id, 2), I2OSP(kdf_id, 2), I2OSP(aead_id, 2)). |
|
static int hpke_build_suite_id(const EVP_HPKE_CTX *hpke, |
|
uint8_t out[HPKE_SUITE_ID_LEN]) { |
|
CBB cbb; |
|
int ret = CBB_init_fixed(&cbb, out, HPKE_SUITE_ID_LEN) && |
|
add_label_string(&cbb, "HPKE") && |
|
CBB_add_u16(&cbb, EVP_HPKE_DHKEM_X25519_HKDF_SHA256) && |
|
CBB_add_u16(&cbb, hpke->kdf->id) && |
|
CBB_add_u16(&cbb, hpke->aead->id); |
|
CBB_cleanup(&cbb); |
|
return ret; |
|
} |
|
|
|
#define HPKE_MODE_BASE 0 |
|
|
|
static int hpke_key_schedule(EVP_HPKE_CTX *hpke, const uint8_t *shared_secret, |
|
size_t shared_secret_len, const uint8_t *info, |
|
size_t info_len) { |
|
uint8_t suite_id[HPKE_SUITE_ID_LEN]; |
|
if (!hpke_build_suite_id(hpke, suite_id)) { |
|
return 0; |
|
} |
|
|
|
// psk_id_hash = LabeledExtract("", "psk_id_hash", psk_id) |
|
// TODO(davidben): Precompute this value and store it with the EVP_HPKE_KDF. |
|
const EVP_MD *hkdf_md = hpke->kdf->hkdf_md_func(); |
|
uint8_t psk_id_hash[EVP_MAX_MD_SIZE]; |
|
size_t psk_id_hash_len; |
|
if (!hpke_labeled_extract(hkdf_md, psk_id_hash, &psk_id_hash_len, NULL, 0, |
|
suite_id, sizeof(suite_id), "psk_id_hash", NULL, |
|
0)) { |
|
return 0; |
|
} |
|
|
|
// info_hash = LabeledExtract("", "info_hash", info) |
|
uint8_t info_hash[EVP_MAX_MD_SIZE]; |
|
size_t info_hash_len; |
|
if (!hpke_labeled_extract(hkdf_md, info_hash, &info_hash_len, NULL, 0, |
|
suite_id, sizeof(suite_id), "info_hash", info, |
|
info_len)) { |
|
return 0; |
|
} |
|
|
|
// key_schedule_context = concat(mode, psk_id_hash, info_hash) |
|
uint8_t context[sizeof(uint8_t) + 2 * EVP_MAX_MD_SIZE]; |
|
size_t context_len; |
|
CBB context_cbb; |
|
if (!CBB_init_fixed(&context_cbb, context, sizeof(context)) || |
|
!CBB_add_u8(&context_cbb, HPKE_MODE_BASE) || |
|
!CBB_add_bytes(&context_cbb, psk_id_hash, psk_id_hash_len) || |
|
!CBB_add_bytes(&context_cbb, info_hash, info_hash_len) || |
|
!CBB_finish(&context_cbb, NULL, &context_len)) { |
|
return 0; |
|
} |
|
|
|
// secret = LabeledExtract(shared_secret, "secret", psk) |
|
uint8_t secret[EVP_MAX_MD_SIZE]; |
|
size_t secret_len; |
|
if (!hpke_labeled_extract(hkdf_md, secret, &secret_len, shared_secret, |
|
shared_secret_len, suite_id, sizeof(suite_id), |
|
"secret", NULL, 0)) { |
|
return 0; |
|
} |
|
|
|
// key = LabeledExpand(secret, "key", key_schedule_context, Nk) |
|
const EVP_AEAD *aead = hpke->aead->aead_func(); |
|
uint8_t key[EVP_AEAD_MAX_KEY_LENGTH]; |
|
const size_t kKeyLen = EVP_AEAD_key_length(aead); |
|
if (!hpke_labeled_expand(hkdf_md, key, kKeyLen, secret, secret_len, suite_id, |
|
sizeof(suite_id), "key", context, context_len) || |
|
!EVP_AEAD_CTX_init(&hpke->aead_ctx, aead, key, kKeyLen, |
|
EVP_AEAD_DEFAULT_TAG_LENGTH, NULL)) { |
|
return 0; |
|
} |
|
|
|
// base_nonce = LabeledExpand(secret, "base_nonce", key_schedule_context, Nn) |
|
if (!hpke_labeled_expand(hkdf_md, hpke->base_nonce, |
|
EVP_AEAD_nonce_length(aead), secret, secret_len, |
|
suite_id, sizeof(suite_id), "base_nonce", context, |
|
context_len)) { |
|
return 0; |
|
} |
|
|
|
// exporter_secret = LabeledExpand(secret, "exp", key_schedule_context, Nh) |
|
if (!hpke_labeled_expand(hkdf_md, hpke->exporter_secret, EVP_MD_size(hkdf_md), |
|
secret, secret_len, suite_id, sizeof(suite_id), |
|
"exp", context, context_len)) { |
|
return 0; |
|
} |
|
|
|
return 1; |
|
} |
|
|
|
// The number of bytes written to |out_shared_secret| is the size of the KEM's |
|
// KDF (currently we only support SHA256). |
|
static int hpke_encap(EVP_HPKE_CTX *hpke, |
|
uint8_t out_shared_secret[SHA256_DIGEST_LENGTH], |
|
const uint8_t public_key_r[X25519_PUBLIC_VALUE_LEN], |
|
const uint8_t ephemeral_private[X25519_PRIVATE_KEY_LEN], |
|
const uint8_t ephemeral_public[X25519_PUBLIC_VALUE_LEN]) { |
|
uint8_t dh[X25519_PUBLIC_VALUE_LEN]; |
|
if (!X25519(dh, ephemeral_private, public_key_r)) { |
|
OPENSSL_PUT_ERROR(EVP, EVP_R_INVALID_PEER_KEY); |
|
return 0; |
|
} |
|
|
|
uint8_t kem_context[KEM_CONTEXT_LEN]; |
|
OPENSSL_memcpy(kem_context, ephemeral_public, X25519_PUBLIC_VALUE_LEN); |
|
OPENSSL_memcpy(kem_context + X25519_PUBLIC_VALUE_LEN, public_key_r, |
|
X25519_PUBLIC_VALUE_LEN); |
|
if (!hpke_extract_and_expand(EVP_sha256(), out_shared_secret, |
|
SHA256_DIGEST_LENGTH, dh, kem_context)) { |
|
return 0; |
|
} |
|
return 1; |
|
} |
|
|
|
static int hpke_decap(const EVP_HPKE_CTX *hpke, |
|
uint8_t out_shared_secret[SHA256_DIGEST_LENGTH], |
|
const uint8_t enc[X25519_PUBLIC_VALUE_LEN], |
|
const uint8_t public_key_r[X25519_PUBLIC_VALUE_LEN], |
|
const uint8_t secret_key_r[X25519_PRIVATE_KEY_LEN]) { |
|
uint8_t dh[X25519_PUBLIC_VALUE_LEN]; |
|
if (!X25519(dh, secret_key_r, enc)) { |
|
OPENSSL_PUT_ERROR(EVP, EVP_R_INVALID_PEER_KEY); |
|
return 0; |
|
} |
|
uint8_t kem_context[KEM_CONTEXT_LEN]; |
|
OPENSSL_memcpy(kem_context, enc, X25519_PUBLIC_VALUE_LEN); |
|
OPENSSL_memcpy(kem_context + X25519_PUBLIC_VALUE_LEN, public_key_r, |
|
X25519_PUBLIC_VALUE_LEN); |
|
if (!hpke_extract_and_expand(EVP_sha256(), out_shared_secret, |
|
SHA256_DIGEST_LENGTH, dh, kem_context)) { |
|
return 0; |
|
} |
|
return 1; |
|
} |
|
|
|
const EVP_HPKE_KDF *EVP_hpke_hkdf_sha256(void) { |
|
static const EVP_HPKE_KDF kKDF = {EVP_HPKE_HKDF_SHA256, &EVP_sha256}; |
|
return &kKDF; |
|
} |
|
|
|
uint16_t EVP_HPKE_KDF_id(const EVP_HPKE_KDF *kdf) { return kdf->id; } |
|
|
|
const EVP_HPKE_AEAD *EVP_hpke_aes_128_gcm(void) { |
|
static const EVP_HPKE_AEAD kAEAD = {EVP_HPKE_AES_128_GCM, |
|
&EVP_aead_aes_128_gcm}; |
|
return &kAEAD; |
|
} |
|
|
|
const EVP_HPKE_AEAD *EVP_hpke_aes_256_gcm(void) { |
|
static const EVP_HPKE_AEAD kAEAD = {EVP_HPKE_AES_256_GCM, |
|
&EVP_aead_aes_256_gcm}; |
|
return &kAEAD; |
|
} |
|
|
|
const EVP_HPKE_AEAD *EVP_hpke_chacha20_poly1305(void) { |
|
static const EVP_HPKE_AEAD kAEAD = {EVP_HPKE_CHACHA20_POLY1305, |
|
&EVP_aead_chacha20_poly1305}; |
|
return &kAEAD; |
|
} |
|
|
|
uint16_t EVP_HPKE_AEAD_id(const EVP_HPKE_AEAD *aead) { return aead->id; } |
|
|
|
void EVP_HPKE_CTX_init(EVP_HPKE_CTX *ctx) { |
|
OPENSSL_memset(ctx, 0, sizeof(EVP_HPKE_CTX)); |
|
EVP_AEAD_CTX_zero(&ctx->aead_ctx); |
|
} |
|
|
|
void EVP_HPKE_CTX_cleanup(EVP_HPKE_CTX *ctx) { |
|
EVP_AEAD_CTX_cleanup(&ctx->aead_ctx); |
|
} |
|
|
|
int EVP_HPKE_CTX_setup_base_s_x25519(EVP_HPKE_CTX *hpke, uint8_t *out_enc, |
|
size_t *out_enc_len, size_t max_enc, |
|
const EVP_HPKE_KDF *kdf, |
|
const EVP_HPKE_AEAD *aead, |
|
const uint8_t *peer_public_value, |
|
size_t peer_public_value_len, |
|
const uint8_t *info, size_t info_len) { |
|
uint8_t seed[X25519_PRIVATE_KEY_LEN]; |
|
RAND_bytes(seed, sizeof(seed)); |
|
return EVP_HPKE_CTX_setup_base_s_x25519_with_seed_for_testing( |
|
hpke, out_enc, out_enc_len, max_enc, kdf, aead, peer_public_value, |
|
peer_public_value_len, info, info_len, seed, sizeof(seed)); |
|
} |
|
|
|
int EVP_HPKE_CTX_setup_base_s_x25519_with_seed_for_testing( |
|
EVP_HPKE_CTX *hpke, uint8_t *out_enc, size_t *out_enc_len, size_t max_enc, |
|
const EVP_HPKE_KDF *kdf, const EVP_HPKE_AEAD *aead, |
|
const uint8_t *peer_public_value, size_t peer_public_value_len, |
|
const uint8_t *info, size_t info_len, const uint8_t *seed, |
|
size_t seed_len) { |
|
if (max_enc < X25519_PUBLIC_VALUE_LEN) { |
|
OPENSSL_PUT_ERROR(EVP, EVP_R_INVALID_BUFFER_SIZE); |
|
return 0; |
|
} |
|
if (peer_public_value_len != X25519_PUBLIC_VALUE_LEN) { |
|
OPENSSL_PUT_ERROR(EVP, EVP_R_INVALID_PEER_KEY); |
|
return 0; |
|
} |
|
if (seed_len != X25519_PRIVATE_KEY_LEN) { |
|
OPENSSL_PUT_ERROR(EVP, EVP_R_DECODE_ERROR); |
|
return 0; |
|
} |
|
|
|
hpke->is_sender = 1; |
|
hpke->kdf = kdf; |
|
hpke->aead = aead; |
|
X25519_public_from_private(out_enc, seed); |
|
uint8_t shared_secret[SHA256_DIGEST_LENGTH]; |
|
if (!hpke_encap(hpke, shared_secret, peer_public_value, seed, out_enc) || |
|
!hpke_key_schedule(hpke, shared_secret, sizeof(shared_secret), info, |
|
info_len)) { |
|
return 0; |
|
} |
|
*out_enc_len = X25519_PUBLIC_VALUE_LEN; |
|
return 1; |
|
} |
|
|
|
int EVP_HPKE_CTX_setup_base_r_x25519( |
|
EVP_HPKE_CTX *hpke, const EVP_HPKE_KDF *kdf, const EVP_HPKE_AEAD *aead, |
|
const uint8_t *enc, size_t enc_len, const uint8_t *public_key, |
|
size_t public_key_len, const uint8_t *private_key, size_t private_key_len, |
|
const uint8_t *info, size_t info_len) { |
|
if (enc_len != X25519_PUBLIC_VALUE_LEN) { |
|
OPENSSL_PUT_ERROR(EVP, EVP_R_INVALID_PEER_KEY); |
|
return 0; |
|
} |
|
if (public_key_len != X25519_PUBLIC_VALUE_LEN || |
|
private_key_len != X25519_PRIVATE_KEY_LEN) { |
|
OPENSSL_PUT_ERROR(EVP, EVP_R_DECODE_ERROR); |
|
return 0; |
|
} |
|
|
|
hpke->is_sender = 0; |
|
hpke->kdf = kdf; |
|
hpke->aead = aead; |
|
uint8_t shared_secret[SHA256_DIGEST_LENGTH]; |
|
if (!hpke_decap(hpke, shared_secret, enc, public_key, private_key) || |
|
!hpke_key_schedule(hpke, shared_secret, sizeof(shared_secret), info, |
|
info_len)) { |
|
return 0; |
|
} |
|
return 1; |
|
} |
|
|
|
static void hpke_nonce(const EVP_HPKE_CTX *hpke, uint8_t *out_nonce, |
|
size_t nonce_len) { |
|
assert(nonce_len >= 8); |
|
|
|
// Write padded big-endian bytes of |hpke->seq| to |out_nonce|. |
|
OPENSSL_memset(out_nonce, 0, nonce_len); |
|
uint64_t seq_copy = hpke->seq; |
|
for (size_t i = 0; i < 8; i++) { |
|
out_nonce[nonce_len - i - 1] = seq_copy & 0xff; |
|
seq_copy >>= 8; |
|
} |
|
|
|
// XOR the encoded sequence with the |hpke->base_nonce|. |
|
for (size_t i = 0; i < nonce_len; i++) { |
|
out_nonce[i] ^= hpke->base_nonce[i]; |
|
} |
|
} |
|
|
|
int EVP_HPKE_CTX_open(EVP_HPKE_CTX *hpke, uint8_t *out, size_t *out_len, |
|
size_t max_out_len, const uint8_t *in, size_t in_len, |
|
const uint8_t *ad, size_t ad_len) { |
|
if (hpke->is_sender) { |
|
OPENSSL_PUT_ERROR(EVP, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); |
|
return 0; |
|
} |
|
if (hpke->seq == UINT64_MAX) { |
|
OPENSSL_PUT_ERROR(EVP, ERR_R_OVERFLOW); |
|
return 0; |
|
} |
|
|
|
uint8_t nonce[EVP_AEAD_MAX_NONCE_LENGTH]; |
|
const size_t nonce_len = EVP_AEAD_nonce_length(hpke->aead_ctx.aead); |
|
hpke_nonce(hpke, nonce, nonce_len); |
|
|
|
if (!EVP_AEAD_CTX_open(&hpke->aead_ctx, out, out_len, max_out_len, nonce, |
|
nonce_len, in, in_len, ad, ad_len)) { |
|
return 0; |
|
} |
|
hpke->seq++; |
|
return 1; |
|
} |
|
|
|
int EVP_HPKE_CTX_seal(EVP_HPKE_CTX *hpke, uint8_t *out, size_t *out_len, |
|
size_t max_out_len, const uint8_t *in, size_t in_len, |
|
const uint8_t *ad, size_t ad_len) { |
|
if (!hpke->is_sender) { |
|
OPENSSL_PUT_ERROR(EVP, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); |
|
return 0; |
|
} |
|
if (hpke->seq == UINT64_MAX) { |
|
OPENSSL_PUT_ERROR(EVP, ERR_R_OVERFLOW); |
|
return 0; |
|
} |
|
|
|
uint8_t nonce[EVP_AEAD_MAX_NONCE_LENGTH]; |
|
const size_t nonce_len = EVP_AEAD_nonce_length(hpke->aead_ctx.aead); |
|
hpke_nonce(hpke, nonce, nonce_len); |
|
|
|
if (!EVP_AEAD_CTX_seal(&hpke->aead_ctx, out, out_len, max_out_len, nonce, |
|
nonce_len, in, in_len, ad, ad_len)) { |
|
return 0; |
|
} |
|
hpke->seq++; |
|
return 1; |
|
} |
|
|
|
int EVP_HPKE_CTX_export(const EVP_HPKE_CTX *hpke, uint8_t *out, |
|
size_t secret_len, const uint8_t *context, |
|
size_t context_len) { |
|
uint8_t suite_id[HPKE_SUITE_ID_LEN]; |
|
if (!hpke_build_suite_id(hpke, suite_id)) { |
|
return 0; |
|
} |
|
const EVP_MD *hkdf_md = hpke->kdf->hkdf_md_func(); |
|
if (!hpke_labeled_expand(hkdf_md, out, secret_len, hpke->exporter_secret, |
|
EVP_MD_size(hkdf_md), suite_id, sizeof(suite_id), |
|
"sec", context, context_len)) { |
|
return 0; |
|
} |
|
return 1; |
|
} |
|
|
|
size_t EVP_HPKE_CTX_max_overhead(const EVP_HPKE_CTX *hpke) { |
|
assert(hpke->is_sender); |
|
return EVP_AEAD_max_overhead(EVP_AEAD_CTX_aead(&hpke->aead_ctx)); |
|
} |
|
|
|
const EVP_HPKE_AEAD *EVP_HPKE_CTX_aead(const EVP_HPKE_CTX *hpke) { |
|
return hpke->aead; |
|
} |
|
|
|
const EVP_HPKE_KDF *EVP_HPKE_CTX_kdf(const EVP_HPKE_CTX *hpke) { |
|
return hpke->kdf; |
|
}
|
|
|