Merge pull request #284 from zcash/doc-batch-invert-zero

Document that batch inversion in arithmetic.rs leaves zero as zero
This commit is contained in:
str4d 2021-06-04 01:15:50 +01:00 committed by GitHub
commit 32cdcfa66f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -11,7 +11,8 @@ pub use pasta_curves::arithmetic::*;
/// field elements to be inverted in a batch.
pub trait BatchInvert<F: Field> {
/// Consume this iterator and invert each field element (when nonzero),
/// returning the inverse of all nonzero field elements.
/// returning the inverse of all nonzero field elements. Zero elements
/// are left as zero.
fn batch_invert(self) -> F;
}