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

Conditional serialization for crypto primitives (string or bytes) #33

Merged
merged 6 commits into from
Nov 27, 2023

Conversation

Artemkaaas
Copy link
Contributor

@Artemkaaas Artemkaaas commented Nov 22, 2023

Make conditional serialization for crypto primitives:

  • For JOSN serialization, crypto primitives such BugNumber's, Points, etc. are represented as string.
  • For message pack or cbor these crypto primitives represented as bytes.

@andrewwhitehead
Copy link
Member

I had just been thinking about this recently because the string serialization of points is so bad (not normalized or compressed). The serde Serializer has an is_human_readable method which is often used to indicate support for byte strings. Maybe that could be used to choose the default serialization, and the deserializer could support bytes or strings?

@Artemkaaas
Copy link
Contributor Author

I had just been thinking about this recently because the string serialization of points is so bad (not normalized or compressed). The serde Serializer has an is_human_readable method which is often used to indicate support for byte strings. Maybe that could be used to choose the default serialization, and the deserializer could support bytes or strings?

Thank you! It seems to be exactly what we need.

@Artemkaaas Artemkaaas changed the title Add type duplicates using crypto primitives represented as byte vectors Conditional serialization for crypto primitives (string or bytes) Nov 23, 2023
src/amcl.rs Outdated Show resolved Hide resolved
src/amcl.rs Outdated Show resolved Hide resolved
Artemkaaas and others added 2 commits November 24, 2023 08:30
Co-authored-by: Andrew Whitehead <[email protected]>
Signed-off-by: artem.ivanov <[email protected]>
Co-authored-by: Andrew Whitehead <[email protected]>
Signed-off-by: artem.ivanov <[email protected]>
@andrewwhitehead andrewwhitehead merged commit da84ea9 into hyperledger:main Nov 27, 2023
4 checks passed
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.

2 participants