Skip to content

Commit

Permalink
Write 2^32 instead of 2**32 to make pydoc happy...
Browse files Browse the repository at this point in the history
  • Loading branch information
real-or-random committed Jul 8, 2024
1 parent 0419643 commit e536a4d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ A `SessionParams` tuple holds the common parameters of a DKG session.
- `hostpubkeys` - Ordered list of the host public keys of all participants.
- `t` - The participation threshold `t`.
This is the number of participants that will be required to sign.
It must hold that `1 <= t <= len(hostpubkeys)` and `t <= 2*32 - 1`.
It must hold that `1 <= t <= len(hostpubkeys)` and `t <= 2^32 - 1`.

Participants must ensure that they have obtained authentic host
public keys of all the other participants in the session to make
Expand Down Expand Up @@ -690,7 +690,7 @@ have obtained authentic public host keys.
for some `i`, which is indicated as part of the exception.
- `DuplicateHostpubkeyError` - If `hostpubkeys` contains duplicates.
- `ThresholdError` - If `1 <= t <= len(hostpubkeys)` does not hold.
- `OverflowError` - If `t >= 2*32` (so `t` cannot be serialized in 4 bytes).
- `OverflowError` - If `t >= 2^32` (so `t` cannot be serialized in 4 bytes).

#### DKGOutput Tuples

Expand Down Expand Up @@ -742,7 +742,7 @@ Perform a participant's first step of a ChillDKG session.
for some `i`, which is indicated as part of the exception.
- `DuplicateHostpubkeyError` - If `hostpubkeys` contains duplicates.
- `ThresholdError` - If `1 <= t <= len(hostpubkeys)` does not hold.
- `OverflowError` - If `t >= 2*32` (so `t` cannot be serialized in 4 bytes).
- `OverflowError` - If `t >= 2^32` (so `t` cannot be serialized in 4 bytes).

#### participant\_step2

Expand Down Expand Up @@ -855,7 +855,7 @@ Perform the coordinator's first step of a ChillDKG session.
for some `i`, which is indicated as part of the exception.
- `DuplicateHostpubkeyError` - If `hostpubkeys` contains duplicates.
- `ThresholdError` - If `1 <= t <= len(hostpubkeys)` does not hold.
- `OverflowError` - If `t >= 2*32` (so `t` cannot be serialized in 4 bytes).
- `OverflowError` - If `t >= 2^32` (so `t` cannot be serialized in 4 bytes).

#### coordinator\_finalize

Expand Down
8 changes: 4 additions & 4 deletions python/chilldkg_ref/chilldkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class SessionParams(NamedTuple):
hostpubkeys: Ordered list of the host public keys of all participants.
t: The participation threshold `t`.
This is the number of participants that will be required to sign.
It must hold that `1 <= t <= len(hostpubkeys)` and `t <= 2**32 - 1`.
It must hold that `1 <= t <= len(hostpubkeys)` and `t <= 2^32 - 1`.
Participants must ensure that they have obtained authentic host
public keys of all the other participants in the session to make
Expand Down Expand Up @@ -250,7 +250,7 @@ def params_id(params: SessionParams) -> bytes:
for some `i`, which is indicated as part of the exception.
DuplicateHostpubkeyError: If `hostpubkeys` contains duplicates.
ThresholdError: If `1 <= t <= len(hostpubkeys)` does not hold.
OverflowError: If `t >= 2**32` (so `t` cannot be serialized in 4 bytes).
OverflowError: If `t >= 2^32` (so `t` cannot be serialized in 4 bytes).
"""
params_validate(params)
(hostpubkeys, t) = params
Expand Down Expand Up @@ -399,7 +399,7 @@ def participant_step1(
for some `i`, which is indicated as part of the exception.
DuplicateHostpubkeyError: If `hostpubkeys` contains duplicates.
ThresholdError: If `1 <= t <= len(hostpubkeys)` does not hold.
OverflowError: If `t >= 2**32` (so `t` cannot be serialized in 4 bytes).
OverflowError: If `t >= 2^32` (so `t` cannot be serialized in 4 bytes).
"""
hostseckey, hostpubkey = hostkeypair(seed) # SeedError if len(seed) != 32

Expand Down Expand Up @@ -536,7 +536,7 @@ def coordinator_step1(
for some `i`, which is indicated as part of the exception.
DuplicateHostpubkeyError: If `hostpubkeys` contains duplicates.
ThresholdError: If `1 <= t <= len(hostpubkeys)` does not hold.
OverflowError: If `t >= 2**32` (so `t` cannot be serialized in 4 bytes).
OverflowError: If `t >= 2^32` (so `t` cannot be serialized in 4 bytes).
"""
params_validate(params)
(hostpubkeys, t) = params
Expand Down

0 comments on commit e536a4d

Please sign in to comment.