Merge pull request #7852 from SparkiDev/sp_no_rng_fix

SP: no RNG fix
This commit is contained in:
Daniel Pouzzner
2024-08-09 15:00:15 -05:00
committed by GitHub
7 changed files with 126 additions and 0 deletions

View File

@@ -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.
@@ -94126,6 +94132,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];
@@ -94142,6 +94149,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.
@@ -121869,6 +121881,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];
@@ -121886,6 +121899,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.

View File

@@ -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.
@@ -66501,6 +66507,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];
@@ -66517,6 +66524,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.
@@ -111637,6 +111649,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];
@@ -111654,6 +111667,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.

View File

@@ -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.
@@ -114823,6 +114829,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];
@@ -114839,6 +114846,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.
@@ -129050,6 +129062,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];
@@ -129067,6 +129080,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.

View File

@@ -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.
@@ -32885,6 +32891,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];
@@ -32901,6 +32908,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.
@@ -40968,6 +40980,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];
@@ -40985,6 +40998,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.

View File

@@ -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.
@@ -33206,6 +33212,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];
@@ -33222,6 +33229,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.
@@ -40617,6 +40629,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];
@@ -40634,6 +40647,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.

View File

@@ -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.
@@ -49517,6 +49523,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];
@@ -49533,6 +49540,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.
@@ -62273,6 +62285,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];
@@ -62290,6 +62303,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.

View File

@@ -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.
@@ -49470,6 +49476,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];
@@ -49486,6 +49493,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.
@@ -90501,6 +90513,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];
@@ -90518,6 +90531,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.