[gnutls-devel] GnuTLS | leancrypto: support leancrypto for post-quantum algorithms (!1925)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Thu Jan 23 12:44:54 CET 2025




Daiki Ueno commented on a discussion on lib/nettle/pk.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1925#note_2311713185

 >  {
 > -	mpz_t p;
 >  	int ret;
 > +	enum lc_kyber_type type;
 > +	struct lc_kyber_sk sk;
 > +	struct lc_kyber_pk pk;
 > +	gnutls_datum_t tmp_raw_priv = { NULL, 0 };
 > +	gnutls_datum_t tmp_raw_pub = { NULL, 0 };
 > +	uint8_t *ptr;
 > +	size_t len;
 > +
 > +	type = ml_kem_pk_to_lc_kyber_type(algo);
 > +	if (type == LC_KYBER_UNKNOWN)
 > +		return gnutls_assert_val(GNUTLS_E_UNKNOWN_PK_ALGORITHM);
 > +
 > +	ret = lc_kyber_keypair(&pk, &sk, lc_seeded_rng, type);

Oh, we can certainly call `lc_rng_set_seeded` at the library initialization, though I wonder why the ML-KEM API can't simply take an RNG as a parameter as you say; in my proposed ML-KEM implementation in Nettle the caller [does](https://git.lysator.liu.se/nettle/nettle/-/merge_requests/62/diffs#303b595a0f2d1faadfcc6ce459a2909c30310bc5_0_77) need to provide an RNG.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1925#note_2311713185
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/20250123/8ec3bbad/attachment.html>


More information about the Gnutls-devel mailing list