MCPcopy Create free account
hub / github.com/coinbase/cb-mpc / com

Function com

demo-cpp/basic_primitive/main.cpp:41–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41error_t com()
42{
43 ecurve_t c = coinbase::crypto::curve_p256;
44 ecc_point_t G = c.generator();
45 buf_t sid = coinbase::crypto::gen_random(16);
46
47 coinbase::crypto::mpc_pid_t pid = coinbase::crypto::pid_from_name("test");
48 coinbase::crypto::commitment_t com(sid, pid);
49 com.gen(G);
50 std::cout << bn_t(com.msg).to_string() << std::endl;
51 return com.open(G);
52}
53
54int main(int argc, const char* argv[])
55{

Callers 1

mainFunction · 0.85

Calls 6

gen_randomFunction · 0.85
pid_from_nameFunction · 0.85
bn_tClass · 0.50
genMethod · 0.45
to_stringMethod · 0.45
openMethod · 0.45

Tested by

no test coverage detected