-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
trait FieldElement
cleanup
#278
Comments
I would like to get rid of |
This sounds like a safe bet for the next version, but if you do just remove them we should be fine. |
The arithmetic-related traits and methods need to stay, as they are tightly coupled to the field's internal representation. I think the implementations of |
@divergentdave is this still relevant? |
PR #258 and #277 made some changes to the
FieldElement
trait. There's still some opportunities for cleanup and improvement here:make_field
macro and into theFieldElement
andFieldElementExt
traits. This makes that code easier to read and easier for tools to wrangle. Of course there will be cases where it's easiest to implement something by accessing the privateu128
member of the tuple struct thatmake_field
stamps out.serde
stuff,prio::codec
, a variety ofFrom
andTryFrom
s and some utility methods likebyte_slice_into_vec
,slice_into_byte_vec
,encode_into_bitvector_representation
,decode_from_bitvector_representation
andvalid_integer_try_from
. We should strive to harmonize these so they follow common patterns, re-use code as much as possible, and so that their signatures and documentation make it as obvious as possible what they are for.See also #82.
And on the topic of
mod field
more generally: we should consider using fast and well-tested finite field and FFT implementations from the Rust cryptography community, likearkworks-rs
.The text was updated successfully, but these errors were encountered: