...
TODO: review the names used. The names "proxy" and "seed" might not be ideal.
Motivation
The purpose of the locker contract is to add a layer of public key cryptography on top of existing contracts.
The protection against the replay attacks is usually done using a nonce. In Rholang, because of the parallelism, managing nonces is not simple, as it requires some form of synchronisation. For this reason we will use Rholang's unforgeable channels instead of "classic" nonces.
Locker Protocol
The locker protects the seed from the unauthorised users. Once the locker is created with a given public key and a given seed, only the owner of the corresponding private key can access the seed.
In the diagrams below the red processes are Rholang "unforgeable names" that need to be kept private.
Creating the locker
The locker factory is a contract that creates the lockers and is registered in the RChain registry.
Using the locker
The usage happens as described below:
...