Remove redundant point checks in commitment verifier

Co-authored-by: Jack Grigg <jack@electriccoin.co>
This commit is contained in:
ying tong 2020-10-21 19:22:21 +08:00 committed by Jack Grigg
parent 2375507f4f
commit 7822201c9c
1 changed files with 1 additions and 9 deletions

View File

@ -111,9 +111,6 @@ impl<C: CurveAffine> Proof<C> {
// Feed L and R into the transcript. // Feed L and R into the transcript.
let l = round.0; let l = round.0;
let r = round.1; let r = round.1;
if bool::from(l.get_xy().is_none() | r.get_xy().is_none()) {
return Err(Error::OpeningError);
}
transcript transcript
.absorb_point(&l) .absorb_point(&l)
.map_err(|_| Error::OpeningError)?; .map_err(|_| Error::OpeningError)?;
@ -152,14 +149,9 @@ impl<C: CurveAffine> Proof<C> {
challenges_sq_packed.push(Challenge(challenge_sq_packed)); challenges_sq_packed.push(Challenge(challenge_sq_packed));
} }
let delta = self.delta;
if bool::from(delta.get_xy().is_none()) {
return Err(Error::OpeningError);
}
// Feed delta into the transcript // Feed delta into the transcript
transcript transcript
.absorb_point(&delta) .absorb_point(&self.delta)
.map_err(|_| Error::OpeningError)?; .map_err(|_| Error::OpeningError)?;
// Get the challenge `c` // Get the challenge `c`