ecc_verifiable_threshold_cryptosystem icon indicating copy to clipboard operation
ecc_verifiable_threshold_cryptosystem copied to clipboard

Cannot decrypt message using other than first t keys in exact order.

Open darklow opened this issue 6 years ago • 0 comments

If you generate keys with 2 of 3 for example and encrypt the message the only way to decrypt is using first 2 keys. It doesn't work if you use 1st and 3rd key or 2nd and 3rd. Is this intended? It also doesn't work if you switch 1st and 2nd keys.

This way it works:

./threshold.py --tshares 2 --nshares 3 --folder ./data
./threshold.py --pkfile ./data/public.csv  --msg 123 --outfile ./c.txt
./threshold.py --file ./data/secret.txt --t 2
 > Reconstructed private key: 76050385198008030720774189841050237388165536102195945104435015448943504304002
./threshold.py --decrypt 76050385198008030720774189841050237388165536102195945104435015448943504304002 --infile ./c.txt
 > 123

But if you try to shuffle secret.txt or use other keys rather than 1st and 2nd in such order, then in can't decrypt messages. Are there any solutions? Thanks.

darklow avatar Nov 16 '19 00:11 darklow