[gnutls-devel] GnuTLS | xts: check key block according to FIPS-140-2 IG A.9 (!1233)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Tue Apr 14 15:14:11 CEST 2020




Daiki Ueno commented on a discussion on lib/nettle/cipher.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1233#note_323523284

>  		     length, dst, src);
>  }
>  
> +static void
> +_xts_aes128_set_encrypt_key(struct xts_aes128_key *xts_key,
> +			    const uint8_t *key)
> +{
> +	if (safe_memcmp(key, key + AES128_KEY_SIZE, AES128_KEY_SIZE) == 0)
> +		_gnutls_switch_lib_state(LIB_STATE_ERROR);
> +	else
> +		xts_aes128_set_encrypt_key(xts_key, key);

Good catch, should be safer now.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1233#note_323523284
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/20200414/2a17ef36/attachment.html>


More information about the Gnutls-devel mailing list