Skip to content

Paes and Phmac: Refuse clear key material by default

Harald Freudenberger linux-crypto linux-s390 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest4 patches 1 replyIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4crypto: skcipher - Add new helper function crypto_skcipher_testedinclude/crypto/internal/skcipher.h+7 -00 replies
2/4s390/pkey: Support new xflag PKEY_XFLAG_NOCLEARKEYarch/s390/include/asm/pkey.h drivers/s390/crypto/pkey_cca.c drivers/s390/crypto/pkey_ep11.c +1 more+26 -40 replies
3/4crypto: s390/phmac - Refuse clear key material by defaultarch/s390/crypto/phmac_s390.c+20 -90 replies
4/4crypto: s390/paes - Refuse clear key material by defaultarch/s390/crypto/paes_s390.c+57 -360 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchHolger DenglerIngo Franzki
1/4R-b R-b
2/4R-b R-b
3/4R-b R-b
4/4R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/4] Paes and Phmac: Refuse clear key material by default

The modivation of these patches is to disable clear key usage of the protected key implementations paes and phmac by default.

With a new kernel module parameter "clrkey" this behavior can be controlled. By default clrkey is 'N' but for testing purpose on module load a true value (1, 'Y') may be given to accept clear key tokens.

Note that during selftest clear keys are always used and thus as long as the algorithm is in larval state indicated by crypto_skcipher_tested() clear keys need to be accepted. However, in this state there is no way to establish an instance of the tfm other than for selftest reasons.

Changelog:

v0: Initial version. Request for internal feedback and review
Please note I assume that patch #1 goes via s390, whereas patch #2, #3 and #4 may go via Herbert Xu's Linux Kernel Crypto.
v1: Sequence changed and feedback from Ingo, Holger and Heiko
integrated.
v2: Integrated the feedback from Holger and Ingo. First version
going out to the linux kernel crypto mailing list

Harald Freudenberger (4):
crypto: skcipher - Add new helper function crypto_skcipher_tested s390/pkey: Support new xflag PKEY_XFLAG_NOCLEARKEY
crypto: s390/phmac - Refuse clear key material by default
crypto: s390/paes - Refuse clear key material by default

 arch/s390/crypto/paes_s390.c       | 93 ++++++++++++++++++------------
 arch/s390/crypto/phmac_s390.c      | 29 +++++++---
 arch/s390/include/asm/pkey.h       |  8 ++-
 drivers/s390/crypto/pkey_cca.c     |  5 ++
 drivers/s390/crypto/pkey_ep11.c    |  5 ++
 drivers/s390/crypto/pkey_pckmo.c   | 12 +++-
 include/crypto/internal/skcipher.h |  7 +++
 7 files changed, 110 insertions(+), 49 deletions(-)

base-commit: 9448598b22c50c8a5bb77a9103e2d49f134c9578 --
2.43.0