From 7f408a29acdca20655786c90809b8fa31b705322 Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Mon, 22 Apr 2019 16:55:23 +0900 Subject: [PATCH] [she] add test mul by const --- ffi/python/she.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ffi/python/she.py b/ffi/python/she.py index ab89752..97d8dc9 100644 --- a/ffi/python/she.py +++ b/ffi/python/she.py @@ -275,6 +275,10 @@ if __name__ == '__main__': if sec.dec(add(c21, c22)) != m21 + m22: print("err5") if sec.dec(sub(c21, c22)) != m21 - m22: print("err6") + # mul const for G1/G2 + if sec.dec(mul(c11, 3)) != m11 * 3: print("err_mul1") + if sec.dec(mul(c21, 7)) != m21 * 7: print("err_mul2") + mt = -56 ct = pub.encGT(mt) if sec.dec(ct) != mt: print("err7")