For the messaging subsystem to work it is essential to create or import dedicated principal accounts to encrypt/decrypt the messages.
To create or import dedicated principal accounts use the functions CreateMSGKeyOnNode and ImportMSGKeyToNode in the messaging namespace. For example on: https://coin.codeb.io/messaging.asmx
The functionality is also abstracted into the CommandLine Interface.
Parameters for those functions are:
Phrase
The Mnemonic Phrase to be used to calculate the private key.
OptionalEncryptionPassword
The password used to encrypt the private key on the server. If not specified the node will calculate a random password.
ChainAddress / ChainPassword
Any combination of ChainAddress / ChainPassword hosted on the same node and with a positive gas balance can be used. This is used as a check to avoid spamming of the system and has no further function.
Unused principal accounts can be permanently deleted with the function DeleteMSGKeyFromNode.
CommandLine Interface
c:\> codeb_cli.exe keys -a create -c <ChainAddress> -p <ChainPassword>
Note: The imported or generated key remains anonymous unless registered with function RegisterKeyInMemberSSI.