s390/crypto: enable clear key values for paes ciphers
authorHarald Freudenberger <freude@linux.ibm.com>
Wed, 22 Jan 2020 11:24:00 +0000 (12:24 +0100)
committerVasily Gorbik <gor@linux.ibm.com>
Thu, 30 Jan 2020 12:07:55 +0000 (13:07 +0100)
commit7f820d053948ca82bd8221b1df3d676b9c93a494
treeafb5fce761d3b24746ad0459f53477bf690f6658
parent888edbc48857c7189592fb0be3ab09994247199c
s390/crypto: enable clear key values for paes ciphers

With this patch the paes ciphers do accept AES clear key values of
size 16, 24 or 32 byte. The key value is internal rearranged to form a
paes clear key token so that the pkey kernel module recognizes and
handles this key material as source for protected keys.

Using clear key material as a source for protected keys is a security
risc as the raw key material is kept in memory. However, so the AES
selftests provided with the testmanager can be run during registration
of the paes ciphers.

Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/crypto/paes_s390.c