[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 0/7] crypto: Introduce ECDSA algorithm
From: |
Lei He |
Subject: |
[PATCH v2 0/7] crypto: Introduce ECDSA algorithm |
Date: |
Wed, 22 Jun 2022 17:15:42 +0800 |
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
- [PATCH v2 0/7] crypto: Introduce ECDSA algorithm,
Lei He <=
- [PATCH v2 1/7] crypto: Introduce ECDSA algorithm API, Lei He, 2022/06/22
- [PATCH v2 5/7] crypto: Implement ECDSA algorithm by hogweed, Lei He, 2022/06/22
- [PATCH v2 4/7] crypto: Add ECDSA key parser, Lei He, 2022/06/22
- [PATCH v2 6/7] crypto: Implement ECDSA algorithm by gcrypt, Lei He, 2022/06/22
- [PATCH v2 3/7] crypto: Remove "qemu/osdep.h" in rsakey.h, Lei He, 2022/06/22
- [PATCH v2 2/7] crypto: Support more ASN.1 types, Lei He, 2022/06/22
- [PATCH v2 7/7] crypto: Add test suite for ECDSA algorithm, Lei He, 2022/06/22
- PING: [PATCH v2 0/7] crypto: Introduce ECDSA algorithm, Lei He, 2022/06/30