Juvix imports
module arch.node.engines.encryption_messages;
import prelude open;
import arch.node.types.identities open;
Encryption Messages¶
Message interface¶
MsgEncryptionRequest RequestEncrypt
¶
type RequestEncrypt :=
mkRequestEncrypt@{
data : Plaintext;
externalIdentity : ExternalIdentity;
useReadsFor : Bool;
};
An RequestEncrypt
instructs the Encryption Engine to encrypt data to a particular external identity, possibly using known reads_for relationships.
Arguments
data
:- The data to encrypt.
externalIdentity
:- The external identity requesting encryption.
useReadsFor
:- Whether to use known
reads_for
relationships or not.
MsgEncryptionResponse ResponseEncrypt
¶
type ResponseEncrypt :=
mkResponseEncrypt@{
ciphertext : Ciphertext;
err : Option String;
};
An ResponseEncrypt
contains the data encrypted by the Encryption Engine in response to an RequestEncrypt
.
Arguments
ciphertext
:- The encrypted data.
err
:- An error message if encryption failed.
EncryptionMsg
¶
type EncryptionMsg :=
| MsgEncryptionRequest RequestEncrypt
| MsgEncryptionResponse ResponseEncrypt;
Message sequence diagrams¶
Encryption Sequence (Without ReadsFor
evidence)¶
Encryption Sequence (With ReadsFor
evidence)¶
Engine Components¶
- Encryption Environment
- Encryption Behaviour