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.
> ---
> 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)
> +#
> # 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]>