How a model stays closed in public

The weights of a sealed model are on Solana for anyone to fetch. This page follows the one key that opens them, from the owner’s device to the receipt an answer leaves.

Where the model key exists

The key is in plaintext in two kinds of place only: the owner’s device at sealing, and enclaves that hold a grant under an unexpired attestation record. On chain it appears wrapped, never open.

  1. Owner’s device

    The model key is drawn here at sealing and the weights are encrypted under it.

  2. encrypts
  3. Ciphertext

    The weights, on Solana for anyone to fetch.

  4. Attestation record

    The enclave’s signing key, measurement, hardware type and expiry on chain.

  5. wraps
  6. Grant

    The model key, wrapped to that enclave’s encryption key.

  7. unwraps
  8. Enclave

    The key is unwrapped inside the enclave and the model runs in its memory.

  9. signs
  10. Receipt

    The enclave’s signature on one answer, checked by the program.

The contour marks every place the model key is in plaintext.

No model is sealed under the name sketch-32.

The weights are public bytes

Sealing starts on the owner’s device. It draws a random 256-bit model key and encrypts the weights under it with XChaCha20-Poly1305, in chunks, so any range of the file verifies on its own.

The ciphertext is written into Solana accounts, and sealing fixes its SHA-256. From that slot the bytes cannot change. Anyone can fetch every byte, and the bytes say nothing without the key.

Sealed models in the docs

What the chain records about the enclave

An enclave runs the enclave runtime on a standard server at mainnet launch, or inside a confidential VM once Solana Confidential Compute opens on mainnet. At boot it makes two keys: an Ed25519 signing key and an X25519 encryption key, and binds the signing key and software measurement to a recent Solana slot.

The configured verifier (attest at launch, switching via set_config to Solana Confidential Compute) verifies that report on chain and writes an attestation record. The owner of a model lists the measurements allowed to open it, so the record decides whether an enclave can be granted.

Enclaves and attestation in the docs

No enclave holds a grant to sketch-32 yet.

A grant is the model key, wrapped

Model key, with the owner or a granted enclave
wraps
Wrapped key, on chain
unwraps
Model key, inside the enclave it names

A grant is the model key wrapped to one enclave’s encryption key, with X25519 + HKDF-SHA256 + XChaCha20-Poly1305. It sits on chain beside the model, and only the enclave it names can unwrap it, inside its runtime.

The owner makes the first grant. After that a granted enclave can grant the next one: it checks the newcomer’s record, wraps the key inside the enclave and signs the grant. Capacity grows while the owner is offline.

sketch-32 has no grant yet.

Grants in the docs

No call has been opened on sketch-32 yet.

A call holds a price and a deadline

A caller’s input is encrypted on their device to the enclave’s encryption key. The caller signs once. That opens a call on chain holding the hash of the encrypted input, the model’s price in escrow and a deadline slot.

The enclave runs the model and encrypts the output to a key the caller made for this one call. A call not settled by its deadline is refunded to the caller in full.

Calls and receipts in the docs

What a receipt proves

When the enclave answers, it signs the call, the input hash and the output hash with its Ed25519 key. The program checks that signature, writes the receipt, and pays the owner, the operator and the protocol share in the same instruction. Anyone can run the same three checks in a browser.

  1. Signature

    The enclave key signed this call, input hash and output hash.

  2. Attestation record

    The configured attestation program recorded that key, hardware type and measurement.

  3. Expiry

    The record was unexpired at the slot the call settled.

sketch-32 has not settled a call yet.

sketch-32 is sealed this way. Draw something, and read the receipt it leaves.