Seal a model

Draw the weights, and they are encrypted on this device and written as ciphertext. The key leaves only once, wrapped to the enclave you allow, and then the model answers calls.

Prepare

Teach it a few shapes and choose its terms.

Weights

Two or more labels, one or more drawings each. Every drawing becomes 32 points of weights.

Settings

Allowed measurements
…dev, 1 enclave
Only an enclave running this exact runtime can be granted the key.
Nothing leaves this device in this step.

Encrypt

A 256-bit key is drawn here and the weights are encrypted under it in 1 KiB chunks, each with its own tag.
NOTEThe key is held in this tab's memory only. It is never saved, sent or shown in full. Close the tab before the grant and the model can never be opened.
AES-256-GCM, a 96-bit nonce per chunk.

Create

The model gets an address: the base58 of the SHA-256 of its ciphertext.
The owner would sign this on Solana. Here the address is computed in the tab.

Write

The ciphertext goes into weights accounts, chunk by chunk. Anyone can read these bytes; they say nothing.
Each chunk verifies on its own, so a reader can check any range.

Seal

The hash is fixed at a slot. From that slot on the bytes cannot change.
Slot read from Solana mainnet.

Grant

The model key is wrapped to the enclave's encryption key with ECDH P-256, HKDF-SHA256 and AES-256-GCM. Then the key is dropped from this tab.
Only the enclave it names can unwrap it.

Call your model

It is sealed. Draw one of its labels and the enclave answers, with a receipt.
The answer comes back encrypted to a key made for this call.
Saved in this browser: the ciphertext and the grant. Never the key.