[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 13:28:30 CEST 2020




Dmitry Baryshkov commented on a discussion on lib/nettle/cipher.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1233#note_323441975

>  		     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);

Moreover in non-FIPS case if I understand correctly, this will result in GnuTLS silently ignoring key changes.

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


More information about the Gnutls-devel mailing list