diff options
author | Jack Lloyd <[email protected]> | 2018-03-14 06:48:22 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-03-14 06:48:22 -0400 |
commit | 072f30e4e6ba0d5006a5e900ee28677e6354206c (patch) | |
tree | 4ae88c528d3222f9cdedda8ec22d05c0a94c6438 /src/lib/pubkey/ec_group | |
parent | e3c05e70379f2ba593724a072aa3d6404eebbe81 (diff) |
Avoid creating a temp here
Diffstat (limited to 'src/lib/pubkey/ec_group')
-rw-r--r-- | src/lib/pubkey/ec_group/curve_gfp.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/pubkey/ec_group/curve_gfp.cpp b/src/lib/pubkey/ec_group/curve_gfp.cpp index 131f69c70..d841437f3 100644 --- a/src/lib/pubkey/ec_group/curve_gfp.cpp +++ b/src/lib/pubkey/ec_group/curve_gfp.cpp @@ -100,7 +100,7 @@ void CurveGFp_Montgomery::curve_mul(BigInt& z, const BigInt& x, const BigInt& y, { if(x.is_zero() || y.is_zero()) { - z = 0; + z.clear(); return; } @@ -126,7 +126,7 @@ void CurveGFp_Montgomery::curve_sqr(BigInt& z, const BigInt& x, { if(x.is_zero()) { - z = 0; + z.clear(); return; } @@ -205,7 +205,7 @@ void CurveGFp_NIST::curve_mul(BigInt& z, const BigInt& x, const BigInt& y, { if(x.is_zero() || y.is_zero()) { - z = 0; + z.clear(); return; } @@ -229,7 +229,7 @@ void CurveGFp_NIST::curve_sqr(BigInt& z, const BigInt& x, { if(x.is_zero()) { - z = 0; + z.clear(); return; } |