forked from wolfSSL/wolfssl
SP: no RNG fix
Don't use RNG API when WC_NO_RNG is defined.
This commit is contained in:
@@ -76369,6 +76369,7 @@ static void sp_256_from_bin(sp_digit* r, int size, const byte* a, int n)
|
||||
*/
|
||||
static int sp_256_ecc_gen_k_8(WC_RNG* rng, sp_digit* k)
|
||||
{
|
||||
#ifndef WC_NO_RNG
|
||||
int err;
|
||||
byte buf[32];
|
||||
|
||||
@@ -76385,6 +76386,11 @@ static int sp_256_ecc_gen_k_8(WC_RNG* rng, sp_digit* k)
|
||||
while (err == 0);
|
||||
|
||||
return err;
|
||||
#else
|
||||
(void)rng;
|
||||
(void)k;
|
||||
return NOT_COMPILED_IN;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Makes a random EC key pair.
|
||||
@@ -94128,6 +94134,7 @@ static void sp_384_from_bin(sp_digit* r, int size, const byte* a, int n)
|
||||
*/
|
||||
static int sp_384_ecc_gen_k_12(WC_RNG* rng, sp_digit* k)
|
||||
{
|
||||
#ifndef WC_NO_RNG
|
||||
int err;
|
||||
byte buf[48];
|
||||
|
||||
@@ -94144,6 +94151,11 @@ static int sp_384_ecc_gen_k_12(WC_RNG* rng, sp_digit* k)
|
||||
while (err == 0);
|
||||
|
||||
return err;
|
||||
#else
|
||||
(void)rng;
|
||||
(void)k;
|
||||
return NOT_COMPILED_IN;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Makes a random EC key pair.
|
||||
@@ -121873,6 +121885,7 @@ static void sp_521_from_bin(sp_digit* r, int size, const byte* a, int n)
|
||||
*/
|
||||
static int sp_521_ecc_gen_k_17(WC_RNG* rng, sp_digit* k)
|
||||
{
|
||||
#ifndef WC_NO_RNG
|
||||
int err;
|
||||
byte buf[66];
|
||||
|
||||
@@ -121890,6 +121903,11 @@ static int sp_521_ecc_gen_k_17(WC_RNG* rng, sp_digit* k)
|
||||
while (err == 0);
|
||||
|
||||
return err;
|
||||
#else
|
||||
(void)rng;
|
||||
(void)k;
|
||||
return NOT_COMPILED_IN;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Makes a random EC key pair.
|
||||
|
@@ -39763,6 +39763,7 @@ static void sp_256_from_bin(sp_digit* r, int size, const byte* a, int n)
|
||||
*/
|
||||
static int sp_256_ecc_gen_k_4(WC_RNG* rng, sp_digit* k)
|
||||
{
|
||||
#ifndef WC_NO_RNG
|
||||
int err;
|
||||
byte buf[32];
|
||||
|
||||
@@ -39779,6 +39780,11 @@ static int sp_256_ecc_gen_k_4(WC_RNG* rng, sp_digit* k)
|
||||
while (err == 0);
|
||||
|
||||
return err;
|
||||
#else
|
||||
(void)rng;
|
||||
(void)k;
|
||||
return NOT_COMPILED_IN;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Makes a random EC key pair.
|
||||
@@ -66503,6 +66509,7 @@ static void sp_384_from_bin(sp_digit* r, int size, const byte* a, int n)
|
||||
*/
|
||||
static int sp_384_ecc_gen_k_6(WC_RNG* rng, sp_digit* k)
|
||||
{
|
||||
#ifndef WC_NO_RNG
|
||||
int err;
|
||||
byte buf[48];
|
||||
|
||||
@@ -66519,6 +66526,11 @@ static int sp_384_ecc_gen_k_6(WC_RNG* rng, sp_digit* k)
|
||||
while (err == 0);
|
||||
|
||||
return err;
|
||||
#else
|
||||
(void)rng;
|
||||
(void)k;
|
||||
return NOT_COMPILED_IN;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Makes a random EC key pair.
|
||||
@@ -111641,6 +111653,7 @@ static void sp_521_from_bin(sp_digit* r, int size, const byte* a, int n)
|
||||
*/
|
||||
static int sp_521_ecc_gen_k_9(WC_RNG* rng, sp_digit* k)
|
||||
{
|
||||
#ifndef WC_NO_RNG
|
||||
int err;
|
||||
byte buf[66];
|
||||
|
||||
@@ -111658,6 +111671,11 @@ static int sp_521_ecc_gen_k_9(WC_RNG* rng, sp_digit* k)
|
||||
while (err == 0);
|
||||
|
||||
return err;
|
||||
#else
|
||||
(void)rng;
|
||||
(void)k;
|
||||
return NOT_COMPILED_IN;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Makes a random EC key pair.
|
||||
|
@@ -103929,6 +103929,7 @@ static void sp_256_from_bin(sp_digit* r, int size, const byte* a, int n)
|
||||
*/
|
||||
static int sp_256_ecc_gen_k_8(WC_RNG* rng, sp_digit* k)
|
||||
{
|
||||
#ifndef WC_NO_RNG
|
||||
int err;
|
||||
byte buf[32];
|
||||
|
||||
@@ -103945,6 +103946,11 @@ static int sp_256_ecc_gen_k_8(WC_RNG* rng, sp_digit* k)
|
||||
while (err == 0);
|
||||
|
||||
return err;
|
||||
#else
|
||||
(void)rng;
|
||||
(void)k;
|
||||
return NOT_COMPILED_IN;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Makes a random EC key pair.
|
||||
@@ -114825,6 +114831,7 @@ static void sp_384_from_bin(sp_digit* r, int size, const byte* a, int n)
|
||||
*/
|
||||
static int sp_384_ecc_gen_k_12(WC_RNG* rng, sp_digit* k)
|
||||
{
|
||||
#ifndef WC_NO_RNG
|
||||
int err;
|
||||
byte buf[48];
|
||||
|
||||
@@ -114841,6 +114848,11 @@ static int sp_384_ecc_gen_k_12(WC_RNG* rng, sp_digit* k)
|
||||
while (err == 0);
|
||||
|
||||
return err;
|
||||
#else
|
||||
(void)rng;
|
||||
(void)k;
|
||||
return NOT_COMPILED_IN;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Makes a random EC key pair.
|
||||
@@ -129054,6 +129066,7 @@ static void sp_521_from_bin(sp_digit* r, int size, const byte* a, int n)
|
||||
*/
|
||||
static int sp_521_ecc_gen_k_17(WC_RNG* rng, sp_digit* k)
|
||||
{
|
||||
#ifndef WC_NO_RNG
|
||||
int err;
|
||||
byte buf[66];
|
||||
|
||||
@@ -129071,6 +129084,11 @@ static int sp_521_ecc_gen_k_17(WC_RNG* rng, sp_digit* k)
|
||||
while (err == 0);
|
||||
|
||||
return err;
|
||||
#else
|
||||
(void)rng;
|
||||
(void)k;
|
||||
return NOT_COMPILED_IN;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Makes a random EC key pair.
|
||||
|
@@ -24850,6 +24850,7 @@ static void sp_256_from_bin(sp_digit* r, int size, const byte* a, int n)
|
||||
*/
|
||||
static int sp_256_ecc_gen_k_9(WC_RNG* rng, sp_digit* k)
|
||||
{
|
||||
#ifndef WC_NO_RNG
|
||||
int err;
|
||||
byte buf[32];
|
||||
|
||||
@@ -24866,6 +24867,11 @@ static int sp_256_ecc_gen_k_9(WC_RNG* rng, sp_digit* k)
|
||||
while (err == 0);
|
||||
|
||||
return err;
|
||||
#else
|
||||
(void)rng;
|
||||
(void)k;
|
||||
return NOT_COMPILED_IN;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Makes a random EC key pair.
|
||||
@@ -32887,6 +32893,7 @@ static void sp_384_from_bin(sp_digit* r, int size, const byte* a, int n)
|
||||
*/
|
||||
static int sp_384_ecc_gen_k_15(WC_RNG* rng, sp_digit* k)
|
||||
{
|
||||
#ifndef WC_NO_RNG
|
||||
int err;
|
||||
byte buf[48];
|
||||
|
||||
@@ -32903,6 +32910,11 @@ static int sp_384_ecc_gen_k_15(WC_RNG* rng, sp_digit* k)
|
||||
while (err == 0);
|
||||
|
||||
return err;
|
||||
#else
|
||||
(void)rng;
|
||||
(void)k;
|
||||
return NOT_COMPILED_IN;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Makes a random EC key pair.
|
||||
@@ -40972,6 +40984,7 @@ static void sp_521_from_bin(sp_digit* r, int size, const byte* a, int n)
|
||||
*/
|
||||
static int sp_521_ecc_gen_k_21(WC_RNG* rng, sp_digit* k)
|
||||
{
|
||||
#ifndef WC_NO_RNG
|
||||
int err;
|
||||
byte buf[66];
|
||||
|
||||
@@ -40989,6 +41002,11 @@ static int sp_521_ecc_gen_k_21(WC_RNG* rng, sp_digit* k)
|
||||
while (err == 0);
|
||||
|
||||
return err;
|
||||
#else
|
||||
(void)rng;
|
||||
(void)k;
|
||||
return NOT_COMPILED_IN;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Makes a random EC key pair.
|
||||
|
@@ -25746,6 +25746,7 @@ static void sp_256_from_bin(sp_digit* r, int size, const byte* a, int n)
|
||||
*/
|
||||
static int sp_256_ecc_gen_k_5(WC_RNG* rng, sp_digit* k)
|
||||
{
|
||||
#ifndef WC_NO_RNG
|
||||
int err;
|
||||
byte buf[32];
|
||||
|
||||
@@ -25762,6 +25763,11 @@ static int sp_256_ecc_gen_k_5(WC_RNG* rng, sp_digit* k)
|
||||
while (err == 0);
|
||||
|
||||
return err;
|
||||
#else
|
||||
(void)rng;
|
||||
(void)k;
|
||||
return NOT_COMPILED_IN;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Makes a random EC key pair.
|
||||
@@ -33208,6 +33214,7 @@ static void sp_384_from_bin(sp_digit* r, int size, const byte* a, int n)
|
||||
*/
|
||||
static int sp_384_ecc_gen_k_7(WC_RNG* rng, sp_digit* k)
|
||||
{
|
||||
#ifndef WC_NO_RNG
|
||||
int err;
|
||||
byte buf[48];
|
||||
|
||||
@@ -33224,6 +33231,11 @@ static int sp_384_ecc_gen_k_7(WC_RNG* rng, sp_digit* k)
|
||||
while (err == 0);
|
||||
|
||||
return err;
|
||||
#else
|
||||
(void)rng;
|
||||
(void)k;
|
||||
return NOT_COMPILED_IN;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Makes a random EC key pair.
|
||||
@@ -40621,6 +40633,7 @@ static void sp_521_from_bin(sp_digit* r, int size, const byte* a, int n)
|
||||
*/
|
||||
static int sp_521_ecc_gen_k_9(WC_RNG* rng, sp_digit* k)
|
||||
{
|
||||
#ifndef WC_NO_RNG
|
||||
int err;
|
||||
byte buf[66];
|
||||
|
||||
@@ -40638,6 +40651,11 @@ static int sp_521_ecc_gen_k_9(WC_RNG* rng, sp_digit* k)
|
||||
while (err == 0);
|
||||
|
||||
return err;
|
||||
#else
|
||||
(void)rng;
|
||||
(void)k;
|
||||
return NOT_COMPILED_IN;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Makes a random EC key pair.
|
||||
|
@@ -39460,6 +39460,7 @@ static void sp_256_from_bin(sp_digit* r, int size, const byte* a, int n)
|
||||
*/
|
||||
static int sp_256_ecc_gen_k_8(WC_RNG* rng, sp_digit* k)
|
||||
{
|
||||
#ifndef WC_NO_RNG
|
||||
int err;
|
||||
byte buf[32];
|
||||
|
||||
@@ -39476,6 +39477,11 @@ static int sp_256_ecc_gen_k_8(WC_RNG* rng, sp_digit* k)
|
||||
while (err == 0);
|
||||
|
||||
return err;
|
||||
#else
|
||||
(void)rng;
|
||||
(void)k;
|
||||
return NOT_COMPILED_IN;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Makes a random EC key pair.
|
||||
@@ -49519,6 +49525,7 @@ static void sp_384_from_bin(sp_digit* r, int size, const byte* a, int n)
|
||||
*/
|
||||
static int sp_384_ecc_gen_k_12(WC_RNG* rng, sp_digit* k)
|
||||
{
|
||||
#ifndef WC_NO_RNG
|
||||
int err;
|
||||
byte buf[48];
|
||||
|
||||
@@ -49535,6 +49542,11 @@ static int sp_384_ecc_gen_k_12(WC_RNG* rng, sp_digit* k)
|
||||
while (err == 0);
|
||||
|
||||
return err;
|
||||
#else
|
||||
(void)rng;
|
||||
(void)k;
|
||||
return NOT_COMPILED_IN;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Makes a random EC key pair.
|
||||
@@ -62277,6 +62289,7 @@ static void sp_521_from_bin(sp_digit* r, int size, const byte* a, int n)
|
||||
*/
|
||||
static int sp_521_ecc_gen_k_17(WC_RNG* rng, sp_digit* k)
|
||||
{
|
||||
#ifndef WC_NO_RNG
|
||||
int err;
|
||||
byte buf[66];
|
||||
|
||||
@@ -62294,6 +62307,11 @@ static int sp_521_ecc_gen_k_17(WC_RNG* rng, sp_digit* k)
|
||||
while (err == 0);
|
||||
|
||||
return err;
|
||||
#else
|
||||
(void)rng;
|
||||
(void)k;
|
||||
return NOT_COMPILED_IN;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Makes a random EC key pair.
|
||||
|
@@ -24499,6 +24499,7 @@ static void sp_256_from_bin(sp_digit* r, int size, const byte* a, int n)
|
||||
*/
|
||||
static int sp_256_ecc_gen_k_4(WC_RNG* rng, sp_digit* k)
|
||||
{
|
||||
#ifndef WC_NO_RNG
|
||||
int err;
|
||||
byte buf[32];
|
||||
|
||||
@@ -24515,6 +24516,11 @@ static int sp_256_ecc_gen_k_4(WC_RNG* rng, sp_digit* k)
|
||||
while (err == 0);
|
||||
|
||||
return err;
|
||||
#else
|
||||
(void)rng;
|
||||
(void)k;
|
||||
return NOT_COMPILED_IN;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Makes a random EC key pair.
|
||||
@@ -49472,6 +49478,7 @@ static void sp_384_from_bin(sp_digit* r, int size, const byte* a, int n)
|
||||
*/
|
||||
static int sp_384_ecc_gen_k_6(WC_RNG* rng, sp_digit* k)
|
||||
{
|
||||
#ifndef WC_NO_RNG
|
||||
int err;
|
||||
byte buf[48];
|
||||
|
||||
@@ -49488,6 +49495,11 @@ static int sp_384_ecc_gen_k_6(WC_RNG* rng, sp_digit* k)
|
||||
while (err == 0);
|
||||
|
||||
return err;
|
||||
#else
|
||||
(void)rng;
|
||||
(void)k;
|
||||
return NOT_COMPILED_IN;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Makes a random EC key pair.
|
||||
@@ -90505,6 +90517,7 @@ static void sp_521_from_bin(sp_digit* r, int size, const byte* a, int n)
|
||||
*/
|
||||
static int sp_521_ecc_gen_k_9(WC_RNG* rng, sp_digit* k)
|
||||
{
|
||||
#ifndef WC_NO_RNG
|
||||
int err;
|
||||
byte buf[66];
|
||||
|
||||
@@ -90522,6 +90535,11 @@ static int sp_521_ecc_gen_k_9(WC_RNG* rng, sp_digit* k)
|
||||
while (err == 0);
|
||||
|
||||
return err;
|
||||
#else
|
||||
(void)rng;
|
||||
(void)k;
|
||||
return NOT_COMPILED_IN;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Makes a random EC key pair.
|
||||
|
Reference in New Issue
Block a user