-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
We should implement serialization and serialization for field elements, and curve points.
SerDe should target the built-in ByteArray data type, and we can just use the binary expension of field elements to as their serialization.
Curve points should be serialized by their constituent field elements, and also an additional UInt8 tag at the beginning containing data such as:
- The form of this point (projective or affine)
- Compressed or uncompressed (see below)
We should also have a "compressed" serialization where we serialize only the x-coordinate, and use one of the bits in the UInt8 tag to signal whether we take the positive or negative root of x^3 + ax + b.
As part of this issue we should take the time to re-structure our field typeclasses.
The image I have for this is that:
Fieldis the base class encoding all the arithmetic operations of fieldsNewField(possibly rename toPrimeField?) is the class for efficient field implementationsGaloisFieldis the class for field extensions, and has all of the operations related to the FrobeniusPrimeField(rename to something else) is the class that adds additional serialization/deserialization methods on anything that implementsField(in particular, this should apply to bothNewFieldandGaloisField
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels