Skip to contentSkip to conversation

gcm-aes-ccp self-tests failure

DISCUSSION Eric Biggers 2 participants 2 messages Jul 2, 2019 Crypto API

lore
Share & tools
lore
#0 lore raw

Hi Tom and Gary,

On latest cryptodev tree, I'm seeing the following self-test failure after I built a kernel with the AMD CCP driver and crypto self-tests enabled, and booted it on system with a Ryzen processor ("Threadripper 1950X"):

[    4.378985] alg: aead: gcm-aes-ccp encryption test failed (wrong result) on test vector 2, cfg="two even aligned splits"

i.e., in some cases the AES-GCM implementation produces the wrong ciphertext and/or authentication tag.

Is this is a known issue? When will it be fixed?

The potentially relevant bits of my Kconfig are:

CONFIG_CRYPTO_AES=y
CONFIG_CRYPTO_GCM=y CONFIG_CRYPTO_DEV_CCP=y CONFIG_CRYPTO_DEV_CCP_DD=y CONFIG_CRYPTO_DEV_SP_CCP=y CONFIG_CRYPTO_DEV_CCP_CRYPTO=y CONFIG_CRYPTO_DEV_SP_PSP=y
# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set CONFIG_DEBUG_KERNEL=y CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y

- Eric

#1 lore raw
Quoted 26 lines · Eric Biggers

Hi Tom and Gary,

On latest cryptodev tree, I'm seeing the following self-test failure after I built a kernel with the AMD CCP driver and crypto self-tests enabled, and booted it on system with a Ryzen processor ("Threadripper 1950X"):

[    4.378985] alg: aead: gcm-aes-ccp encryption test failed (wrong result) on test vector 2, cfg="two even aligned splits"

i.e., in some cases the AES-GCM implementation produces the wrong ciphertext and/or authentication tag.

Is this is a known issue? When will it be fixed?

The potentially relevant bits of my Kconfig are:

CONFIG_CRYPTO_AES=y
CONFIG_CRYPTO_GCM=y CONFIG_CRYPTO_DEV_CCP=y CONFIG_CRYPTO_DEV_CCP_DD=y CONFIG_CRYPTO_DEV_SP_CCP=y CONFIG_CRYPTO_DEV_CCP_CRYPTO=y CONFIG_CRYPTO_DEV_SP_PSP=y
# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set CONFIG_DEBUG_KERNEL=y CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y

Quoted 2 lines

- Eric

Yes, this is a known problem. We have no estimate on a fix at this time. I need to light a fire under someone now.

grh