From e536a4d4ebccf26fac8f772f708069cf4acdb1b7 Mon Sep 17 00:00:00 2001 From: Tim Ruffing Date: Mon, 8 Jul 2024 21:34:40 +0200 Subject: [PATCH] Write 2^32 instead of 2**32 to make pydoc happy... --- README.md | 8 ++++---- python/chilldkg_ref/chilldkg.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index f800d46..e875e0c 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/python/chilldkg_ref/chilldkg.py b/python/chilldkg_ref/chilldkg.py index 9cd59fb..4e64ba5 100644 --- a/python/chilldkg_ref/chilldkg.py +++ b/python/chilldkg_ref/chilldkg.py @@ -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 @@ -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 @@ -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 @@ -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