-
Notifications
You must be signed in to change notification settings - Fork 20
Description
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 asKeyFrag::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()(orassume_verified()?) instead of the current approach with usingfrom_verified_bytes()(which again requires serialization/deserialization).