Implement deterministic ECDSA sign (RFC6979)
authorslontis <shane.lontis@oracle.com>
Fri, 15 Jul 2022 11:22:01 +0000 (21:22 +1000)
committerHugo Landau <hlandau@openssl.org>
Wed, 30 Nov 2022 07:31:53 +0000 (07:31 +0000)
commitf3090fc710e30a749acaf9e5dfbe20dd163cf15d
tree720d4b3cada6e81a69a2b2b68f6e8cf592c3e003
parent9ba4f489ecd30901603d66a8ec578cbca08fac06
Implement deterministic ECDSA sign (RFC6979)

This PR is based off the contributions in PR #9223 by Jemmy1228.

It has been modified and reworked to:
(1) Work with providers
(2) Support ECDSA and DSA
(3) Add a KDF HMAC_DRBG implementation that shares code with the RAND HMAC_DRBG.

A nonce_type is passed around inside the Signing API's, in order to support any
future deterministic algorithms.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18809)
31 files changed:
crypto/build.info
crypto/deterministic_nonce.c [new file with mode: 0644]
crypto/dsa/dsa_local.h
crypto/dsa/dsa_ossl.c
crypto/dsa/dsa_sign.c
crypto/ec/ecdsa_ossl.c
doc/build.info
doc/man7/EVP_KDF-HMAC-DRBG.pod [new file with mode: 0644]
doc/man7/EVP_RAND-HMAC-DRBG.pod
doc/man7/EVP_SIGNATURE-DSA.pod
doc/man7/EVP_SIGNATURE-ECDSA.pod
doc/man7/OSSL_PROVIDER-default.pod
doc/man7/provider-signature.pod
include/crypto/dsa.h
include/crypto/ec.h
include/internal/deterministic_nonce.h [new file with mode: 0644]
include/openssl/core_names.h
providers/defltprov.c
providers/implementations/include/prov/hmac_drbg.h [new file with mode: 0644]
providers/implementations/include/prov/implementations.h
providers/implementations/include/prov/names.h
providers/implementations/kdfs/build.info
providers/implementations/kdfs/hmacdrbg_kdf.c [new file with mode: 0644]
providers/implementations/rands/drbg_hmac.c
providers/implementations/rands/drbg_local.h
providers/implementations/signature/dsa_sig.c
providers/implementations/signature/ecdsa_sig.c
test/evp_kdf_test.c
test/evp_test.c
test/recipes/30-test_evp.t
test/recipes/30-test_evp_data/evpkdf_hmac_drbg.txt [new file with mode: 0644]