Skip to content
This repository was archived by the owner on Mar 5, 2024. It is now read-only.

Commit 87d74dd

Browse files
committed
Patch for #39
1 parent 484f51f commit 87d74dd

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

lib/source/ecc_dsa.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,6 @@
5757
#include <tinycrypt/ecc.h>
5858
#include <tinycrypt/ecc_dsa.h>
5959

60-
#if default_RNG_defined
61-
static uECC_RNG_Function g_rng_function = &default_CSPRNG;
62-
#else
63-
static uECC_RNG_Function g_rng_function = 0;
64-
#endif
6560

6661
static void bits2int(uECC_word_t *native, const uint8_t *bits,
6762
unsigned bits_size, uECC_Curve curve)
@@ -124,7 +119,7 @@ int uECC_sign_with_k(const uint8_t *private_key, const uint8_t *message_hash,
124119

125120
/* If an RNG function was specified, get a random number
126121
to prevent side channel analysis of k. */
127-
if (!g_rng_function) {
122+
if (!uECC_get_rng()) {
128123
uECC_vli_clear(tmp, num_n_words);
129124
tmp[0] = 1;
130125
}

0 commit comments

Comments
 (0)