mirror of
https://salsa.debian.org/gnuk-team/gnuk/gnuk.git
synced 2024-09-20 10:50:09 +00:00
minor fixes
This commit is contained in:
parent
ea73e1ee7e
commit
13a52a0862
4
src/bn.c
4
src/bn.c
@ -138,7 +138,9 @@ bn256_sub_uint (bn256 *X, const bn256 *A, uint32_t w)
|
|||||||
return borrow;
|
return borrow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef BN256_C_IMPLEMENTATION
|
||||||
#define ASM_IMPLEMENTATION 1
|
#define ASM_IMPLEMENTATION 1
|
||||||
|
#endif
|
||||||
void
|
void
|
||||||
bn256_mul (bn512 *X, const bn256 *A, const bn256 *B)
|
bn256_mul (bn512 *X, const bn256 *A, const bn256 *B)
|
||||||
{
|
{
|
||||||
@ -413,6 +415,7 @@ bn256_cmp (const bn256 *A, const bn256 *B)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef BN256_NO_RANDOM
|
||||||
void
|
void
|
||||||
bn256_random (bn256 *X)
|
bn256_random (bn256 *X)
|
||||||
{
|
{
|
||||||
@ -429,3 +432,4 @@ bn256_random (bn256 *X)
|
|||||||
|
|
||||||
random_bytes_free (rand);
|
random_bytes_free (rand);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
@ -193,6 +193,16 @@ modp256r1_reduce (bn256 *X, const bn512 *A)
|
|||||||
memcpy (tmp, X, sizeof (bn256));
|
memcpy (tmp, X, sizeof (bn256));
|
||||||
else
|
else
|
||||||
memcpy (X, tmp, sizeof (bn256));
|
memcpy (X, tmp, sizeof (bn256));
|
||||||
|
|
||||||
|
#undef S1
|
||||||
|
#undef S2
|
||||||
|
#undef S3
|
||||||
|
#undef S4
|
||||||
|
#undef S5
|
||||||
|
#undef S6
|
||||||
|
#undef S7
|
||||||
|
#undef S8
|
||||||
|
#undef S9
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user