RE: [PATCH v1 1/8] qapi/crypto: Add ECDSA algorithm and curve id
Jamin Lin <[email protected]>
| Newsgroups | org.nongnu.qemu-arm,org.nongnu.qemu-devel |
|---|---|
| Message-ID | <TYZPR06MB4980C8E8A5ECC93775366A7DFCA32@TYZPR06MB4980.apcprd06.prod.outlook.com> |
Hi Markus, > Subject: Re: [PATCH v1 1/8] qapi/crypto: Add ECDSA algorithm and curve id > > Jamin Lin <[email protected]> writes: > > > Introduce a new asymmetric cipher algorithm, ECDSA, a curve identifier > > enum (prime256v1 / NIST P-256 and secp384r1 / NIST P-384) and the > > per-algorithm ECDSA options. This is the QAPI groundwork consumed by > > the crypto akcipher backends in the following patches. > > > > Signed-off-by: Jamin Lin <[email protected]> > > Why do you need this algorithm? Oh, the cover letter explains. Please add > a suitable brief explanation to this commit message, too. > Will add > > --- > > qapi/crypto.json | 33 +++++++++++++++++++++++++++++++-- > > 1 file changed, 31 insertions(+), 2 deletions(-) > > > > diff --git a/qapi/crypto.json b/qapi/crypto.json index > > 6e3a98ff68..016d7c65bf 100644 > > --- a/qapi/crypto.json > > +++ b/qapi/crypto.json > > @@ -557,10 +557,26 @@ > > # > > # @rsa: RSA algorithm > > # > > +# @ecdsa: ECDSA algorithm > > Missing (since 11.2) > Will add Thanks for the review and suggestions. Jamin > > +# > > # Since: 7.1 > > ## > > { 'enum': 'QCryptoAkCipherAlgo', > > - 'data': ['rsa']} > > + 'data': ['rsa', 'ecdsa']} > > + > > +## > > +# @QCryptoCurveID: > > +# > > +# The supported elliptic curves. > > +# > > +# @prime256v1: NIST P-256 curve (prime256v1) # # @secp384r1: NIST > > +P-384 curve (secp384r1) # # Since: 11.2 ## { 'enum': > > +'QCryptoCurveID', > > + 'data': ['prime256v1', 'secp384r1']} > > > > ## > > # @QCryptoAkCipherKeyType: > > @@ -605,6 +621,18 @@ > > 'data': { 'hash-alg':'QCryptoHashAlgo', > > 'padding-alg': 'QCryptoRSAPaddingAlgo'}} > > > > +## > > +# @QCryptoAkCipherOptionsECDSA: > > +# > > +# Specific parameters for the ECDSA algorithm. > > +# > > +# @curve-id: the elliptic curve to use # # Since: 11.2 ## { 'struct': > > +'QCryptoAkCipherOptionsECDSA', > > + 'data': { 'curve-id': 'QCryptoCurveID' }} > > + > > ## > > # @QCryptoAkCipherOptions: > > # > > @@ -618,4 +646,5 @@ > > { 'union': 'QCryptoAkCipherOptions', > > 'base': { 'alg': 'QCryptoAkCipherAlgo' }, > > 'discriminator': 'alg', > > - 'data': { 'rsa': 'QCryptoAkCipherOptionsRSA' }} > > + 'data': { 'rsa': 'QCryptoAkCipherOptionsRSA', > > + 'ecdsa': 'QCryptoAkCipherOptionsECDSA' }} > > With the missing since corrected, QAPI schema > Acked-by: Markus Armbruster <[email protected]>