aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2017-12-18 10:43:03 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2017-12-18 10:43:03 +0800
commit3d693792d46545518eacaa09ce488b3d37b71af8 (patch)
treed8380b64d3e59a92931a154f77cdb3cdd83229be
parente97429b685a8d0d5bae16a247f503811d3725996 (diff)
downloadtangerine-mcl-3d693792d46545518eacaa09ce488b3d37b71af8.tar.gz
tangerine-mcl-3d693792d46545518eacaa09ce488b3d37b71af8.tar.zst
tangerine-mcl-3d693792d46545518eacaa09ce488b3d37b71af8.zip
[she] add test of mulold_deserialize_api
-rw-r--r--test/she_test.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/she_test.cpp b/test/she_test.cpp
index 94bb8f4..3f9fc38 100644
--- a/test/she_test.cpp
+++ b/test/she_test.cpp
@@ -171,6 +171,13 @@ CYBOZU_TEST_AUTO(largeEnc)
pub.enc(c2, x + m);
CipherTextG1::sub(c1, c1, c2);
CYBOZU_TEST_EQUAL(sec.dec(c1), -m);
+
+ pub.enc(c1, 0);
+ CipherTextG1::mul(c1, c1, x);
+ CYBOZU_TEST_ASSERT(sec.isZero(c1));
+ pub.enc(c1, 1);
+ CipherTextG1::mul(c1, c1, x);
+ CYBOZU_TEST_ASSERT(!sec.isZero(c1));
}
CYBOZU_TEST_AUTO(add_mul_add_sub)