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

Fix serde data modeling. #297

Merged
merged 3 commits into from
Oct 23, 2019
Merged

Fix serde data modeling. #297

merged 3 commits into from
Oct 23, 2019

Conversation

hdevalence
Copy link
Contributor

Adds length checks to the serde-bincode tests, ensuring that the serde Serialize and Deserialize implementations use fixed-length Serde tuples, rather than variable-length byte arrays. This flaw in data modeling was pointed out by Trevor Perrin.

This is a breaking change to the serialization format. It fixes it so that the Serde encoding can match the conventional encoding of each type of object, and so that Serde can be used with no overhead -- when using serde-bincode, the Serde encoding now matches the manual encoding.

Finally, it fills in a missing serde impl for MontgomeryPoint.

Closes #265, cf. #265 (comment)

This ensures that the serde Serialize and Deserialize implementations use
fixed-length Serde tuples, rather than variable-length byte arrays.  This flaw
in data modeling was pointed out by Trevor Perrin.
This is a breaking change to the serialization format.  It fixes it so that the
Serde encoding can match the conventional encoding of each type of object, and
so that Serde can be used with no overhead -- when using serde-bincode, the
Serde encoding now matches the manual encoding.
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.

1 participant