Skip to content
Juvix imports

module arch.node.engines.identity_management_messages;

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

Identity Management Messages

Message interface

type IdentityManagementMsg :=
| GenerateIdentityRequest {
backend : Backend;
params : IDParams;
capabilities : Capabilities
}
| GenerateIdentityResponse {
commitmentEngine : Option EngineID;
decryptionEngine : Option EngineID;
externalIdentity : EngineID;
err : Option String
}
| ConnectIdentityRequest {
externalIdentity : EngineID;
backend : Backend;
capabilities : Capabilities
}
| ConnectIdentityResponse {
commitmentEngine : Option EngineID;
decryptionEngine : Option EngineID;
err : Option String
}
| DeleteIdentityRequest {
externalIdentity : EngineID;
backend : Backend
}
| DeleteIdentityResponse {err : Option String};

GenerateIdentityRequest message

GenerateIdentityRequest

GenerateIdentityRequest {
  backend : Backend;
  params : IDParams;
  capabilities : Capabilities
}

A GenerateIdentityRequest instructs the Identity Management Engine to generate a new identity using the specified backend, parameters, and capabilities.

  • backend: The backend to use for identity generation.
  • params: Parameters to pass to the backend (e.g., cryptosystem, security level).
  • capabilities: Capabilities to request (e.g., commitment, decryption, or both).

GenerateIdentityResponse message

GenerateIdentityResponse

GenerateIdentityResponse {
  commitmentEngine : Option EngineID;
  decryptionEngine : Option EngineID;
  externalIdentity : EngineID;
  err : Option String
}

A GenerateIdentityResponse provides the handles to the decryption and commitment engine instances for the newly generated identity, or an error if a failure occurred.

  • commitmentEngine: Reference to the newly instantiated commitment engine.
  • decryptionEngine: Reference to the newly instantiated decryption engine.
  • externalIdentity: The external identity of the newly created identity.
  • err: An error message if identity generation failed.

ConnectIdentityRequest message

ConnectIdentityRequest

ConnectIdentityRequest {
  externalIdentity : EngineID;
  backend : Backend;
  capabilities : Capabilities
}

A ConnectIdentityRequest instructs the Identity Management Engine to connect to an existing identity using the specified backend.

  • externalIdentity: The external identity to connect.
  • backend: The backend to use for the connection.
  • capabilities: Capabilities to request (e.g., commitment, decryption, or both).

ConnectIdentityResponse message

ConnectIdentityResponse

ConnectIdentityResponse {
  commitmentEngine : Option EngineID;
  decryptionEngine : Option EngineID;
  err : Option String
}

A ConnectIdentityResponse provides the handles to the decryption and commitment engine instances for the connected identity, or an error if a failure occurred.

  • commitmentEngine: Reference to the newly instantiated commitment engine.
  • decryptionEngine: Reference to the newly instantiated decryption engine.
  • err: An error message if identity connection failed.

DeleteIdentityRequest message

DeleteIdentityRequest

DeleteIdentityRequest {
  externalIdentity : EngineID;
  backend : Backend
}

A DeleteIdentityRequest instructs the Identity Management Engine to delete an existing identity using the specified backend.

  • externalIdentity: The external identity to delete.
  • backend: The backend to use for deletion.

DeleteIdentityResponse message

DeleteIdentityResponse

DeleteIdentityResponse {
  err : Option String
}

A DeleteIdentityResponse provides the response from an attempt to delete an identity.

  • err: An error message if identity deletion failed.

Message sequence diagrams

Generating an Identity

sequenceDiagram
    participant Client
    participant IdentityManagementEngine
    participant CommitmentEngine
    participant DecryptionEngine

    Client->>IdentityManagementEngine: GenerateIdentityRequest
    Note over IdentityManagementEngine: Create new identity
    IdentityManagementEngine->>CommitmentEngine: Spawn (if requested)
    IdentityManagementEngine->>DecryptionEngine: Spawn (if requested)
    IdentityManagementEngine->>Client: GenerateIdentityResponse
Generating an identity

Connecting to an Existing Identity

sequenceDiagram
    participant Client
    participant IdentityManagementEngine

    Client->>IdentityManagementEngine: ConnectIdentityRequest
    Note over IdentityManagementEngine: Check external identity
    Note over IdentityManagementEngine: Verify capabilities
    Note over IdentityManagementEngine: Copy engine references
    IdentityManagementEngine->>Client: ConnectIdentityResponse
Connecting to an existing identity

Deleting an Identity

sequenceDiagram
    participant Client
    participant IdentityManagementEngine

    Client->>IdentityManagementEngine: DeleteIdentityRequest
    Note over IdentityManagementEngine: Check if identity exists
    Note over IdentityManagementEngine: Delete identity if exists
    IdentityManagementEngine->>Client: DeleteIdentityResponse
Deleting an identity

Engine Components

  • Identity Management Engine Environment
  • Identity Management Engine Dynamics