Thread (5 messages) flat view 5 messages, 2 authors, 2016-06-20
STALE3737d

Revision v8 of 7 in this series.

Revisions (7)
  1. v2 [diff vs current]
  2. v3 [diff vs current]
  3. v4 [diff vs current]
  4. v5 [diff vs current]
  5. v6 [diff vs current]
  6. v7 [diff vs current]
  7. v8 current

[PATCH v8 0/3] crypto: caam - add support for RSA algorithm

From: Tudor Ambarus <hidden>
Date: 2016-06-15 15:07:55

Changes in v8:
- store raw keys on stack
- use d_sz instead of n_sz for RSA private exponent
- add caam_read_raw_data function for reading RSA modulus raw byte stream
  as a positive integer. The function updates the n_sz byte length too.
  Needed because the decryption descriptor uses the RSA modulus length as
  decryption output length. The accelerator will try to write n_sz bytes
  to output SGT, resulting a SGT overfflow if RSA modulus contains leading
  zeros.
- add caam_rsa_check_key_length function. Maximum supported modulus size is
  4096 bits. Fallback mechanism to be added after removing
  the (same) key length constraint from software implementation.

Changes in v7:
- sync with ASN.1 parser

Changes in v6:
- write descriptor PDB fields with inline append
- move Protocol Data Block (pdb) structures to pdb.h
- move setting of PDB fields in new functions
- unmap sec4_sg_dma on done callback
- remove redundant clean code on error path
- fix doc typos

Changes in v5:
- sync with ASN.1 parser

Changes in v4:
- sync with ASN.1 parser

Changes in v3:
- sync with ASN.1 parser

Changes in v2:
- fix memory leaks on error path
- rename struct akcipher_alg rsa to caam_rsa

Tudor Ambarus (3):
  crypto: scatterwak - Add scatterwalk_sg_copychunks
  crypto: scatterwalk - export scatterwalk_pagedone
  crypto: caam - add support for RSA algorithm

 crypto/scatterwalk.c              |  31 +-
 drivers/crypto/caam/Kconfig       |  12 +
 drivers/crypto/caam/Makefile      |   4 +
 drivers/crypto/caam/caampkc.c     | 693 ++++++++++++++++++++++++++++++++++++++
 drivers/crypto/caam/caampkc.h     |  70 ++++
 drivers/crypto/caam/compat.h      |   3 +
 drivers/crypto/caam/desc.h        |   2 +
 drivers/crypto/caam/desc_constr.h |   7 +
 drivers/crypto/caam/pdb.h         |  51 ++-
 drivers/crypto/caam/pkc_desc.c    |  36 ++
 include/crypto/scatterwalk.h      |   4 +
 11 files changed, 910 insertions(+), 3 deletions(-)
 create mode 100644 drivers/crypto/caam/caampkc.c
 create mode 100644 drivers/crypto/caam/caampkc.h
 create mode 100644 drivers/crypto/caam/pkc_desc.c

-- 
1.8.3.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help