Skip to content

Commit f8ece0a

Browse files
committed
fix: missing comments projective
1 parent a75f9e7 commit f8ece0a

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

crates/zkvm/lib/src/ecdsa/projective.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -319,17 +319,11 @@ impl<C: ECDSACurve> SubAssign<&AffinePoint<C>> for ProjectivePoint<C> {
319319
}
320320
}
321321

322-
// todo: not actually true?
323322
impl<C: ECDSACurve> DefaultIsZeroes for ProjectivePoint<C> {}
324323

325324
impl<C: ECDSACurve> ConditionallySelectable for ProjectivePoint<C> {
326325
fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self {
327-
// Note: we dont care about constant time operations in the vm.
328-
if choice.into() {
329-
*b
330-
} else {
331-
*a
332-
}
326+
Self { inner: AffinePoint::conditional_select(&a.inner, &b.inner, choice) }
333327
}
334328
}
335329

@@ -347,7 +341,6 @@ impl<C: ECDSACurve> PartialEq for ProjectivePoint<C> {
347341

348342
impl<C: ECDSACurve> Eq for ProjectivePoint<C> {}
349343

350-
// Traits for hash2curve
351344
impl<C: ECDSACurve> GroupEncoding for ProjectivePoint<C>
352345
where
353346
FieldBytes<C>: Copy,
@@ -361,7 +354,7 @@ where
361354
}
362355

363356
fn from_bytes_unchecked(bytes: &Self::Repr) -> CtOption<Self> {
364-
// No unchecked conversion possible for compressed points
357+
// No unchecked conversion possible for compressed points.
365358
Self::from_bytes(bytes)
366359
}
367360

0 commit comments

Comments
 (0)