Skip to content

perf: switch SW_EC to projective coordinates - guest-libs#2410

Open
Tuanlinh12312 wants to merge 1 commit intoperf/sw-ec-projective-INT-6035from
perf/sw-ec-projective-INT-6136
Open

perf: switch SW_EC to projective coordinates - guest-libs#2410
Tuanlinh12312 wants to merge 1 commit intoperf/sw-ec-projective-INT-6035from
perf/sw-ec-projective-INT-6136

Conversation

@Tuanlinh12312
Copy link

Resolves INT-6136.

Update k256, p256, and pairing guest libraries to use projective coordinates:

  • Add z coordinate to all point generators (z=1)
  • Normalize before extracting affine coordinates (x_be_bytes, y_be_bytes, AffineCoordinates, ToEncodedPoint, to_affine)
  • Use cross-multiplication for projective ConstantTimeEq
  • Select all 3 coordinates in ConditionallySelectable
  • Remove DefaultIsZeroes (identity is (0,1,0), not all zeros)
  • Switch G2 pairing modules from impl_sw_affine! to impl_sw_proj!
  • Add .normalize() in tests before comparing to known affine values

@Tuanlinh12312 Tuanlinh12312 changed the title perf: switch SW_EC to projective coordinates - guest-libs (INT-6136) perf: switch SW_EC to projective coordinates - guest-libs Feb 13, 2026
@Tuanlinh12312 Tuanlinh12312 force-pushed the perf/sw-ec-projective-INT-6035 branch from 3fbfac8 to 9e856e4 Compare February 13, 2026 22:15
@Tuanlinh12312 Tuanlinh12312 force-pushed the perf/sw-ec-projective-INT-6136 branch from 2c45c24 to 2ef2027 Compare February 13, 2026 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant