Opened on 03/28/2022 at 11:10:23 PM
Last modified on 04/09/2022 at 09:04:38 AM
#2 new task
Unable to reconstruct shares — at Initial Version
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | trivial | Milestone: | |
Version: | Keywords: | Shares reconstruction | |
Cc: |
Description
Have been trying to use the library and created shares of a 32-bytes key as follows:
shares = generate_raw(encoded_public_key, 3, 5)
When reconstructing using - reconstruct_raw(shares) - getting the following error:
key = reconstruct_raw(shares)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/shamira/core.py", line 49, in reconstruct_raw
if len({x for (x, _) in shares}) < len(shares):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/shamira/core.py", line 49, in <setcomp>
if len({x for (x, _) in shares}) < len(shares):
ValueError: too many values to unpack (expected 2)
Also tried:
shares = generate(encoded_public_key, 3, 5)
key = reconstruct(shares, encoding="b32", raw=False)
But the following error appears:
key = reconstruct(shares, encoding="b32", raw=False)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/shamira/core.py", line 95, in reconstruct
bs = reconstruct_raw(*(decode(s, encoding) for s in shares))
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/shamira/core.py", line 95, in <genexpr>
bs = reconstruct_raw(*(decode(s, encoding) for s in shares))
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/shamira/core.py", line 112, in decode
(*_, i, share_str) = share.split(".")
AttributeError: 'list' object has no attribute 'split'
Not completely sure whether I implement it incorrectly or something is wrong. But would appreciate some guidance on the issue.