Skip to content
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

Basic serde support for Scalar, G1 and G2 (Fix #57) #61

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

akakou
Copy link

@akakou akakou commented May 5, 2021

Fix CI error of #57.

This PR makes this library support structs as below to serde.

  • Scalar
  • G1Affine and G1Projective
  • G2Affine and G2Projective

@akakou
Copy link
Author

akakou commented May 5, 2021

It related to #35, #38, #57.

@str4d
Copy link
Member

str4d commented Jun 1, 2021

I think this PR needs a rebase now that #64 has been merged.

Also, as a heads up: this PR is unlikely to be part of bls12_381 0.5.0 (which will be cut later this week) due to time constraints. But since the (implicit) serde feature flag is completely optional, we could include it in a subsequent point release.

@akakou
Copy link
Author

akakou commented Jul 3, 2021

Thank you for your reply!
I rebased it, so could you check this PR?

@ma2bd
Copy link

ma2bd commented Oct 21, 2021

Any time estimate for the landing of this PR? Serde is useful not only for serialization but also for the generation of correct message hashers (see https://crates.io/crates/bcs).

@akakou
Copy link
Author

akakou commented Jun 14, 2022

@str4d

I solved the conflicts.
Could you check and merge this PR?
(I hope the PR be merged before when the next conflict occurs.)

@ebfull
Copy link
Contributor

ebfull commented Dec 8, 2022

We introduced serde support in the pasta_curves crate here: zcash/pasta_curves#48

The implementation uses serde's is_human_readable to check whether the format it's encoding into is human readable (and so needs a hex serialization for readability) or not (in which case a raw byte encoding is appropriate). We'd want to do something similar in this PR as well.

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.

5 participants