mirror of
https://github.com/mii443/FINAL.git
synced 2025-08-22 15:05:36 +00:00
if(gate == XOR) was appearing two times in a test. Just removed it.
This commit is contained in:
9
test.cpp
9
test.cpp
@ -615,13 +615,6 @@ void test_lwehe_gate_composition_helper(SchemeLWE& s, GateType g)
|
|||||||
exp_out = (exp_out ^ in2); // exp_out = XOR(exp_out, in2)
|
exp_out = (exp_out ^ in2); // exp_out = XOR(exp_out, in2)
|
||||||
//cout << "XOR output: " << output << endl;
|
//cout << "XOR output: " << output << endl;
|
||||||
}
|
}
|
||||||
else if (g == XOR) {
|
|
||||||
auto start = clock();
|
|
||||||
s.xor_gate(ct_res, ct_res, ct);
|
|
||||||
avg_time += float(clock()-start)/CLOCKS_PER_SEC;
|
|
||||||
exp_out = (exp_out ^ in2); // exp_out = XOR(exp_out, in2)
|
|
||||||
//cout << "XOR output: " << output << endl;
|
|
||||||
}
|
|
||||||
else if (g == NOT) {
|
else if (g == NOT) {
|
||||||
auto start = clock();
|
auto start = clock();
|
||||||
s.not_gate(ct_res, ct_res);
|
s.not_gate(ct_res, ct_res);
|
||||||
@ -629,8 +622,6 @@ void test_lwehe_gate_composition_helper(SchemeLWE& s, GateType g)
|
|||||||
exp_out = (1 - exp_out); // exp_out = NOT(exp_out)
|
exp_out = (1 - exp_out); // exp_out = NOT(exp_out)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int output = s.decrypt(ct_res);
|
int output = s.decrypt(ct_res);
|
||||||
assert(output == exp_out);
|
assert(output == exp_out);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user