Repository navigation
Conversation
Existing engines retain ordinary preparation; engines can override the method for repeated public G2 terms without changing the prepared type. Source: https://github.com/zakura-core/common/blob/v2.1.0/crates/pairing/src/lib.rs License: MIT OR Apache-2.0
str4d
commented
Oct 6, 2026
| /// Implementations may be variable time in `q`. This API should only be used with | ||
| /// public points, such as those in Groth16 verifying keys. For all other points, | ||
| /// use `Self::G2Prepared::from(q)` instead. | ||
| fn prepare_reusable_g2(q: Self::G2Affine) -> Self::G2Prepared { |
Member
Author
There was a problem hiding this comment.
I considered giving this a _vartime suffix, but it felt partially duplicative of the _reusable part of the name, and as I expect the usage of this particular API to be relatively constrained (both by way of this only applying to pairings, and also being part of the optimised pathway that crates like groth16 will use), I think the clear Guarantees section is sufficient in this case.
This was referenced Oct 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ported from
zakura-pairing 2.1.0.This changes a trait, but does not require an RFC, because it is an addition (due to having a default impl) that: