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(safe_ser): aliases in named for renamed types deserialization #1982

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nsarlin-zama
Copy link
Contributor

closes: please link all relevant issues

PR content/description

Adds the possibility to have aliases in the Named trait.

Context:
In previous versions of TFHE-rs only the CompactPkePublicParams were serializable. Since 0.11, the CompactPkeCrs is the main exposed type and is serializable. For versioning, there is an upgrade path that allows to load and upgrade an old CompactPkePublicParams into a new CompactPkeCrs. However this could not work in practice for CompactPkePublicParams serialized with safe_serialize because of the Named impl was different and the data was rejected in the header check.

This PR allows to have aliases to a name, that will be accepted when loading this name. This is optional so it does not break previous code. That way, "zk::CompactPkePublicParams" is seen as an alias for "zk::CompactPkeCrs".

Copy link
Contributor

@mayeul-zama mayeul-zama left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants