Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chilldkg: fix enc_secshare deserialization #76

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions python/chilldkg_ref/chilldkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from secp256k1proto.secp256k1 import Scalar, GE
from secp256k1proto.bip340 import schnorr_sign, schnorr_verify
from secp256k1proto.keys import pubkey_gen_plain
from secp256k1proto.util import int_from_bytes, bytes_from_int
from secp256k1proto.util import bytes_from_int

from .vss import VSSCommitment
from . import encpedpop
Expand Down Expand Up @@ -392,7 +392,7 @@ def deserialize_recovery_data(
if len(rest) < 32 * n:
raise ValueError
enc_secshares, rest = (
[Scalar(int_from_bytes(rest[i : i + 32])) for i in range(0, 32 * n, 32)],
[Scalar.from_bytes(rest[i : i + 32]) for i in range(0, 32 * n, 32)],
rest[32 * n :],
)

Expand Down
Loading