[gnutls-devel] GnuTLS | Update liboqs version requirement to 0.11.0 to support final version of ML-KEM (!1883)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Tue Oct 15 05:55:04 CEST 2024




Daiki Ueno commented on a discussion on lib/ext/key_share.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1883#note_2158512299

 > +
 > +	case GNUTLS_PK_MLKEM768:
 > +	case GNUTLS_PK_EXP_KYBER768: {
 > +		gnutls_datum_t key;
 > +
 > +		if (KYBER768_CIPHERTEXT_SIZE > buffer->length)
 > +			return gnutls_assert_val(
 > +				GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER);
 > +		_gnutls_buffer_pop_datum(buffer, &data,
 > +					 KYBER768_CIPHERTEXT_SIZE);
 > +
 > +		ret = _gnutls_pk_decaps(
 > +			group->pk, &key, &data,
 > +			&session->key.kshare.kem_params.raw_priv);
 > +		if (ret < 0)
 > +			return gnutls_assert_val(ret);

The return value is automatically translated into an alert, using `gnutls_error_to_alert`, though it is possible that the error code returned from `_gnutls_pk_{encaps,decaps}` may turn into a different alert than illegal_parameter. I'll fix it to manually return `GNUTLS_E_ILLEGAL_PARAMETER`.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1883#note_2158512299
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/20241015/d0404f6c/attachment.html>


More information about the Gnutls-devel mailing list