Add ECDSA akcipher support and the ASPEED SBC ECDSA engine for AST10x0
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest9 patches 6 repliesIn review
- v39 patches 11 repliesSuperseded
- v29 patches 8 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 8 patches | 4 replies | Superseded |
Changes in v4 from the cover letter
1. Reorder the patches to fix a QEMU startup failure at an intermediate commit.
2. Add public key type validation for ECDSA verification.
3. Add private key type validation for ECDSA signing.
4. Remove sbc_unimplemented from AspeedSoCState
5. Update the commit messages.
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | qapi/crypto: Add ECDSA algorithm and curve idqapi/ | +31 | 0 replies | |
| 2/9 | crypto/akcipher: Support ECDSA sign/verify with gcryptcrypto/ | +339 | 0 replies | |
| 3/9 | crypto/akcipher: Support ECDSA sign/verify with nettlecrypto/ | +272 | 0 replies | |
| 4/9 | tests/crypto: Add ECDSA sign/verify teststests/ | +236 | 0 replies | |
| 5/9 | hw/arm/aspeed_ast10x0: Remove obsolete unimplemented SBC mappinghw/ include/ | +0 | 0 replies | |
| 6/9 | hw/misc/aspeed_sbc: Increase register space to 0x1000hw/ include/ | +4 | 1 reply | |
| 7/9 | hw/arm/aspeed_ast10x0: Wire SEC SRAM to the SBC modelhw/ hw/ include/ | +21 | 1 reply | |
| 8/9 | hw/misc/aspeed_sbc: Support the ECDSA verify commandhw/ hw/ | +143 | 1 reply | |
| 9/9 | tests/qtest: Add ASPEED SBC ECDSA engine testtests/ tests/ | +196 | 1 reply |
Reviews trailers per patch
All 9 patches have a Reviewed-by or Acked-by.
| Patch | Daniel P. Berrangé | Philippe Mathieu-Daudé | Markus Armbruster | Cédric Le Goater |
|---|---|---|---|---|
| 1/9 | R-b | A-b | ||
| 2/9 | R-b | |||
| 3/9 | R-b | |||
| 4/9 | R-b | |||
| 5/9 | R-b | |||
| 6/9 | R-b | |||
| 7/9 | R-b | |||
| 8/9 | R-b | |||
| 9/9 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCH v4 0/9] Add ECDSA akcipher support and the ASPEED SBC ECDSA engine for AST10x0
This series depends on:
1. [v4,0/4] Add ASPEED ACRY RSA model for the AST2600
https://patchwork.kernel.org/project/qemu-devel/cover/[email protected]/
This series adds ECDSA to the QEMU crypto akcipher framework and models the ASPEED AST10x0 secure boot controller (SBC) ECDSA engine on top of it.
The crypto side adds ECDSA sign/verify for prime256v1 (NIST P-256) and secp384r1 (NIST P-384) in both the gcrypt and nettle backends, using the raw big-endian form (public key Qx || Qy, private key scalar d, signature r || s) with a pre-computed digest as input.
Both the AST2600 and the AST1030/AST1060 have a Secure Boot Controller (SBC) that supports RSA and ECDSA verification, but only the AST1030/AST1060 have an ECDSA verify engine, so this series models ECDSA only. RSA verification is used solely to verify the AST2600 SPL in ROM CODE, which ASPEED does not release, so it is very unlikely to be used by end users.
v1:
1. Add ECDSA akcipher support with gcrypt backend
2. Add ECDSA akcipher support with nettle backend
3. Add ECDSA sign/verify unit tests
4. Support the ECDSA verify command for AST10x0
5. Add ASPEED SBC ECDSA engine qtest
v2:
1. Wrap the SEC SRAM in a container mapped at offset 0 so the device addresses it by relative offset (drop the "sram-base" property)
2. Add a patch removing the obsolete unimplemented SBC mapping
3. Add Qtest to ast1060-evb machine.
4. Rename R_ECDSA_CMD to R_SEC_TRIGGER, since the register triggers both the RSA and ECDSA engines.
v3:
1. fix typo
2. Replace g_printerr with g_test_skip
v4:
1. Reorder the patches to fix a QEMU startup failure at an intermediate commit.
2. Add public key type validation for ECDSA verification.
3. Add private key type validation for ECDSA signing.
4. Remove sbc_unimplemented from AspeedSoCState
5. Update the commit messages.
Jamin Lin (9):
qapi/crypto: Add ECDSA algorithm and curve id crypto/akcipher: Support ECDSA sign/verify with gcrypt crypto/akcipher: Support ECDSA sign/verify with nettle tests/crypto: Add ECDSA sign/verify tests hw/arm/aspeed_ast10x0: Remove obsolete unimplemented SBC mapping hw/misc/aspeed_sbc: Increase register space to 0x1000 hw/arm/aspeed_ast10x0: Wire SEC SRAM to the SBC model hw/misc/aspeed_sbc: Support the ECDSA verify command tests/qtest: Add ASPEED SBC ECDSA engine test
qapi/crypto.json | 33 ++- include/hw/arm/aspeed_soc.h | 1 - include/hw/misc/aspeed_sbc.h | 6 +- hw/arm/aspeed_ast10x0.c | 14 +- hw/misc/aspeed_sbc.c | 158 +++++++++++++- tests/qtest/aspeed-sbc-test.c | 194 +++++++++++++++++ tests/unit/test-crypto-akcipher.c | 236 +++++++++++++++++++++ crypto/akcipher-gcrypt.c.inc | 340 +++++++++++++++++++++++++++++- crypto/akcipher-nettle.c.inc | 272 ++++++++++++++++++++++++ hw/misc/trace-events | 2 + tests/qtest/meson.build | 2 + 11 files changed, 1242 insertions(+), 16 deletions(-) create mode 100644 tests/qtest/aspeed-sbc-test.c
Signature · 1 line
2.53.0