Skip to content

Commit 57cc542

Browse files
reference: Rename _step to _step1 if there's step2
1 parent 402e315 commit 57cc542

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

Diff for: reference/chilldkg.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def participant_step1(
171171
(hostpubkeys, t) = params
172172

173173
participant_idx = hostpubkeys.index(hostpubkey)
174-
enc_state, enc_pmsg = encpedpop.participant_step(
174+
enc_state, enc_pmsg = encpedpop.participant_step1(
175175
seed, t, hostseckey, hostpubkeys, participant_idx
176176
)
177177
state1 = ParticipantState1(params, participant_idx, enc_state)

Diff for: reference/encpedpop.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def session_seed(seed: bytes, enckeys: List[bytes], t: int) -> Tuple[bytes, byte
7373
return seed_, enc_context
7474

7575

76-
def participant_step(
76+
def participant_step1(
7777
seed: bytes, t: int, deckey: bytes, enckeys: List[bytes], participant_idx: int
7878
) -> Tuple[ParticipantState, ParticipantMsg]:
7979
assert t < 2 ** (4 * 8)
@@ -83,7 +83,7 @@ def participant_step(
8383
# encrypted under wrong enckeys.
8484
seed_, enc_context = session_seed(seed, enckeys, t)
8585

86-
simpl_state, simpl_pmsg, shares = simplpedpop.participant_step(
86+
simpl_state, simpl_pmsg, shares = simplpedpop.participant_step1(
8787
seed_, t, n, participant_idx
8888
)
8989
assert len(shares) == n

Diff for: reference/simplpedpop.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class ParticipantState(NamedTuple):
112112
# ChillDKG will take care of invoking the equality check protocol.
113113

114114

115-
def participant_step(
115+
def participant_step1(
116116
seed: bytes, t: int, n: int, participant_idx: int
117117
) -> Tuple[ParticipantState, ParticipantMsg, List[Scalar]]:
118118
"""

Diff for: reference/tests.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def simulate_simplpedpop(seeds, t) -> List[Tuple[simplpedpop.DKGOutput, bytes]]:
3232
n = len(seeds)
3333
prets = []
3434
for i in range(n):
35-
prets += [simplpedpop.participant_step(seeds[i], t, n, i)]
35+
prets += [simplpedpop.participant_step1(seeds[i], t, n, i)]
3636
pmsgs = [ret[1] for ret in prets]
3737

3838
cmsg, cout, ceq = simplpedpop.coordinator_step(pmsgs, t, n)
@@ -61,7 +61,7 @@ def simulate_encpedpop(seeds, t) -> List[Tuple[simplpedpop.DKGOutput, bytes]]:
6161
enckeys = [pret[1] for pret in enc_prets0]
6262
for i in range(n):
6363
deckey = enc_prets0[i][0]
64-
enc_prets1 += [encpedpop.participant_step(seeds[i], t, deckey, enckeys, i)]
64+
enc_prets1 += [encpedpop.participant_step1(seeds[i], t, deckey, enckeys, i)]
6565

6666
pmsgs = [pmsg for (_, pmsg) in enc_prets1]
6767
pstates = [pstate for (pstate, _) in enc_prets1]

0 commit comments

Comments
 (0)