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