diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2015-06-11 09:24:17 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2015-06-11 09:24:17 +0800 |
commit | 96c6d37dc13c666f3f3bbd309549bc086ecc54c8 (patch) | |
tree | 0fa79f470a9467477126ea78a8ccbe0bcda01c4e /sample | |
parent | 230fd2e21e6ae655e4d9eb544dae7bef63395015 (diff) | |
download | tangerine-mcl-96c6d37dc13c666f3f3bbd309549bc086ecc54c8.tar.gz tangerine-mcl-96c6d37dc13c666f3f3bbd309549bc086ecc54c8.tar.zst tangerine-mcl-96c6d37dc13c666f3f3bbd309549bc086ecc54c8.zip |
rename Ec::power to Ec::mul
Diffstat (limited to 'sample')
-rw-r--r-- | sample/ecdh_smpl.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sample/ecdh_smpl.cpp b/sample/ecdh_smpl.cpp index 91bb9f6..22b9734 100644 --- a/sample/ecdh_smpl.cpp +++ b/sample/ecdh_smpl.cpp @@ -37,7 +37,7 @@ int main() Ec aP; a.setRand(rg); - Ec::power(aP, P, a); // aP = a * P; + Ec::mul(aP, P, a); // aP = a * P; std::cout << "aP=" << aP << std::endl; @@ -48,17 +48,17 @@ int main() Ec bP; b.setRand(rg); - Ec::power(bP, P, b); // bP = b * P; + Ec::mul(bP, P, b); // bP = b * P; std::cout << "bP=" << bP << std::endl; Ec abP, baP; // Alice uses bP(B's public key) and a(A's priavte key) - Ec::power(abP, bP, a); // abP = a * (bP) + Ec::mul(abP, bP, a); // abP = a * (bP) // Bob uses aP(A's public key) and b(B's private key) - Ec::power(baP, aP, b); // baP = b * (aP) + Ec::mul(baP, aP, b); // baP = b * (aP) if (abP == baP) { std::cout << "key sharing succeed:" << abP << std::endl; |