diff options
author | Paul Selkirk <paul@psgd.org> | 2015-11-13 17:53:30 -0500 |
---|---|---|
committer | Paul Selkirk <paul@psgd.org> | 2015-11-13 17:53:30 -0500 |
commit | a7037d918cbf60bd829e44ccc6d1522f55d5d8b1 (patch) | |
tree | 708a05da632c4ed5b8bd3601c39e3b0c0cf41ea7 /ecdsa.c | |
parent | 49ac8847de1120a4ae7b72747ee259bc0f5ffb3c (diff) | |
parent | 6ed2c92afd94c08a07f31a7bec345baef07bdf19 (diff) |
Merge branch 'config_core_selector'
Diffstat (limited to 'ecdsa.c')
-rw-r--r-- | ecdsa.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -713,7 +713,7 @@ static inline hal_error_t get_random(void *buffer, const size_t length) if (rng_test_override_function) return rng_test_override_function(buffer, length); else - return hal_get_random(buffer, length); + return hal_get_random(NULL, buffer, length); } #else /* HAL_ECDSA_DEBUG_ONLY_STATIC_TEST_VECTOR_RANDOM */ @@ -826,7 +826,8 @@ static int point_is_on_curve(const ec_point_t * const P, * Generate a new ECDSA key. */ -hal_error_t hal_ecdsa_key_gen(hal_ecdsa_key_t **key_, +hal_error_t hal_ecdsa_key_gen(const hal_core_t *core, + hal_ecdsa_key_t **key_, void *keybuf, const size_t keybuf_len, const hal_ecdsa_curve_t curve_) { @@ -1418,7 +1419,8 @@ static hal_error_t decode_signature_asn1(const ecdsa_curve_t * const curve, * Sign a caller-supplied hash. */ -hal_error_t hal_ecdsa_sign(const hal_ecdsa_key_t * const key, +hal_error_t hal_ecdsa_sign(const hal_core_t *core, + const hal_ecdsa_key_t * const key, const uint8_t * const hash, const size_t hash_len, uint8_t *signature, size_t *signature_len, const size_t signature_max, const hal_ecdsa_signature_format_t signature_format) @@ -1511,7 +1513,8 @@ hal_error_t hal_ecdsa_sign(const hal_ecdsa_key_t * const key, * Verify a signature using a caller-supplied hash. */ -hal_error_t hal_ecdsa_verify(const hal_ecdsa_key_t * const key, +hal_error_t hal_ecdsa_verify(const hal_core_t *core, + const hal_ecdsa_key_t * const key, const uint8_t * const hash, const size_t hash_len, const uint8_t * const signature, const size_t signature_len, const hal_ecdsa_signature_format_t signature_format) |