mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Implement a binary search for BatchVerifier blame
Adds helper functions to verify and, on failure, blame, which move an unwrap from callers into multiexp where it's guaranteed to be safe and easily verified to be proper. Closes https://github.com/serai-dex/serai/issues/10.
This commit is contained in:
@@ -225,10 +225,7 @@ fn complete_r2<R: RngCore + CryptoRng, C: Curve>(
|
||||
|
||||
batch.queue(rng, *l, values);
|
||||
}
|
||||
|
||||
if !batch.verify() {
|
||||
Err(FrostError::InvalidCommitment(batch.blame_vartime().unwrap()))?;
|
||||
}
|
||||
batch.verify_with_vartime_blame().map_err(|l| FrostError::InvalidCommitment(l))?;
|
||||
|
||||
// TODO: Clear the original share
|
||||
|
||||
|
||||
Reference in New Issue
Block a user