Skip to content

Commit

Permalink
Merge pull request #2 from CodaProtocol/sk-fix
Browse files Browse the repository at this point in the history
fix length of write for sk
  • Loading branch information
imeckler authored Apr 1, 2020
2 parents 6db5464 + c2d56a7 commit 828660e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="coda-ledger-cli",
version="0.0.4",
version="0.0.6",
author="Rebekah Mercer",
author_email="[email protected]",
description="Scripts to interact with the Coda Ledger app",
Expand Down
7 changes: 1 addition & 6 deletions src/crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,11 +440,8 @@ void generate_keypair(unsigned int index, affine *pub_key, scalar priv_key) {
os_perso_derive_node_bip32(CX_CURVE_256K1, bip32_path,
sizeof(bip32_path) / sizeof(bip32_path[0]),
priv_key, chain);
os_memcpy(priv_key + 32, chain, 32);
os_memcpy(priv_key + 64, chain, 32);

os_memcpy(priv_key + 32, chain, 16);
affine_scalar_mul(pub_key, priv_key, &affine_one);
// os_memset(priv_key, 0, sizeof(priv_key));
return;
}

Expand All @@ -458,8 +455,6 @@ inline unsigned int is_odd(const field y) { return (y[field_bytes - 1] & 1); }
void schnorr_hash(scalar out, const scalar in0, const scalar in1,
const scalar in2, const scalar in3, const scalar in4) {

// state pos = {{0}, {0}, {0}};

/*
// state after applying {{0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x65,
0x72, 0x75, 0x74, 0x61, 0x6e, 0x67, 0x69, 0x53, 0x61, 0x64, 0x6f, 0x43},
Expand Down

0 comments on commit 828660e

Please sign in to comment.