Skip to content
Permalink
Browse files

Update ecc.c

  • Loading branch information...
vfcash committed Aug 6, 2019
1 parent 091f7db commit 1de09e7ee7cd195a56c3c6887f5f6d4ae0c3c5de
Showing with 3 additions and 1 deletion.
  1. +3 −1 ecc.c
4 ecc.c
@@ -1065,7 +1065,7 @@ static void ecc_point_decompress(EccPoint *p_point, const uint8_t p_compressed[E
}
}

int ecc_make_key(uint8_t p_privateKey[ECC_BYTES])
int ecc_make_key(uint8_t p_publicKey[ECC_BYTES+1], uint8_t p_privateKey[ECC_BYTES])
{
uint64_t l_private[NUM_ECC_DIGITS];
EccPoint l_public;
@@ -1093,6 +1093,8 @@ int ecc_make_key(uint8_t p_privateKey[ECC_BYTES])
} while(EccPoint_isZero(&l_public));

ecc_native2bytes(p_privateKey, l_private);
ecc_native2bytes(p_publicKey + 1, l_public.x);
p_publicKey[0] = 2 + (l_public.y[0] & 0x01);
return 1;
}

0 comments on commit 1de09e7

Please sign in to comment.
You can’t perform that action at this time.