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