Skip to content

crypto: additional fixes for omap-aes

Ard Biesheuvel linux-crypto 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6crypto: omap-aes - reject invalid input sizes for block modesdrivers/crypto/omap-aes.c+3 -00 replies
2/6crypto: omap-aes-ctr - set blocksize to 1drivers/crypto/omap-aes.c+1 -10 replies
3/6crypto: omap-aes-gcm - deal with memory allocation failuredrivers/crypto/omap-aes-gcm.c+4 -00 replies
4/6crypto: omap-aes-gcm - add missing .setauthsize hooksdrivers/crypto/omap-aes-gcm.c drivers/crypto/omap-aes.c drivers/crypto/omap-aes.h+16 -00 replies
5/6crypto: omap-aes-gcm - check length of assocdata in RFC4106 modedrivers/crypto/omap-aes-gcm.c+4 -20 replies
6/6crypto: omap-aes-gcm - use the AES library to encrypt the tagdrivers/crypto/omap-aes-gcm.c drivers/crypto/omap-aes.c drivers/crypto/omap-aes.h+33 -980 replies

Reviews trailers per patch

None of the 6 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchTero Kristo
SeriesR-b T-b
1/6
2/6
3/6
4/6
5/6
6/6

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

Read the v1 thread

Cover letter [PATCH 0/6] crypto: additional fixes for omap-aes

This series applies onto Tero's series [0], and addresses a number of additional issues that exist in the omap-aes driver that aren't being addresses by Tero's fixes.

Note that the resulting code is still not 100% correct: an issue remains where inputs into GCM consisting solely of assocdata are not being processed correctly, e.g.,

alg: aead: gcm-aes-omap encryption test failed (wrong result) on test vector
"random: alen=38 plen=0 authsize=16 klen=32",
cfg="random: inplace may_sleep use_digest src_divs=[100.0%@+19] iv_offset=31"

I have no idea how to fix this, so I'll leave this to people that know this hardware and have access to the Sitara TRM.

Note that I also spotted some issues in the SHAM driver, i.e.,

alg: ahash: omap-sha1 test failed (wrong result) on test vector
"random: psize=7928 ksize=0", cfg="random: inplace use_final

      src_divs=[5.64%@+13, 59.70%@+18, <flush>31.53%@+4072,
      <flush,nosimd>3.13%@alignmask+263]"
alg: ahash: omap-hmac-sha256 test failed (wrong result) on test vector
  "random: psize=960 ksize=37", cfg="random: inplace use_final
      src_divs=[32.54%@+2449, 17.18%@+4, <flush>50.28%@+1] iv_offset=31"

All of these failures are triggered by CONFIG_CRYPTO_MANAGER_EXTRA_TESTS, so they will not show up when using the standard set of test vectors.

[0] https://lore.kernel.org/linux-crypto/[email protected]/

Ard Biesheuvel (6):
crypto: omap-aes - reject invalid input sizes for block modes
crypto: omap-aes-ctr - set blocksize to 1
crypto: omap-aes-gcm - deal with memory allocation failure
crypto: omap-aes-gcm - add missing .setauthsize hooks
crypto: omap-aes-gcm - check length of assocdata in RFC4106 mode
crypto: omap-aes-gcm - use the AES library to encrypt the tag

 drivers/crypto/omap-aes-gcm.c | 119 ++++++++------------
 drivers/crypto/omap-aes.c     |  33 ++----
 drivers/crypto/omap-aes.h     |  10 +-
 3 files changed, 61 insertions(+), 101 deletions(-)
Signature · 1 line
2.17.1