Skip to content

Commit

Permalink
Add references for these addition chains [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
randombit committed Mar 7, 2019
1 parent b99dd17 commit 841c9cf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/pubkey/ec_group/curve_gfp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,8 @@ class CurveGFp_P384 final : public CurveGFp_NIST

BigInt CurveGFp_P384::invert_element(const BigInt& x, secure_vector<word>& ws) const
{
// From https://briansmith.org/ecc-inversion-addition-chains-01

BigInt r, x2, x3, x15, x30, tmp, rl;

r = x;
Expand Down Expand Up @@ -481,6 +483,8 @@ class CurveGFp_P521 final : public CurveGFp_NIST

BigInt CurveGFp_P521::invert_element(const BigInt& x, secure_vector<word>& ws) const
{
// Addition chain from https://eprint.iacr.org/2014/852.pdf section

BigInt r;
BigInt rl;
BigInt a7;
Expand Down

0 comments on commit 841c9cf

Please sign in to comment.