Actually use result of mod_sqrt
This commit is contained in:
parent
eebd026565
commit
2ffa34e673
1 changed files with 6 additions and 3 deletions
|
@ -186,9 +186,12 @@ impl ProductKey {
|
|||
|
||||
s = &s + &c;
|
||||
|
||||
if mod_sqrt(&s, gen_order).is_none() {
|
||||
no_square = true;
|
||||
};
|
||||
match mod_sqrt(&s, gen_order) {
|
||||
Some(res) => s = res,
|
||||
None => {
|
||||
no_square = true;
|
||||
}
|
||||
}
|
||||
|
||||
s = (s - e).mod_floor(gen_order);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue