Skip to content
Juvix imports

module arch.node.engines.decryption_messages;

import prelude open;
import arch.node.types.identities open;

Decryption Messages

Message interface

type DecryptionMsg :=
| DecryptRequest {data : Ciphertext}
| DecryptResponse {
data : Plaintext;
err : Option String
};

DecryptRequest message

DecryptRequest

DecryptRequest {
  data : Ciphertext
}

A DecryptRequest instructs a decryption engine instance to decrypt data as the internal identity corresponding to that engine instance.

  • data: The encrypted ciphertext to decrypt.

DecryptResponse message

DecryptResponse

DecryptResponse {
  data : Plaintext;
  err : Option String
}

A DecryptResponse contains the data decrypted by a decryption engine instance in response to a DecryptRequest.

  • data: The decrypted data.
  • err: An error message if decryption failed.

Message sequence diagrams

Decryption Sequence

sequenceDiagram
    participant C as Client
    participant DE as Decryption Engine

    C->>DE: DecryptRequest(encryptedData)
    Note over DE: Attempt to decrypt data
    alt Decryption Successful
        DE-->>C: DecryptResponse(decryptedData, err=none)
    else Decryption Failed
        DE-->>C: DecryptResponse(emptyByteString, err="Decryption Failed")
    end
Sequence diagram for decryption.

Engine Components

  • Decryption Engine Environment
  • Decryption Engine Dynamics