Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
Merge pull request #32 from apache/issue18-add-python-flow-example
Browse files Browse the repository at this point in the history
Fix paillier sk dump and build warnings
  • Loading branch information
samuele-andreoli committed Mar 20, 2020
2 parents 8133fdc + 722e0c8 commit 0ac5fb4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
9 changes: 9 additions & 0 deletions include/amcl/mpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,15 @@ int MPC_ECDSA_VERIFY(const octet *HM,octet *PK, octet *R,octet *S);
*/
void MPC_K_GENERATE(csprng *RNG, octet *K);

/** \brief Generate a random K for and ECDSA signature
*
* Generate a random K modulo the curve order
*
* @param RNG Pointer to a cryptographically secure PRNG
* @param K Destination octet for the randomly generated value
*/
void MPC_K_GENERATE(csprng *RNG, octet *K);

/** \brief Calculate the inverse of the sum of kgamma values
*
* Calculate the inverse of the sum of kgamma values
Expand Down
4 changes: 1 addition & 3 deletions python/amcl/mpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
extern int ECP_SECP256K1_PUBLIC_KEY_VALIDATE(octet *W);
extern void MPC_ECDSA_KEY_PAIR_GENERATE(csprng *RNG, octet *S, octet *W);
extern int MPC_ECDSA_VERIFY(const octet *HM,octet *PK, octet *R,octet *S);
extern int MPC_ECDSA_VERIFY(const octet *HM, octet *PK, octet *R, octet *S);
extern void MPC_MTA_CLIENT1(csprng *RNG, PAILLIER_public_key* PUB, octet* A, octet* CA, octet* R);
extern void MPC_MTA_CLIENT2(PAILLIER_private_key *PRIV, octet* CB, octet *ALPHA);
extern void MPC_MTA_SERVER(csprng *RNG, PAILLIER_public_key *PUB, octet *B, octet *CA, octet *Z, octet *R, octet *CB, octet *BETA);
Expand Down Expand Up @@ -729,7 +729,5 @@ def mpc_dump_paillier_sk(paillier_sk):
# Clear memory
core_utils.clear_octet(p)
core_utils.clear_octet(q)
core_utils.clear_octet(p2)
core_utils.clear_octet(q2)

return p2, q2
1 change: 0 additions & 1 deletion src/mpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ under the License.
/* Generate ECDSA key pair */
void MPC_ECDSA_KEY_PAIR_GENERATE(csprng *RNG, octet* S, octet *W)
{

BIG_256_56 s;
BIG_256_56 q;

Expand Down

0 comments on commit 0ac5fb4

Please sign in to comment.