]> git.baikalelectronics.ru Git - kernel.git/commit
s390/pkey: Add sysfs attributes to emit protected key blobs
authorIngo Franzki <ifranzki@linux.ibm.com>
Thu, 23 Aug 2018 14:59:30 +0000 (16:59 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 10 Oct 2018 05:37:14 +0000 (07:37 +0200)
commitd146c5e27c3eafd99909b7898358c66181b074af
tree9ee834f18deae76e23d980e1ad905b529cbd4200
parentdbefd26f30f29ab0dfd57e5c2fad574b9adadbb3
s390/pkey: Add sysfs attributes to emit protected key blobs

Add binary read-only sysfs attributes for the pkey module
that can be used to read random protected keys from.
Keys are read from these attributes using a cat-like interface.

A typical use case for those keys is to encrypt a swap device
using the paes cipher. During processing of /etc/crypttab, the
random protected key to encrypt the swap device is read from
one of the attributes.

The following attributes are added:
  protkey/aes_128
  protkey/aes_192
  protkey/aes_256
  protkey/aes_128_xts
  protkey/aes_256_xts
Each attribute emits a protected key blob for the corresponding
key size and cipher mode.

Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
Reviewed-by: Harald Freudenberger <freude@linux.ibm.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/crypto/pkey_api.c