MCPcopy Create free account
hub / github.com/data61/MP-SPDZ / add

Function add

FHE/Ciphertext.cpp:40–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38
39
40void add(Ciphertext& ans,const Ciphertext& c0,const Ciphertext& c1)
41{
42 if (c0.params!=c1.params) { throw params_mismatch(); }
43 if (ans.params!=c1.params) { throw params_mismatch(); }
44 ans.pk_id = check_pk_id(c0.pk_id, c1.pk_id);
45 add(ans.cc0,c0.cc0,c1.cc0);
46 add(ans.cc1,c0.cc1,c1.cc1);
47}
48
49
50void sub(Ciphertext& ans,const Ciphertext& c0,const Ciphertext& c1)

Callers 1

mulFunction · 0.70

Calls 2

params_mismatchClass · 0.85
check_pk_idFunction · 0.85

Tested by

no test coverage detected