All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/7] crypto: Introduce ECDSA algorithm
@ 2022-06-22  9:15 Lei He
  2022-06-22  9:15 ` [PATCH v2 1/7] crypto: Introduce ECDSA algorithm API Lei He
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: Lei He @ 2022-06-22  9:15 UTC (permalink / raw)
  To: qemu-devel, berrange, f4bug; +Cc: mst, pizhenwei, jasowang, helei.sig11

This patch introduced ECDSA algorithm for crypto.

V1 -> V2:
- The reserved function prefix '_' is no longer used.
- When parsing ECDSA key: 1) set errp as early as possible,
2) use g_autoptr to avoid manually freeing memory, 3) simplified the
code parsing public key for gcrypt.
- When parsing the ECDSA private key, save the public key 
info (if any) so that the private key can also be used for
verification.
- Fixed a bug, gcrypt-ecdsa can truncate digest correctly now,
and a related unit-test is added.
- Fixed a bug, nettle-ecdsa can correctly add leading-zero (if needed)
when encoding the signature now.
- Minor tweaks to code style and typo fix.

V1:
- make the built-in ASN.1 decoder support more ASN.1 types.
- support ECDSA key and signature parsing.
- implement the ECDSA algorithm using nettle and gcrypt respectively.

Lei He (7):
  crypto: Introduce ECDSA algorithm API
  crypto: Support more ASN.1 types
  crypto: Remove "qemu/osdep.h" in rsakey.h
  crypto: Add ECDSA key parser
  crypto: Implement ECDSA algorithm by hogweed
  crypto: Implement ECDSA algorithm by gcrypt
  crypto: Add test suite for ECDSA algorithm

 crypto/akcipher-gcrypt.c.inc      | 409 ++++++++++++++++++++++++++++++++++++++
 crypto/akcipher-nettle.c.inc      | 282 ++++++++++++++++++++++++++
 crypto/der.c                      | 173 ++++++++++++++--
 crypto/der.h                      | 128 +++++++++++-
 crypto/ecdsakey-builtin.c.inc     | 252 +++++++++++++++++++++++
 crypto/ecdsakey.c                 | 118 +++++++++++
 crypto/ecdsakey.h                 |  66 ++++++
 crypto/meson.build                |   1 +
 crypto/rsakey.c                   |   1 +
 crypto/rsakey.h                   |   1 -
 qapi/crypto.json                  |  28 ++-
 tests/unit/test-crypto-akcipher.c | 338 +++++++++++++++++++++++++++++--
 tests/unit/test-crypto-der.c      | 126 ++++++++++--
 13 files changed, 1859 insertions(+), 64 deletions(-)
 create mode 100644 crypto/ecdsakey-builtin.c.inc
 create mode 100644 crypto/ecdsakey.c
 create mode 100644 crypto/ecdsakey.h

-- 
2.11.0



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-06-30  9:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-22  9:15 [PATCH v2 0/7] crypto: Introduce ECDSA algorithm Lei He
2022-06-22  9:15 ` [PATCH v2 1/7] crypto: Introduce ECDSA algorithm API Lei He
2022-06-22  9:15 ` [PATCH v2 2/7] crypto: Support more ASN.1 types Lei He
2022-06-22  9:15 ` [PATCH v2 3/7] crypto: Remove "qemu/osdep.h" in rsakey.h Lei He
2022-06-22  9:15 ` [PATCH v2 4/7] crypto: Add ECDSA key parser Lei He
2022-06-30  9:35   ` Daniel P. Berrangé
2022-06-22  9:15 ` [PATCH v2 5/7] crypto: Implement ECDSA algorithm by hogweed Lei He
2022-06-22  9:15 ` [PATCH v2 6/7] crypto: Implement ECDSA algorithm by gcrypt Lei He
2022-06-22  9:15 ` [PATCH v2 7/7] crypto: Add test suite for ECDSA algorithm Lei He
2022-06-30  9:12 ` PING: [PATCH v2 0/7] crypto: Introduce " Lei He

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.