plonk icon indicating copy to clipboard operation
plonk copied to clipboard

Unchecked `WitnessPoint` to `JubJubAffine` conversions

Open ureeves opened this issue 3 years ago • 1 comments

There are still unchecked conversions in the code. Specifically here. We should what pros and cons of keeping/removing them. If we decide to keep them we should comment them properly.

This was first mentioned in this PR.

ureeves avatar Oct 15 '21 15:10 ureeves

File: src/constraint_system/ecc/curve_addition/variable_base_gate.rs

  29   │         let p1 = JubJubAffine::from_raw_unchecked(
  30   │             self.witnesses[&x_1],
  31   │             self.witnesses[&y_1],
  32   │         );
  33   │
  34   │         let p2 = JubJubAffine::from_raw_unchecked(
  35   │             self.witnesses[&x_2],
  36   │             self.witnesses[&y_2],
  37   │         );
 

moCello avatar Nov 22 '21 10:11 moCello

The only conversions like these that remain in the code are in composer.rs and pertain to a point->point conversion. This means there are no remaining unchecked scalar->point conversions anymore. Closing.

ureeves avatar Oct 17 '23 10:10 ureeves