|
def | __init__ (self, Optional[str] mpc_tool="", bool dry_run=False) |
|
bool | linear_combination (self, str powersoftau_file, str lagrange_file, str linear_comb_out_file, Optional[int] pot_degree=None) |
|
bool | phase2_begin (self, str linear_comb_file, str challenge_0_file) |
|
bool | phase2_verify_contribution (self, str orig_challenge, str response, Optional[str] out_new_challenge=None, Optional[str] transcript=None) |
|
bool | phase2_verify_transcript (self, str orig_challenge, str final_challenge, str transcript, Optional[str] digest_file=None) |
|
bool | phase2_contribute (self, str challenge_file, str output_file, Optional[str] digest_file=None, bool skip_user_input=False) |
|
bool | create_keypair (self, str powersoftau_file, str linear_comb_file, str final_challenge, str keypair_out_file, Optional[int] pot_degree=None) |
|
Wrapper around the 'mpc' utility.
Definition at line 13 of file mpc_command.py.
◆ __init__()
def coordinator.mpc_command.MPCCommand.__init__ |
( |
|
self, |
|
|
Optional[str] |
mpc_tool = "" , |
|
|
bool |
dry_run = False |
|
) |
| |
Definition at line 18 of file mpc_command.py.
18 def __init__(self, mpc_tool: Optional[str] =
"", dry_run: bool =
False):
19 self.mpc_tool = mpc_tool
or _default_mpc_tool()
20 self.dry_run = dry_run
21 assert exists(self.mpc_tool)
◆ create_keypair()
bool coordinator.mpc_command.MPCCommand.create_keypair |
( |
|
self, |
|
|
str |
powersoftau_file, |
|
|
str |
linear_comb_file, |
|
|
str |
final_challenge, |
|
|
str |
keypair_out_file, |
|
|
Optional[int] |
pot_degree = None |
|
) |
| |
Definition at line 72 of file mpc_command.py.
74 powersoftau_file: str,
75 linear_comb_file: str,
77 keypair_out_file: str,
78 pot_degree: Optional[int] =
None) -> bool:
79 args = [
"create-keypair"]
80 args += [
"--pot-degree",
str(pot_degree)]
if pot_degree
else []
86 return self._exec(args)
◆ linear_combination()
bool coordinator.mpc_command.MPCCommand.linear_combination |
( |
|
self, |
|
|
str |
powersoftau_file, |
|
|
str |
lagrange_file, |
|
|
str |
linear_comb_out_file, |
|
|
Optional[int] |
pot_degree = None |
|
) |
| |
Definition at line 23 of file mpc_command.py.
23 def linear_combination(
25 powersoftau_file: str,
27 linear_comb_out_file: str,
28 pot_degree: Optional[int] =
None) -> bool:
29 args = [
"linear-combination"]
30 args += [
"--pot-degree",
str(pot_degree)]
if pot_degree
else []
31 args += [powersoftau_file, lagrange_file, linear_comb_out_file]
32 return self._exec(args)
◆ phase2_begin()
bool coordinator.mpc_command.MPCCommand.phase2_begin |
( |
|
self, |
|
|
str |
linear_comb_file, |
|
|
str |
challenge_0_file |
|
) |
| |
Definition at line 34 of file mpc_command.py.
34 def phase2_begin(self, linear_comb_file: str, challenge_0_file: str) -> bool:
35 return self._exec([
"phase2-begin", linear_comb_file, challenge_0_file])
◆ phase2_contribute()
bool coordinator.mpc_command.MPCCommand.phase2_contribute |
( |
|
self, |
|
|
str |
challenge_file, |
|
|
str |
output_file, |
|
|
Optional[str] |
digest_file = None , |
|
|
bool |
skip_user_input = False |
|
) |
| |
Definition at line 61 of file mpc_command.py.
61 def phase2_contribute(
65 digest_file: Optional[str] =
None,
66 skip_user_input: bool =
False) -> bool:
67 args = [
"phase2-contribute", challenge_file, output_file]
68 args += [
"--digest", digest_file]
if digest_file
else []
69 args += [
"--skip-user-input"]
if skip_user_input
else []
70 return self._exec(args)
◆ phase2_verify_contribution()
bool coordinator.mpc_command.MPCCommand.phase2_verify_contribution |
( |
|
self, |
|
|
str |
orig_challenge, |
|
|
str |
response, |
|
|
Optional[str] |
out_new_challenge = None , |
|
|
Optional[str] |
transcript = None |
|
) |
| |
Definition at line 37 of file mpc_command.py.
37 def phase2_verify_contribution(
41 out_new_challenge: Optional[str] =
None,
42 transcript: Optional[str] =
None) -> bool:
43 args = [
"phase2-verify-contribution"]
44 args += [
"--new-challenge", out_new_challenge] \
45 if out_new_challenge
else []
46 args += [
"--transcript", transcript]
if transcript
else []
47 args += [orig_challenge, response]
48 return self._exec(args)
◆ phase2_verify_transcript()
bool coordinator.mpc_command.MPCCommand.phase2_verify_transcript |
( |
|
self, |
|
|
str |
orig_challenge, |
|
|
str |
final_challenge, |
|
|
str |
transcript, |
|
|
Optional[str] |
digest_file = None |
|
) |
| |
Definition at line 50 of file mpc_command.py.
50 def phase2_verify_transcript(
55 digest_file: Optional[str] =
None) -> bool:
56 args = [
"phase2-verify-transcript"]
57 args += [
"--digest", digest_file]
if digest_file
else []
58 args += [orig_challenge, transcript, final_challenge]
59 return self._exec(args)
◆ dry_run
coordinator.mpc_command.MPCCommand.dry_run |
◆ mpc_tool
coordinator.mpc_command.MPCCommand.mpc_tool |
The documentation for this class was generated from the following file: