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

Binary compatibility with PyUmbral #27

Closed
fjarri opened this issue Nov 30, 2020 · 3 comments · Fixed by #41
Closed

Binary compatibility with PyUmbral #27

fjarri opened this issue Nov 30, 2020 · 3 comments · Fixed by #41
Labels
API Related to public API scoping Scoping required for further action
Milestone

Comments

@fjarri
Copy link
Contributor

fjarri commented Nov 30, 2020

At the moment rust-umbral is not binary compatible with PyUmbral:

  • Different hashing algorithms, and possibly a difference in their implementation in Rust
  • Differences in how metadata is stored (CapsuleFrag metadata as a scalar #21)
  • Some differences in the serialization format (e.g. a serialized kfrag has flags of whether delegation and receiving key were signed in two separate bytes instead of one)
  • Differences in API (e.g. a capsule does not include cfrags, they come separately)
  • NON_INTERACTIVE and X_COORDINATE constants are different (in PyUmbral they are taken from constant_sorrow)
  • kfrag ID is a CurveScalar and not just 32 random bytes
  • Maybe something else

Except for the difference in hash function implementation (if any), the rest is theoretically fixable. The question is, do we want to do it? Seems like it would be better to handle this difference at the protocol level, by implementing versioning.

@fjarri fjarri added cryptography Needs attention of someone who knows what they're doing scoping Scoping required for further action API Related to public API labels Nov 30, 2020
@fjarri
Copy link
Contributor Author

fjarri commented Mar 2, 2021

From the discussion: KeyFrag ID doesn't need to be a scalar. We can keep it just 32 random bytes, as it is in PyUmbral.

@fjarri
Copy link
Contributor Author

fjarri commented Mar 2, 2021

From the discussion:

@fjarri
Copy link
Contributor Author

fjarri commented Mar 2, 2021

From the discussion: define NON_INTERACTIVE and X_COORDINATE as simpler values instead of bigger constants. Byte-sized, for example, for ease of implementation. But we do need to keep them.

fjarri added a commit to fjarri/rust-umbral that referenced this issue Mar 6, 2021
@fjarri fjarri added this to the v0.1.0 milestone Apr 7, 2021
@fjarri fjarri removed the cryptography Needs attention of someone who knows what they're doing label Apr 19, 2021
@fjarri fjarri closed this as completed in #41 May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Related to public API scoping Scoping required for further action
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant