lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1574029845-22796-1-git-send-email-iuliana.prodan@nxp.com>
Date:   Mon, 18 Nov 2019 00:30:33 +0200
From:   Iuliana Prodan <iuliana.prodan@....com>
To:     Herbert Xu <herbert@...dor.apana.org.au>,
        Horia Geanta <horia.geanta@....com>,
        Aymen Sghaier <aymen.sghaier@....com>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Tom Lendacky <thomas.lendacky@....com>,
        Gary Hook <gary.hook@....com>, linux-crypto@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-imx <linux-imx@....com>,
        Iuliana Prodan <iuliana.prodan@....com>
Subject: [PATCH 00/12] crypto: caam - backlogging support

Integrate crypto_engine framework into CAAM, to make use of
the engine queue.
Added support for SKCIPHER, HASH, RSA and AEAD algorithms.
This is intended to be used for CAAM backlogging support.
The requests, with backlog flag (e.g. from dm-crypt) will be
listed into crypto-engine queue and processed by CAAM when free.
For better performance, crypto-engine software queue is bypassed,
if empty, and the request is sent directly to hardware. If this
returns -ENOSPC, the request is transferred to crypto-engine and
let it handle it.

While here, I've also made some refactorization.
Patch #1, adds a helper function - akcipher_request_cast, to get
an akcipher_request struct from a crypto_async_request struct.
Patches #2 - #5 include some refactorizations on caamalg, caamhash
and caampkc.
Patches #6, #7 change the return code of caam_jr_enqueue function
to -EINPROGRESS, in case of success, -ENOSPC in case the CAAM is
busy, -EIO if it cannot map the caller's descriptor and add a new
enqueue function for no backlogging requests. Also, to keep each
request information, like backlog flag, a new struct is passed as
argument to enqueue functions.
Patches #8 - #12 integrate crypto_engine into CAAM, for
SKCIPHER/AEAD/RSA/HASH algorithms.


Iuliana Prodan (12):
  crypto: add helper function for akcipher_request
  crypto: caam - refactor skcipher/aead/gcm/chachapoly {en,de}crypt
    functions
  crypto: caam - refactor ahash_done callbacks
  crypto: caam - refactor ahash_edesc_alloc
  crypto: caam - refactor RSA private key _done callbacks
  crypto: caam - change return code in caam_jr_enqueue function
  crypto: caam - refactor caam_jr_enqueue
  crypto: caam - support crypto_engine framework for SKCIPHER algorithms
  crypto: caam - bypass crypto-engine sw queue, if empty
  crypto: caam - add crypto_engine support for AEAD algorithms
  crypto: caam - add crypto_engine support for RSA algorithms
  crypto: caam - add crypto_engine support for HASH algorithms

 drivers/crypto/caam/Kconfig         |   1 +
 drivers/crypto/caam/caamalg.c       | 411 ++++++++++++++++--------------------
 drivers/crypto/caam/caamhash.c      | 323 +++++++++++++++-------------
 drivers/crypto/caam/caampkc.c       | 177 ++++++++++------
 drivers/crypto/caam/caampkc.h       |  11 +
 drivers/crypto/caam/caamrng.c       |   7 +-
 drivers/crypto/caam/intern.h        |  12 ++
 drivers/crypto/caam/jr.c            | 136 +++++++++++-
 drivers/crypto/caam/jr.h            |   4 +
 drivers/crypto/caam/key_gen.c       |   4 +-
 drivers/crypto/ccp/ccp-crypto-rsa.c |   6 -
 include/crypto/akcipher.h           |   6 +
 12 files changed, 635 insertions(+), 463 deletions(-)

-- 
2.1.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ