From 2e980ffb16d883f5caa70102c9b0debfae8b7233 Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Wed, 28 Jun 2017 23:08:15 +0900 Subject: [PATCH] add enc CipherTextGi --- include/mcl/bgn.hpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/include/mcl/bgn.hpp b/include/mcl/bgn.hpp index 242970f..1154399 100644 --- a/include/mcl/bgn.hpp +++ b/include/mcl/bgn.hpp @@ -453,11 +453,21 @@ struct BGNT { T += C; } public: + template + void enc(CipherTextG1& c, int m, RG& rg) const + { + enc1(c.S, c.T, P, xP, yP, zP, m, rg); + } + template + void enc(CipherTextG2& c, int m, RG& rg) const + { + enc1(c.S, c.T, Q, xQ, yQ, zQ, m, rg); + } template void enc(CipherTextA& c, int m, RG& rg) const { - enc1(c.c1.S, c.c1.T, P, xP, yP, zP, m, rg); - enc1(c.c2.S, c.c2.T, Q, xQ, yQ, zQ, m, rg); + enc(c.c1, m, rg); + enc(c.c2, m, rg); } template void enc(CipherText& c, int m, RG& rg) const