Skip to content

crypto: Add twopass lskcipher for adiantum

Herbert Xu linux-crypto 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest15 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15crypto: skcipher - Add tailsize attributecrypto/lskcipher.c crypto/skcipher.c include/crypto/internal/skcipher.h +1 more+50 -13 replies
2/15crypto: algif_skcipher - Add support for tailsizecrypto/algif_skcipher.c+5 -20 replies
3/15crypto: skcipher - Remove ivsize check for lskcipher simple templatescrypto/cbc.c crypto/lskcipher.c+6 -50 replies
4/15crypto: xts - Convert from skcipher to lskciphercrypto/xts.c include/crypto/xts.h+244 -3520 replies
5/15crypto: skcipher - Add twopass attributecrypto/lskcipher.c crypto/skcipher.c include/crypto/skcipher.h+36 -00 replies
6/15crypto: algif_skcipher - Disallow nonincremental algorithmscrypto/algif_skcipher.c+4 -03 replies
7/15crypto: adiantum - Use lskcipher instead of ciphercrypto/adiantum.c+96 -340 replies
8/15crypto: skcipher - Add incremental support to lskcipher wrappercrypto/lskcipher.c+20 -90 replies
9/15crypto: chacha-generic - Convert from skcipher to lskciphercrypto/chacha_generic.c include/crypto/internal/chacha.h+100 -832 replies
10/15crypto: skcipher - Move nesting check into ecbcrypto/ecb.c crypto/lskcipher.c+4 -50 replies
11/15crypto: skcipher - Propagate zero-length requests to lskciphercrypto/lskcipher.c+6 -00 replies
12/15crypto: cts - Convert from skcipher to lskciphercrypto/cts.c+89 -2660 replies
13/15crypto: cts,xts - Update parameters blocksize/chunksize/tailsizearch/arm/crypto/aes-ce-glue.c arch/arm/crypto/aes-neonbs-glue.c arch/arm64/crypto/aes-glue.c +26 more+125 -453 replies
14/15crypto: lskcipher - Export incremental interface internallycrypto/lskcipher.c include/crypto/internal/skcipher.h+74 -130 replies
15/15crypto: adiantum - Convert from skcipher to lskciphercrypto/adiantum.c+222 -2490 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/15] crypto: Add twopass lskcipher for adiantum

In order to process the data incrementally, adiantum needs see the source data twice. This patch series adds support for such algorithms in lskcipher including adaptations to algif_skcipher.

For now this capability isn't actually exported completely through algif_skcipher. That is, if the source data is too large to be fed at once through an SG list the operation will fail with ENOSYS.

As a future extension, the incremental processing can be extended through algif_skcipher (and perhaps even algif_aead). However, I'd like to see some real uses for it before adding this complexity. For example, one valid use-case would be some hardware that directly supported such incremental processing.

In addition to converting adiantum, the underlying chacha algorithm is also converted over to lskcipher.

The algorithms cts + xts have been converted too to ensure that the tailsize mechanism works properly for them. While doing this the parameters for cts + xts have been modified so that blocksize is now
1. This entails changing the paramters of all drivers that support cts and/or xts.

Herbert Xu (15):
crypto: skcipher - Add tailsize attribute
crypto: algif_skcipher - Add support for tailsize
crypto: skcipher - Remove ivsize check for lskcipher simple templates
crypto: xts - Convert from skcipher to lskcipher
crypto: skcipher - Add twopass attribute
crypto: algif_skcipher - Disallow nonincremental algorithms
crypto: adiantum - Use lskcipher instead of cipher
crypto: skcipher - Add incremental support to lskcipher wrapper
crypto: chacha-generic - Convert from skcipher to lskcipher
crypto: skcipher - Move nesting check into ecb
crypto: skcipher - Propagate zero-length requests to lskcipher
crypto: cts - Convert from skcipher to lskcipher
crypto: cts,xts - Update parameters blocksize/chunksize/tailsize
crypto: lskcipher - Export incremental interface internally
crypto: adiantum - Convert from skcipher to lskcipher

 arch/arm/crypto/aes-ce-glue.c                 |   8 +-
 arch/arm/crypto/aes-neonbs-glue.c             |   4 +-
 arch/arm64/crypto/aes-glue.c                  |   8 +-
 arch/arm64/crypto/aes-neonbs-glue.c           |   4 +-
 arch/arm64/crypto/sm4-ce-glue.c               |   8 +-
 arch/powerpc/crypto/aes-spe-glue.c            |   4 +-
 arch/powerpc/crypto/aes_xts.c                 |   4 +-
 arch/s390/crypto/aes_s390.c                   |   4 +-
 arch/s390/crypto/paes_s390.c                  |   4 +-
 arch/x86/crypto/aesni-intel_glue.c            |   8 +-
 crypto/adiantum.c                             | 573 ++++++++++--------
 crypto/algif_skcipher.c                       |  11 +-
 crypto/cbc.c                                  |   5 +
 crypto/chacha_generic.c                       | 161 ++---
 crypto/cts.c                                  | 355 +++--------
 crypto/ecb.c                                  |   4 +
 crypto/lskcipher.c                            |  94 ++-
 crypto/skcipher.c                             |  18 +-
 crypto/xts.c                                  | 572 +++++++----------
 drivers/crypto/atmel-aes.c                    |   4 +-
 drivers/crypto/axis/artpec6_crypto.c          |   2 +
 drivers/crypto/bcm/cipher.c                   |   4 +-
 drivers/crypto/caam/caamalg.c                 |   4 +-
 drivers/crypto/caam/caamalg_qi.c              |   4 +-
 drivers/crypto/caam/caamalg_qi2.c             |   4 +-
 drivers/crypto/cavium/cpt/cptvf_algs.c        |   4 +-
 .../crypto/cavium/nitrox/nitrox_skcipher.c    |   8 +-
 drivers/crypto/ccp/ccp-crypto-aes-xts.c       |   4 +-
 drivers/crypto/ccree/cc_cipher.c              |  12 +-
 drivers/crypto/chelsio/chcr_algo.c            |   4 +-
 drivers/crypto/hisilicon/sec/sec_algs.c       |   4 +-
 drivers/crypto/hisilicon/sec2/sec_crypto.c    |  23 +-
 .../crypto/inside-secure/safexcel_cipher.c    |   4 +-
 .../intel/keembay/keembay-ocs-aes-core.c      |  11 +-
 .../crypto/intel/qat/qat_common/qat_algs.c    |   4 +-
 .../crypto/marvell/octeontx/otx_cptvf_algs.c  |   4 +-
 .../marvell/octeontx2/otx2_cptvf_algs.c       |   4 +-
 drivers/crypto/qce/skcipher.c                 |   6 +-
 include/crypto/internal/chacha.h              |  22 +-
 include/crypto/internal/skcipher.h            |  43 ++
 include/crypto/skcipher.h                     |  65 ++
 include/crypto/xts.h                          |  24 +-
 42 files changed, 1067 insertions(+), 1050 deletions(-)
Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt