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

failing #10

Open
Alakazam03 opened this issue Sep 12, 2019 · 0 comments
Open

failing #10

Alakazam03 opened this issue Sep 12, 2019 · 0 comments

Comments

@Alakazam03
Copy link

`let ref tss = tss::shamir::ShamirSecretSharing {
threshold: 1,
share_count: 4,
prime : 11
};

let mobile_number_secret = 9034218120;
let all_shares = tss.share(mobile_number_secret);
let recovered_share = 3;
assert!(recovered_share >= tss.reconstruct_limit());
let recovered_indices: Vec<usize> = (0..recovered_share).collect();
let recovered_shares: &[i64] = &all_shares[0..recovered_share];

// // reconstruct using remaining subset of shares
let reconstructed_secret = tss.reconstruct(&recovered_indices, recovered_shares);
assert_eq!(reconstructed_secret, mobile_number_secret);`

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant