Skip to content
Juvix imports

module arch.node.engines.verification_messages;

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

Verification Messages

Message interface

type VerificationMsg :=
| VerifyRequest {
data : Signable;
commitment : Commitment;
externalIdentity : ExternalIdentity;
useSignsFor : Bool
}
| VerifyResponse {
result : Bool;
err : Option String
};

VerifyRequest message

VerifyRequest

VerifyRequest {
  data : Signable;
  commitment : Commitment;
  externalIdentity : ExternalIdentity;
  useSignsFor : Bool
}

A VerifyRequest instructs the Verification Engine to verify a commitment (signature) from a particular external identity, possibly using known signs_for relationships.

  • commitment: The commitment (signature) to verify.
  • data: The data that was signed.
  • externalIdentity: The external identity that supposedly made the commitment.
  • useSignsFor: Whether or not to use known signs_for relationships.

VerifyResponse message

VerifyResponse

VerifyResponse {
  result : Bool;
  err : Option String
}

A VerifyResponse contains the result of verifying a commitment in response to a VerifyRequest.

  • result: True if the verification succeeded, False otherwise.
  • err: An error message if verification failed.

Message sequence diagrams

Verification Sequence (Without SignsFor evidence)

sequenceDiagram
    participant C as Client
    participant EE as Encryption Engine

    C->>EE: EncryptRequest(useReadsFor=false)
    Note over EE: Encrypt data directly for external identity
    EE-->>C: EncryptResponse
Sequence diagram for encryption (no signs for).

Verification Sequence (With SignsFor evidence)

sequenceDiagram
    participant C as Client
    participant EE as Encryption Engine
    participant RF as ReadsFor Engine

    C->>EE: EncryptRequest(useReadsFor=true)
    EE->>RF: QueryReadsForEvidenceRequest
    Note over RF: Retrieve reads_for evidence
    RF-->>EE: QueryReadsForEvidenceResponse
    Note over EE: Encrypt data using ReadsFor evidence
    EE-->>C: EncryptResponse
Sequence diagram for encryption (signs for).

Engine Components

  • Verification Engine Environment
  • Verification Engine Dynamics