Skip to content

Commit

Permalink
changed secret key format (#5)
Browse files Browse the repository at this point in the history
Co-authored-by: Dmitry Redkin <dmitry@wallit.eu>
  • Loading branch information
todesstille and todesstille authored Sep 30, 2021
1 parent 24c4748 commit 0f9f4b6
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/eddsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,21 +336,15 @@ void goldilocks_ed448_private_to_secretkey (
uint8_t secretkey[GOLDILOCKS_EDDSA_448_PRIVATE_BYTES],
const uint8_t privkey[GOLDILOCKS_EDDSA_448_PRIVATE_BYTES]
) {

{
// Hash (SHAKE256) the privateKey and write first half to secretKey

hash_hash(
secretkey,
GOLDILOCKS_EDDSA_448_PRIVATE_BYTES,
privkey,
GOLDILOCKS_EDDSA_448_PRIVATE_BYTES
);

// Sets bits due to EdDSA standard

clamp(secretkey);

secretkey[GOLDILOCKS_EDDSA_448_PRIVATE_BYTES - 1] |= 0x80;
}
}

Expand Down

0 comments on commit 0f9f4b6

Please sign in to comment.