curve25519-dalek
curve25519-dalek copied to clipboard
Fix double-and-compress on Ristretto identity (issue #398).
This makes FieldElement::batch_invert()
able to process inputs of value zero (the "inverse" of zero is formally defined to be zero; this is usually the most useful value to return in that case, and it works with the Ristretto double-and-compress formulas). I also modified the unit tests to check that functionality explicitly, both in batch_invert()
itself, and in Ristretto double-and-compress.