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

Function KeyGen

FHE/FHE_Keys.cpp:36–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34
35
36void KeyGen(FHE_PK& PK,FHE_SK& SK,PRNG& G)
37{
38 if (PK.params!=SK.params) { throw params_mismatch(); }
39 if (PK.pr!=SK.pr) { throw pr_mismatch(); }
40
41 Rq_Element sk = PK.sample_secret_key(G);
42 SK.assign(sk);
43 PK.KeyGen(sk, G);
44}
45
46
47FHE_PK::FHE_PK(const FHE_Params& pms) :

Callers 2

setup_keysMethod · 0.85
generateMethod · 0.85

Calls 5

params_mismatchClass · 0.85
pr_mismatchClass · 0.85
sample_secret_keyMethod · 0.80
KeyGenMethod · 0.80
assignMethod · 0.45

Tested by

no test coverage detected