diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2017-07-07 16:41:10 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2017-07-07 16:41:35 +0800 |
commit | 146fb21c155e76f7d6a0ec8217692a78af1c3c16 (patch) | |
tree | c6e0789f211064491f55db6e1cdc137dc49b0785 | |
parent | 4699d634f041f4674ef04ed94e1adbb33ed9ee13 (diff) | |
download | dexon-mcl-146fb21c155e76f7d6a0ec8217692a78af1c3c16.tar.gz dexon-mcl-146fb21c155e76f7d6a0ec8217692a78af1c3c16.tar.zst dexon-mcl-146fb21c155e76f7d6a0ec8217692a78af1c3c16.zip |
fix spell of paillier
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | include/mcl/paillier.hpp (renamed from include/mcl/pailler.hpp) | 8 | ||||
-rw-r--r-- | test/paillier_test.cpp (renamed from test/pailler_test.cpp) | 6 |
3 files changed, 8 insertions, 8 deletions
@@ -3,7 +3,7 @@ LIB_DIR=lib OBJ_DIR=obj EXE_DIR=bin SRC_SRC=fp.cpp bn_c256.cpp bn_c384.cpp -TEST_SRC=fp_test.cpp ec_test.cpp fp_util_test.cpp window_method_test.cpp elgamal_test.cpp fp_tower_test.cpp gmp_test.cpp bn_test.cpp bn384_test.cpp glv_test.cpp pailler_test.cpp bgn_test.cpp +TEST_SRC=fp_test.cpp ec_test.cpp fp_util_test.cpp window_method_test.cpp elgamal_test.cpp fp_tower_test.cpp gmp_test.cpp bn_test.cpp bn384_test.cpp glv_test.cpp paillier_test.cpp bgn_test.cpp TEST_SRC+=bn_c256_test.cpp bn_c384_test.cpp ifeq ($(CPU),x86-64) MCL_USE_XBYAK?=1 diff --git a/include/mcl/pailler.hpp b/include/mcl/paillier.hpp index 2d8436d..faab203 100644 --- a/include/mcl/pailler.hpp +++ b/include/mcl/paillier.hpp @@ -1,14 +1,14 @@ #pragma once /** @file - @brief pailler encryption + @brief paillier encryption @author MITSUNARI Shigeo(@herumi) @license modified new BSD license http://opensource.org/licenses/BSD-3-Clause */ #include <mcl/gmp_util.hpp> -namespace mcl { namespace pailler { +namespace mcl { namespace paillier { class PublicKey { size_t primeBitSize; @@ -27,7 +27,7 @@ public: template<class RG> void enc(mpz_class& c, const mpz_class& m, RG& rg) const { - if (primeBitSize == 0) throw cybozu::Exception("pailler:PublicKey:not init"); + if (primeBitSize == 0) throw cybozu::Exception("paillier:PublicKey:not init"); mpz_class r; mcl::gmp::getRand(r, primeBitSize, rg); mpz_class a, b; @@ -81,4 +81,4 @@ public: } }; -} } // mcl::pailler +} } // mcl::paillier diff --git a/test/pailler_test.cpp b/test/paillier_test.cpp index 1ab3d0f..3791452 100644 --- a/test/pailler_test.cpp +++ b/test/paillier_test.cpp @@ -1,11 +1,11 @@ #include <cybozu/test.hpp> #include <cybozu/random_generator.hpp> -#include <mcl/pailler.hpp> +#include <mcl/paillier.hpp> -CYBOZU_TEST_AUTO(pailler) +CYBOZU_TEST_AUTO(paillier) { cybozu::RandomGenerator rg; - using namespace mcl::pailler; + using namespace mcl::paillier; SecretKey sec; sec.init(2048, rg); PublicKey pub; |