Crypto Wrappers
This crypto wrapper defines the following main structures:
Signer- a generic structure to sign messagesVerifier- a generic structure to verify signed messagesCondition- an AND/OR/NofT combination of verifiersIdentity- an updatable pair ofsignandupdateConditions, representing identities or cryptographic anchors
An example use-case is the following:
- When a node starts, it creates a
Signer, and aIdentitywith aConditionpointing to thatSigner. This allows the node to do key rotation by updating itsIdentity - A user wants to create a website with many objects, so they create:
- one or more nodes with the corresponding
Identitys. A CLI tool to update the page also acts as a node. - a
WebPageT: Identitywith an OR of all nodes and CLIsIdentitys - a
WebPageAR: ACEwith rules likeupdate_object,add_object,rm_object, pointing to theWebPageT
- one or more nodes with the corresponding
- Now the user can create objects and point them to the
WebPageAR, allowing them to:- control all objects from any node
- update the
WebPageTif nodes join or go away - update the
WebPageARif part of the rules should apply to otherIdentitys. An example could be a rule to update theTTLof an object, which could be allowed by more nodes than the rule to modify an object
Rule
Expression
The following structures are defined for signing and updating an expression:
type RuleID = Hash;
Sign
Expression.signature_collector(msg)->ExpressionSignatureCollectorESC.sign(Signer)->ExpressionSignatureCollectorESC.finalize()-> Result<(ExpressionSignature,ExpressionSignatureVerifiers),ESCError>
Signing Subtrees
There might be a usecase for having more privacy-preserving signatures of sub-trees,
so that the signers cannot see the rest of the Expression.
But the original msg will still need to be verified in one way or another.
Verify
Expression.verify(msg, ES, ESV)->Result<(), ESError>
Update
Expression.update_message(new_rules)->msgorExpression.update_collector(new_rules)->ExpressionUpdateCollectorEUC.sign(Signer)->ExpressionUpdateCollectorEUC.finalize()->ExpressionUpdateExpression.update(new_rules, ES)->ExpressionorExpression.update_finalize(EU)->Expression
ACE
In an AccessRule, the rules only point to ExpressionID.
As such, whatever you want to do with an AccessRule needs to have
access to the underlying Expressions.
Not sure whether this should be a HashMap, or better an asynchronous
expression_getter.