mirror of
https://github.com/saymrwulf/risc0-curve25519-dalek-source.git
synced 2026-09-04 20:03:40 +00:00
add non-zero assert in field batch_invert
This commit is contained in:
parent
a659b92305
commit
2a46cd3b20
1 changed files with 3 additions and 0 deletions
|
|
@ -154,6 +154,9 @@ impl FieldElement {
|
|||
acc = &acc * input;
|
||||
}
|
||||
|
||||
// acc is nonzero iff all inputs are nonzero
|
||||
assert_eq!(acc.is_zero().unwrap_u8(), 0);
|
||||
|
||||
// Compute the inverse of all products
|
||||
acc = acc.invert();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue