aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey/gost_3410
diff options
context:
space:
mode:
authorlloyd <[email protected]>2011-06-01 14:34:37 +0000
committerlloyd <[email protected]>2011-06-01 14:34:37 +0000
commit917aa9a47695e2b94d5693ffeb6170e8477ee43d (patch)
treec71f5cd27ee430f12cf8ab3f310e9c2bc1870834 /src/pubkey/gost_3410
parent7b10642990382932af4639186057b81f5de87605 (diff)
Multi-expoentiation, using the single bit variation. Using a 2 or 3
bit window may well improve things further. Currently seeing 20-25% improvement in ECDSA signature verification and 25 to 40% in GOST-34.10 verifications.
Diffstat (limited to 'src/pubkey/gost_3410')
-rw-r--r--src/pubkey/gost_3410/gost_3410.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pubkey/gost_3410/gost_3410.cpp b/src/pubkey/gost_3410/gost_3410.cpp
index 100986ccd..f97f83aa0 100644
--- a/src/pubkey/gost_3410/gost_3410.cpp
+++ b/src/pubkey/gost_3410/gost_3410.cpp
@@ -165,7 +165,8 @@ bool GOST_3410_Verification_Operation::verify(const byte msg[], size_t msg_len,
BigInt z1 = (s*v) % order;
BigInt z2 = (-r*v) % order;
- PointGFp R = (z1 * base_point + z2 * public_point);
+ PointGFp R = multi_exponentiate(base_point, z1,
+ public_point, z2);
if(R.is_zero())
return false;