[gnutls-help] gnutls_cipher_init Error on armv7 architecture but not on amd64

Nicolas Mora nicolas at babelouest.org
Tue Sep 21 18:02:10 CEST 2021


I'm seeing a different behavior between two architectures when using 
gnutls_cipher_init with incorrect key size.

If I use gnutls_cipher_init with the gnutls_cipher_algorithm_t 
GNUTLS_CIPHER_AES_128_GCM and a key of 24 bits, I have a different 
result value if I execute the same code on an AMD64 or an ARMV7 

On a AMD64 CPU, using the attached sample program, I have the following 
$ gcc -o gnutls-cipher-init gnutls-cipher-init.c -lgnutls && 
gnutls_cipher_init OK

On an ARMV7 CPU (Odroid C2 or Raspberry Pi), gnutls_cipher_init returns 
an error:
$ gcc -o gnutls-cipher-init gnutls-cipher-init.c -lgnutls && 
gnutls_cipher_init Error: The request is invalid.

Is it a bug? If so, which architecture has the correct answer?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gnutls-cipher-init.c
Type: text/x-csrc
Size: 824 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gnutls-help/attachments/20210921/33daf62f/attachment.c>

More information about the Gnutls-help mailing list