Conceptual Workflow

FHE for sensitive agent computation

A concrete end-to-end pattern for letting an agent evaluate a policy over sensitive inputs while the computation host sees ciphertext only. This page is an architectural explainer, not a live FHE API or contract.

Privacy boundary. This page describes a workflow; it does not perform FHE or decryption. Raw inputs, intermediate ciphertexts, the final plaintext result, and the FHE secret key never reach the agent host, KAIOS, or the verifier. The authorized data owner may decrypt the returned ciphertext locally; only intentionally published metadata and commitments cross the public boundary.

Prerequisites checklist

FHE workflow glossary

Sealed input
A sensitive value encrypted locally by the authorized owner before computation; this input seal is separate from the later signed receipt.
Encrypted computation
Policy evaluation performed over ciphertext, with intermediate values remaining encrypted.
Encrypted result
The policy output returned as ciphertext for the authorized owner to decrypt locally.
Verification
A separate signed-receipt check of signature, identity, freshness, ciphertext hash, policy version, and result commitment that does not decrypt the result.

Eligibility evaluation without disclosure

A data owner wants an agent to decide whether a transaction policy is satisfied. The owner keeps the FHE secret key, while the agent evaluates the policy over encrypted transaction history and an encrypted approval threshold. The agent can return an encrypted decision, but cannot read the history, threshold, intermediate values, or decision.

FHE eligibility flow: encrypted computation, local result decryption, and separate receipt verification.
  1. Data owner · local seal

    Seal inputs locally

    Keeps the FHE secret key and locally encrypts transaction history and the approval threshold.

  2. Agent host

    Compute on ciphertext

    Evaluates eligibility over ciphertext; intermediate values remain encrypted on the agent host.

  3. Authorized owner

    Decrypt result locally

    Receives the ciphertext result and decrypts it locally with the retained secret key.

  4. Separate signed-receipt path · verifier

    Verifier checks without decryption

    Checks the receipt signature, identity, freshness, ciphertext hash, policy version, and result commitment. Verification does not decrypt the result or expose plaintext.

Conceptual payloads
local_encrypt(...) → ciphertext
evaluate(..., ciphertext) → ciphertext
sign({ ciphertext_hash, policy_version, agent_identity, nonce,
       result_commitment, issued_at }) → signed_receipt

Copyable request and result

The request carries locally sealed inputs and policy context; the response returns the encrypted computation result with receipt metadata.

request.json
{
  "input_ciphertexts": {
    "history": "opaque:fhe-ciphertext-v1:synthetic-history-ciphertext",
    "threshold": "opaque:fhe-ciphertext-v1:synthetic-threshold-ciphertext"
  },
  "policy_version": "eligibility-v1",
  "agent_identity": "did:example:agent-eligibility-v1",
  "nonce": "example-nonce-01J4FHE7K2M9"
}
response.json
{
  "result_ciphertext": "opaque:fhe-ciphertext-v1:synthetic-result-ciphertext",
  "receipt": {
    "ciphertext_hash": "sha256:synthetic-ciphertext-hash",
    "policy_version": "eligibility-v1",
    "agent_identity": "did:example:agent-eligibility-v1",
    "nonce": "example-nonce-01J4FHE7K2M9",
    "result_commitment": "opaque:commitment-v1:synthetic-result-commitment",
    "issued_at": "2026-09-28T12:00:00Z"
  }
}
These synthetic placeholders show an illustrative shape, not a live endpoint or real FHE payload. Only the authorized owner decrypts the returned ciphertext locally.

What moves, and what stays hidden

StepValue crossing boundaryVisibility and purpose
01 · Key setup Public key + evaluation material Visible to the client and agent so encrypted evaluation can be prepared; the FHE secret key stays with the authorized decryptor.
02 · Local encode C(history) + C(threshold) Ciphertext only, so the transaction history and approval threshold cross the boundary without plaintext disclosure.
03 · Agent compute Encrypted intermediate values Remain ciphertext while the agent homomorphically evaluates eligibility; the agent host cannot inspect the intermediate values.
04 · Return result C(policy_result) The encrypted result returns to the authorized decryptor for local decryption; its plaintext never reaches the agent host, KAIOS, or verifier.
05 · Publish receipt ciphertext_hash, policy_version, agent_identity, nonce, result_commitment, issued_at Signed, non-sensitive metadata binds the computation without disclosing payloads, the secret key, or plaintext output.

FHE protects computation, not authorization

Data owner / decryptor

Generates the key pair, encrypts transaction history and the approval threshold locally, retains the secret key, and decrypts the result only when its authorization rules permit.

Agent host

Receives ciphertext and public evaluation material, runs the eligibility circuit, and returns ciphertext. It never receives raw values, intermediate plaintext, the final plaintext result, or the secret key.

KAIOS operations

Can carry operational identity, lifecycle, and signed-receipt metadata, but never receives the raw inputs, intermediate ciphertexts, final plaintext result, or FHE secret key.

Verifier

Checks identity, signatures, freshness, ciphertext hashes, commitments, and policy context. Verification does not require the secret key or decryption of the sensitive computation.

For the authorization context, see Agent Identity. For the operational agent and KAIOS context, see KAIOS. Those surfaces establish who may act; FHE keeps the computation payload private.

Bind the decision before it is sealed

A verifier should not infer authorization merely because an FHE evaluation completed. The receipt must bind the result to the exact encrypted inputs and the policy context that was authorized. A conceptual receipt can commit to the following values without including their plaintext contents:

Verification is separate from decryption. A verifier can validate the signature, identity, freshness, policy_version, ciphertext_hash, and result_commitment while the secret key and plaintext result remain with the authorized decryptor. See KAIOS receipt verification for the existing signed-receipt verification boundary.

A tamper-evident record, not a disclosure step

Sealing is the final audit action: sign the receipt that binds the ciphertext hash, policy version, agent identity, nonce, and result commitment. The resulting record makes the computation and policy decision tamper-evident without containing the sensitive payload or decrypting the result.

Signed receipt shape
seal({
  ciphertext_hash,
  policy_version,
  agent_identity,
  nonce,
  result_commitment,
  issued_at
}) → signed_receipt

The seal proves what was bound and when; it does not prove that the verifier is entitled to decrypt, and it does not turn ciphertext into plaintext. Keep decryption and key custody with the authorized data owner.

Encrypted-computation FAQ

What stays encrypted?

The transaction history, approval threshold, intermediate values, and result stay ciphertext through agent computation. The authorized owner keeps the secret key and decrypts locally. Only receipt metadata and commitments are published.

Does the workflow expose plaintext to the agent?

The agent host receives ciphertext and public evaluation material, then returns ciphertext. It does not receive raw inputs, plaintext intermediates or result, or the secret key. This is a conceptual workflow, not a live FHE API or contract.

How do verification and sealing relate to the computation?

Verification checks the receipt’s signature, identity, freshness, and binding to the ciphertext and policy context without decrypting. Sealing signs that receipt to make the computation record tamper-evident. Neither action authorizes decryption or reveals plaintext.

Privacy by construction

In this workflow, the agent does useful computation without receiving the sensitive data it computes over. The public trail is limited to operational metadata, commitments, and a signed seal. The raw inputs, intermediate values, and plaintext output are never exposed to the agent host, KAIOS, or the verifier.

Pair the computation boundary with agent identity, operational context from KAIOS, and the signed-receipt checks in verification docs when designing a production system.