gnutls_hpke_context_st: New context structure
gnutls_hpke_init: New function
gnutls_hpke_deinit: New function
-gnutls_hpke_get_enc_size: New function
gnutls_hpke_encap: New function
gnutls_hpke_seal: New function
gnutls_hpke_decap: New function
gnutls_hpke_derive_keypair@GNUTLS_3_8_13
gnutls_hpke_encap@GNUTLS_3_8_13
gnutls_hpke_export@GNUTLS_3_8_13
-gnutls_hpke_get_enc_size@GNUTLS_3_8_13
gnutls_hpke_init@GNUTLS_3_8_13
gnutls_hpke_open@GNUTLS_3_8_13
gnutls_hpke_seal@GNUTLS_3_8_13
FUNCS += functions/gnutls_hpke_encap.short
FUNCS += functions/gnutls_hpke_export
FUNCS += functions/gnutls_hpke_export.short
-FUNCS += functions/gnutls_hpke_get_enc_size
-FUNCS += functions/gnutls_hpke_get_enc_size.short
FUNCS += functions/gnutls_hpke_init
FUNCS += functions/gnutls_hpke_init.short
FUNCS += functions/gnutls_hpke_open
APIMANS += gnutls_hpke_derive_keypair.3
APIMANS += gnutls_hpke_encap.3
APIMANS += gnutls_hpke_export.3
-APIMANS += gnutls_hpke_get_enc_size.3
APIMANS += gnutls_hpke_init.3
APIMANS += gnutls_hpke_open.3
APIMANS += gnutls_hpke_seal.3
return 0;
}
-/**
- * gnutls_hpke_get_enc_size:
- * @ctx: The HPKE context to get the encapsulated key size for.
- *
- * This function returns the size of the encapsulated key (enc) that will be generated by gnutls_hpke_encap() for the
- * given HPKE context. The size of the encapsulated key depends on the KEM algorithm used in the context. For example,
- * for DHKEM(X25519), the encapsulated key size will be 32 bytes.
- *
- * It returns the size of the encapsulated key in bytes, or 0 if the context is NULL or if there is an error determining
- * the size.
- */
-size_t gnutls_hpke_get_enc_size(const gnutls_hpke_context_t ctx)
-{
- if (ctx == NULL) {
- return 0;
- }
-
- gnutls_ecc_curve_t curve = _gnutls_hpke_kem_to_curve(ctx->kem);
- if (curve == GNUTLS_ECC_CURVE_INVALID) {
- return 0;
- }
-
- return gnutls_ecc_curve_get_size(curve);
-}
-
/**
* gnutls_hpke_encap:
* @ctx: The HPKE context to use for encapsulation.
int gnutls_hpke_deinit(gnutls_hpke_context_t ctx);
-size_t gnutls_hpke_get_enc_size(const gnutls_hpke_context_t ctx);
-
int gnutls_hpke_encap(gnutls_hpke_context_t ctx, const gnutls_datum_t *info,
gnutls_datum_t *enc,
const gnutls_pubkey_t receiver_pubkey,
gnutls_hpke_decap;
gnutls_hpke_init;
gnutls_hpke_deinit;
- gnutls_hpke_get_enc_size;
gnutls_hpke_seal;
gnutls_hpke_open;
gnutls_hpke_derive_keypair;