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

Add an unverify()/force_verify() methods to KeyFrag and CapsuleFrag? #73

Closed
fjarri opened this issue Nov 2, 2021 · 0 comments · Fixed by #84
Closed

Add an unverify()/force_verify() methods to KeyFrag and CapsuleFrag? #73

fjarri opened this issue Nov 2, 2021 · 0 comments · Fixed by #84
Labels
API Related to public API
Milestone

Comments

@fjarri
Copy link
Contributor

fjarri commented Nov 2, 2021

There are cases where we want to circumvent the standard verification data flow (verified -[serialization]-> bytes -[deserialization]-> unverified -[verification-> verified), so some explicit methods may be added:

  • unverify() when we want to normalize verified objects to convert them to unverified (e.g. to put in a protocol structure that requires unverified objects). Right now it can be done as KeyFrag::from_bytes(&verified_kfrag.to_array()), but that requires an unwrap, and possibly a comment (and also incurs a minor performance penalty). verified_kfrag.unverify() would show the intent more clearly.

  • In some cases we don't really care if the object is verified, as long as it is internally consistent. For example, during re-encryption in Ursulas it does not matter if Alice signed the kfrag - we have no way to obtain alice's verifying key anyway other than from the same source that gave us the kfrag (Bob). So an Ursula might want to just do kfrag.force_verify() (or assume_verified()?) instead of the current approach with using from_verified_bytes() (which again requires serialization/deserialization).

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

Successfully merging a pull request may close this issue.

1 participant