fix a bug in serialization
This commit is contained in:
parent
78fa0c3650
commit
b9e6bff690
@ -376,7 +376,8 @@ void cryptonite_p256_to_bin(const cryptonite_p256_int* src, uint8_t dst[P256_NBY
|
||||
{
|
||||
int i;
|
||||
uint8_t* p = &dst[0];
|
||||
for (i = P256_NDIGITS -1; i > 0; --i) {
|
||||
|
||||
for (i = P256_NDIGITS -1; i >= 0; --i) {
|
||||
const cryptonite_p256_digit dig = P256_DIGIT(src, i);
|
||||
p[0] = dig >> 24;
|
||||
p[1] = dig >> 16;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user