# Trust (https://orgasm.dev/docs/concepts/trust)

The video of someone's face in an intimate moment is about as sensitive as data gets. orgasm.dev is designed so that nobody sees it: not you, not orgasm.dev's operators, not the cloud provider. Only the numbers in the events leave the enclave that analyses it.

<Callout title="Status">
  Live sessions run as this page describes. The sandbox runs no enclave: it accepts no media and has nothing to attest (`GET /v1/attestation-policy?mode=test` says so). Recorded videos are not analysed by an enclave yet; what this page says of recordings is how they will be.
</Callout>

## The enclave [#the-enclave]

Media is decrypted and analysed only inside a confidential virtual machine: its memory is encrypted by the processor (Intel TDX) and its GPU, an NVIDIA H100, runs in confidential-computing mode, so the host, the hypervisor and the operators cannot read it. The machine boots Google's Confidential Space image with debugging disabled since boot: nobody can log in to it, redirect its output or read its memory.

It runs an image that a public repository's release workflow built from a tagged commit, with SLSA provenance and a signature in Sigstore's public log. The cloud's attestation service issues a signed token that names the exact image, its release and the hardware, which anyone can check: [Verify the enclave](/docs/guides/verify) shows how.

Inside, frames and audio samples are turned into measurements and never written to disk. What leaves is the events in this API. The enclave keeps no record of an orgasm.dev session: the lease that starts one names nowhere to write it.

## Read the code [#read-the-code]

The code is public, under the Apache-2.0 license: [the device SDK](https://github.com/Orgasm-dev/device-sdk) that films and sends, and [the enclave's source](https://github.com/Masseuse-ai/masseuse-video-tee) that analyses. Every line that reads a frame or an audio sample is in one of them.

| What it does | Where |
| --- | --- |
| On the device: checks the enclave's attestation, seals every request to it and publishes the camera and microphone | [`device-sdk/src`](https://github.com/Orgasm-dev/device-sdk/tree/main/src) |
| Decodes the video, finds the person, estimates keypoints and measures motion | [`workload/pixel`](https://github.com/Masseuse-ai/masseuse-video-tee/tree/master/workload/pixel) |
| Decodes the audio, classifies vocalizations, measures level and pitch | [`workload/audio`](https://github.com/Masseuse-ai/masseuse-video-tee/tree/master/workload/audio) |
| Runs the session: the WebRTC ingest, the capability and seal checks, the readings it sends on | [`workload/producer`](https://github.com/Masseuse-ai/masseuse-video-tee/tree/master/workload/producer) |
| Fixes what the machine may be told at boot (the launch policy) and how it starts | [`workload/tee/Dockerfile.tee`](https://github.com/Masseuse-ai/masseuse-video-tee/blob/master/workload/tee/Dockerfile.tee) |
| Builds, signs and attaches provenance to every release | [`.github/workflows/release.yml`](https://github.com/Masseuse-ai/masseuse-video-tee/blob/master/.github/workflows/release.yml) |
| Checks a running enclave from outside | [`verifier/`](https://github.com/Masseuse-ai/masseuse-video-tee/tree/master/verifier) and [`VERIFY.md`](https://github.com/Masseuse-ai/masseuse-video-tee/blob/master/VERIFY.md) |

## What is not public [#what-is-not-public]

The detectors, the code that turns those measurements into imminence, onset, peak, end and subject, are orgasm.dev's and are not published. What the enclave guarantees about them:

- They run in a process of their own, as a user of their own, with no network access of their own; everything they produce leaves through the public code above.
- They never receive a frame, a crop or an audio sample. [`analysis/protocol.md`](https://github.com/Masseuse-ai/masseuse-video-tee/blob/master/analysis/protocol.md) lists every field they receive and every field they return.
- Their bytes are pinned. The image fetches them at boot and refuses to start them unless their SHA-256 matches [`analysis.lock`](https://github.com/Masseuse-ai/masseuse-video-tee/blob/master/analysis.lock), which is part of the attested image, so the attestation also says which detectors ran. The model weights are pinned the same way in [`models.lock`](https://github.com/Masseuse-ai/masseuse-video-tee/blob/master/models.lock).

## What the device verifies [#what-the-device-verifies]

Before it sends anything, the end user's device:

1. Fetches the enclave's attestation (`ingest.attestationUrl`) and checks it against the [attestation policy](/docs/api/trust/getAttestationPolicy): the issuer, the hardware, the image and its minimum release, and that the enclave is not debuggable.
2. Takes the enclave's sealing key from the attested evidence and seals each request to it (`seal: v1`: an ephemeral P-256 key agreement and AES-256-GCM). Only that enclave can open them.
3. Checks the enclave's signature (Ed25519, with a key bound into the attestation) on the WebRTC answer before connecting, so the media session ends inside the attested enclave.

The device also holds the session's **capability**, 32 random bytes it generated. Your server and orgasm.dev's servers only ever see its SHA-256 (`capabilityHash`), and only the holder of the capability can publish. The SDK does all of this; [live sessions](/docs/guides/live-sessions) shows the steps, and [Verify the enclave](/docs/guides/verify) shows how to run the same checks yourself, from outside, against a session's enclave.

## Who sees what [#who-sees-what]

| Party | Sees |
| --- | --- |
| The enclave | The media, while analysing it |
| Whoever runs the enclave's cloud project | Nothing of the media: they can start, stop and name the machine, never read its memory, its keys or the detectors |
| orgasm.dev's servers | The capability hash, session settings and metadata, the events, and the device's IP address when it connects |
| Your server | What you send and the events you receive |
| The network, a TURN relay | Encrypted media, and the device's IP address |

The enclave's cloud project is orgasm.dev's fleet, or, with [your own GPUs](/docs/guides/own-gpus), yours. On your own GPUs every reading the enclave sends is signed with the key its attestation binds, so orgasm.dev takes readings only from the enclave itself, whoever runs the project.

## Where the guarantee stops [#where-the-guarantee-stops]

- **Capture must happen on the person's device.** The guarantee holds when the device that films the person verifies the enclave and publishes to it directly. If you relay the video through your own servers, you can see it.
- **The SDK in your app runs the checks.** A device that skips them could send media anywhere, so the guarantee assumes your app runs the SDK as published. [Its source](https://github.com/Orgasm-dev/device-sdk) is public too, so you can read what it checks before it sends a frame, and each release on npm carries provenance from it, so `npm audit signatures` confirms that is what you installed.
- **Recordings** are sealed on the device before upload, or fetched by the enclave from a URL you sign, and deleted once analysed. Whoever holds the original file still holds it.
- **The events are sensitive too.** They describe a person's sexual response. Keep them only as long as you need (`retentionDays`, `purgeLiveSession`, `deleteRecording`) and protect them as you would health data.
