From 0709a27e46e6837eba2b7e512b4460501f1cccea Mon Sep 17 00:00:00 2001 From: Isis Lovecruft Date: Sat, 26 Oct 2019 04:26:59 +0000 Subject: [PATCH] Remove test for validity of randomly generated RistrettoPoints. This test is no longer necessary as it originally had a possibility of failure due to the original implementation of the invsqrt() function in the decompression algorithm. The failure with the current API is nonexistent. * FIXES #288. --- src/ristretto.rs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/ristretto.rs b/src/ristretto.rs index 6d53e89..becd8f9 100644 --- a/src/ristretto.rs +++ b/src/ristretto.rs @@ -1322,19 +1322,6 @@ mod test { } } - #[cfg(feature = "rand")] - #[test] - fn random_is_valid() { - let mut rng = OsRng::new().unwrap(); - for _ in 0..100 { - let P = RistrettoPoint::random(&mut rng); - // Check that P is on the curve - assert!(P.0.is_valid()); - // Check that P is in the image of the ristretto map - P.compress(); - } - } - #[test] fn vartime_precomputed_vs_nonprecomputed_multiscalar() { let mut rng = rand::thread_rng();