]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
crypto/testmgr: enable selftests for paes-s390 ciphers
authorHarald Freudenberger <freude@linux.ibm.com>
Mon, 17 Feb 2020 17:36:02 +0000 (18:36 +0100)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 20 Feb 2020 13:58:10 +0000 (07:58 -0600)
commitddbe4cf495b032849bacb37bbf1a9c2f744acd42
tree882cc28f0d2376b3168ee6d5d964b546ce7d2948
parent62261470913047ba7a8ba78141c59fb15994d68b
crypto/testmgr: enable selftests for paes-s390 ciphers

BugLink: https://bugs.launchpad.net/bugs/1854948
This patch enables the selftests for the s390 specific protected key
AES (PAES) cipher implementations:
  * cbc-paes-s390
  * ctr-paes-s390
  * ecb-paes-s390
  * xts-paes-s390
PAES is an AES cipher but with encrypted ('protected') key
material. However, the paes ciphers are able to derive an protected
key from clear key material with the help of the pkey kernel module.

So this patch now enables the generic AES tests for the paes
ciphers. Under the hood the setkey() functions rearrange the clear key
values as clear key token and so the pkey kernel module is able to
provide protected key blobs from the given clear key values. The
derived protected key blobs are then used within the paes cipers and
should produce the very same results as the generic AES implementation
with the clear key values.

The s390-paes cipher testlist entries are surrounded
by #if IS_ENABLED(CONFIG_CRYPTO_PAES_S390) because they don't
make any sense on non s390 platforms or without the PAES
cipher implementation.

Link: http://lkml.kernel.org/r/20200213083946.zicarnnt3wizl5ty@gondor.apana.org.au
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
(cherry picked from commit c7ff8573ad21dcdcbcffd66fbfca3b53cd67d2b1)
Signed-off-by: Frank Heimes <frank.heimes@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
crypto/testmgr.c