[gnutls-devel] GnuTLS | Porting HPKE (!1749)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Wed Jun 21 11:33:48 CEST 2023




Ajit Singh commented on a discussion on lib/nettle/hpke/hpke-hkdf.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1749#note_1439549677

> +                           struct ecc_scalar *sk, struct ecc_point *pk)
> +{
> +  int r = 1, counter = 0;
> +  uint8_t *dkp_prk = NULL, *bytes = NULL;
> +  mpz_t z;
> +
> +  mpz_init (z);
> +
> +  dkp_prk = _nettle_labeled_extract_kem (NULL, "dkp_prk", ikm, ikm_len,
> +                                         dhkem);
> +  if (!dkp_prk)
> +    {
> +      r = 0;
> +      goto out;
> +    }
> +  while (ecc_scalar_set((struct ecc_scalar *)dhkem, z))

since we do not have ecc-internal.h in system nettle lib(usr/include/nettle), this header file contains the required `struct ecc_curve` by `dhkem->ecc`. Therefore to bypass its usage, this loop condition rewritten using  `ecc_scalar_set` https://git.lysator.liu.se/nettle/nettle/-/blob/master/ecc-scalar.c#L55

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1749#note_1439549677
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20230621/8cdcd672/attachment.html>


More information about the Gnutls-devel mailing list