[gnutls-devel] GnuTLS | pk: add flags to force RSA-PSS salt length to match digest length (!1455)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Fri Aug 6 10:46:42 CEST 2021



Merge request https://gitlab.com/gnutls/gnutls/-/merge_requests/1455 was reviewed by Daiki Ueno

--
  
Daiki Ueno commented on a discussion on lib/privkey.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1455#note_644831702

> +			size_t key_size = (bits + 7) / 8;
> +
> +			if (salt_size == 0) {

Indeed, fixed.

--
  
Daiki Ueno commented on a discussion on lib/privkey.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1455#note_644831706

> +				return gnutls_assert_val(GNUTLS_E_CONSTRAINT_ERROR);
> +			}
> +			if (salt_size > key_size - hash_size - 2) {

OK, made it rely more on that function.

--
  
Daiki Ueno commented on a discussion on tests/rsa-rsa-pss.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1455#note_644831708

> +	sign_verify_data(GNUTLS_SIGN_RSA_PSS_SHA256, pkey_rsa_pss, 0, 0, 0, 0);
> +	sign_verify_data(GNUTLS_SIGN_RSA_PSS_RSAE_SHA256, pkey_rsa, 0, 0, 0, 0);
> +	sign_verify_data(GNUTLS_SIGN_RSA_PSS_SHA256, pkey_rsa, 0, 0, 0, 0);

Added that test as well.


-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1455
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/20210806/0978b4bb/attachment.html>


More information about the Gnutls-devel mailing list