From e3be163f85a2030eef3a6f5883f16b96cce2af5e Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Wed, 28 Jun 2017 23:02:58 +0900 Subject: [PATCH] rename convertCipherText to convertCipherTextAtoM --- include/mcl/bgn.hpp | 6 +++--- test/bgn_test.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/mcl/bgn.hpp b/include/mcl/bgn.hpp index e41896c..242970f 100644 --- a/include/mcl/bgn.hpp +++ b/include/mcl/bgn.hpp @@ -469,7 +469,7 @@ struct BGNT { convert from CipherTextA to CipherTextM cm = ca * Enc(1) */ - void convertCipherText(CipherTextM& cm, const CipherTextA& ca) const + void convertCipherTextAtoM(CipherTextM& cm, const CipherTextA& ca) const { /* Enc(1) = (S, T) = (yP + rP, zP + r xP) = (yP, zP) if r = 0 @@ -480,11 +480,11 @@ struct BGNT { BN::millerLoop(cm.g[2], zP, ca.c2.S); BN::millerLoop(cm.g[3], zP, ca.c2.T); } - void convertCipherText(CipherText& cm, const CipherText& ca) const + void convertCipherTextAtoM(CipherText& cm, const CipherText& ca) const { if (ca.isMultiplied()) throw cybozu::Exception("bgn:PublicKey:convertCipherText:already isMultiplied"); cm.isMultiplied_ = true; - convertCipherText(cm.m, ca.a); + convertCipherTextAtoM(cm.m, ca.a); } /* c += Enc(0) diff --git a/test/bgn_test.cpp b/test/bgn_test.cpp index 491bbaa..daa4161 100644 --- a/test/bgn_test.cpp +++ b/test/bgn_test.cpp @@ -125,7 +125,7 @@ CYBOZU_TEST_AUTO(add_mul_add) CYBOZU_TEST_EQUAL(sec.dec(c[i]), m[i]); CYBOZU_TEST_ASSERT(!c[i].isMultiplied()); CipherText mc; - pub.convertCipherText(mc, c[i]); + pub.convertCipherTextAtoM(mc, c[i]); CYBOZU_TEST_ASSERT(mc.isMultiplied()); CYBOZU_TEST_EQUAL(sec.dec(mc), m[i]); }