Skip to content

AP3 - Directives

AP3 uses directives to structure privacy-preserving computations:

Privacy Intent Directive

The Privacy Intent Directive defines the computation to be performed

{
  "ap3_session_id": "string",
  "intent_directive_id": "string",
  "operation_type": "PSI|PIR|SFE",
  "participants": ["agent_id_1", "agent_id_2"],
  "expiry": "ISO8601_timestamp",
  "signature": "string"
}

Field Specifications

  • ap3_session_id: Unique identifier for the session
  • intent_directive_id: Unique identifier for the privacy intent
  • operation_type: Type of privacy-preserving operation (PSI, PIR, or SFE)
  • participants: List of participating agents
  • expiry: Expiration timestamp for the directive
  • signature: Cryptographic signature of the directive

Privacy Result Directive

The Privacy Result Directive contains the computation result with cryptographic proofs.

Schema Definition

{
  "ap3_session_id": "string",
  "result_directive_id": "string",  
  "operation_type": "PSI|PIR|SFE",
  "result_data": {
    "encrypted_result": "string",
    "result_hash": "string",
    "metadata": {
      "computation_time": "string",
      "elements_found": "number"
    }
  },
  "proofs": {
    "correctness_proof": "string",
    "privacy_proof": "string",
    "verification_proof": "string"
  },
  "signature": "string"
}

Field Specifications

  • ap3_session_id: Unique identifier for the session
  • result_directive_id: Unique identifier for the result directive
  • operation_type: Type of privacy-preserving operation (PSI, PIR, or SFE)
  • result_data: Encrypted computation result and metadata
  • proofs: Cryptographic proofs of correctness and privacy preservation
  • signature: Cryptographic signature of the directive

Directive exchange sequence

sequenceDiagram
    autonumber
    participant I as Initiator
    participant R as Receiver

    I->>R: PrivacyIntentDirective(ap3_session_id, intent_directive_id, operation_type, participants, expiry, signature)
    R-->>I: Validate + accept/reject
    Note over I,R: If accepted, parties run PP computation per operation_type
    R-->>I: PrivacyResultDirective(ap3_session_id, result_directive_id, result_data, proofs, signature)