[gnutls-devel] GnuTLS | cipher: add restriction on CCM tag length under FIPS mode (!1658)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Sat Oct 22 02:25:43 CEST 2022




Daiki Ueno commented on a discussion on lib/accelerated/aarch64/aes-ccm-aarch64.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1658#note_1145211674

>  	if (unlikely(encr_size < plain_size + tag_size))
>  		return gnutls_assert_val(GNUTLS_E_SHORT_MEMORY_BUFFER);
>  
> +	/* SP800-38C A.1 says Tlen must be a multiple of 16 between 32
> +	 * and 128, while B.2 says Tlen smaller than 64 should not be
> +	 * used under sufficient restriction.
> +	 */
> +	switch (tag_size) {
> +	case 4: case 6:
> +		_gnutls_switch_fips_state(GNUTLS_FIPS140_OP_NOT_APPROVED);
> +		FALLTHROUGH;
> +	case 8: case 10: case 12: case 14: case 16:
> +		break;
> +	default:
> +		if (_gnutls_fips_mode_enabled()) {

Good point; added the transition.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1658#note_1145211674
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/20221022/4dcf99be/attachment.html>


More information about the Gnutls-devel mailing list