Revive base field type on Curve trait #29
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.
Curves operate on certain base fields. Sometimes in can be useful to have
a direct reference to which field this is. With the
Base
associate typeyou can not get that information.
More concretely this will be used by some GPU code, which needs access to
the information which base field a curve operates on.
BREAKING CHANGE: crates implementing
Curve
need to define theBase
.To be even more concrete. I'm working on the multiexp implementation for GPUs.
I'd like to be able to bundle implementations for different fields within one kernel,
hence I name the kernel
<base-field>_<scalar-field>_multiexp
. For that I needto know which base field the curve has.
There are potential workarounds, but this seems to be the cleanest solution to me.
Updating crates implementing
Curve
is straightforward, I'd be happy to provide PRsfor those if you let me know which ones they are (I know of e.g.
blstrs
).