mirror of
https://github.com/mii443/RustySecrets.git
synced 2025-08-22 16:25:32 +00:00
Fix bug where threshold did not set deg of secret polynomial
Fixes #43. Fixes a syntactic error. Threshold should determine the number of coefficients in the secret polynomial. As is the code is equivalent to threshold always being 2.
This commit is contained in:
committed by
Romain Ruetschi
parent
3e89d1b1ca
commit
3de16890a4
@ -72,7 +72,7 @@ impl SSS {
|
|||||||
for _ in 0..(shares_count as usize) {
|
for _ in 0..(shares_count as usize) {
|
||||||
result.push(vec![0u8; src.len()]);
|
result.push(vec![0u8; src.len()]);
|
||||||
}
|
}
|
||||||
let mut col_in = vec![0u8, threshold];
|
let mut col_in = vec![0u8; threshold as usize];
|
||||||
let mut col_out = Vec::with_capacity(shares_count as usize);
|
let mut col_out = Vec::with_capacity(shares_count as usize);
|
||||||
let mut osrng = OsRng::new()?;
|
let mut osrng = OsRng::new()?;
|
||||||
for (c, &s) in src.iter().enumerate() {
|
for (c, &s) in src.iter().enumerate() {
|
||||||
|
Reference in New Issue
Block a user