Skip to content

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

@fjarri

Description

@fjarri

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    APIRelated to public API

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions