Registration
In order for identity to be able to register on a mediator, the mediator DID Document needs to have DecentrlMediatorRegister service available. This service looks something like this
serviceEndpoint should be a URL linking to the POST route for registration.
routingKeys should be an array of references to the public encryption keys used by the mediator to enable E2EE communication. Minimum of one routing keys is required in order to establish secure communication with the mediator.
Registration
When registering on a mediator, an encrypted payload containing a list of mediator features you wish to enable for your identity has to be sent.
Unencrypted payload should look something like this
Once you have your payload prepared, you can encrypt it using ECDH-ES A256GCM JWE encryption using your private EC P-256 key and one of the public routing keys specified in the mediator's service endpoint. When setting protected JWE headers, set kid
property to the id of the public key related to the private key that was used for encryption. That way it's easier for mediator to verify the identity of the sender.
The encrypted payload can now be posted to the registration endpoint. It should be included in the body in the following format
Once the mediator receives and decrypts payload, it will know which features to register for the current identity and it will also have a verificaiton of the identity due to the nature of eliptic curve encryption (authcrypt)
Last updated