ot-file/2)Files sent between two paired apps are encrypted end to end with forward
secrecy: only the receiving app can read them, any change, reordering, replay
or truncation is detected before a file is kept, and a pair key stolen later
doesn’t open a recorded transfer. Between unpaired apps the same
handshake runs without the pair key, which stops a listener but not someone
who can pose as the other app. A browser’s own hop to its app is encrypted
only with --https. Not every path is end-to-end encrypted; see
Coverage. This page covers the threat model, the
design, every path a file can take, and what is still in plain text.
| Who | Can | Defended |
|---|---|---|
| Passive listener on the Wi‑Fi or hotspot (another guest, a compromised router) | Read every packet | Paired app ↔ app: file contents and file names are unreadable. Sizes and timing are visible. |
| Active attacker on the LAN (ARP spoofing, rogue hotspot, a spoofed multicast packet) | Change, drop, replay or inject packets; strip headers | Changed or injected bytes are rejected per 64 KiB record. Replays into another file or transfer fail because each uses a different key. Truncation fails. A downgrade to plain text is refused (see below). Dropping packets can still stop a transfer, which is a denial of service, not a disclosure. |
| A paired device | Decrypt what was sent to it | Each recipient’s key is its own pair key, so in a group send, B can’t decrypt what went to C. |
| An unpaired app | Send offers (asked first), receive what you choose to send it | No shared key, so a one-off one: X25519 to the receiver’s per-run key. A listener reads nothing; an active attacker could pose as either app, so these are labelled “encrypted, not verified”. Pair to be sure. |
| Someone with a copy of your files (a backup, a synced or copied folder, a stolen disk image) | Read the state folder | Pair keys and the browser sign-in key are sealed with a vault key kept in the OS keystore (see Keys at rest); the copy alone opens nothing. Not where the keystore is a plain file (Docker, Linux without a keyring), which the app says. Files you receive are stored unencrypted. |
| Malware running as you | Anything you can | Out of scope on every desktop OS. On macOS it would at least trigger a Keychain prompt. |
Not in scope: hiding that two devices talk, file sizes, or timing; a compromised OS on either end.
Built only from vetted parts in cryptography
(pyca, OpenSSL underneath). No primitive is implemented here.
ot-file/2: a handshake per transfer, then the same records as before.
pair key K 32 bytes from SRP pairing (paired apps only; see trust-model.md)
kx_r the receiver's per-run X25519 key (in its hellos; never stored)
salt 32 random bytes the sender picks per offer
T1 JSON["open-transfer/2", sender app, receiver app, job id, target, salt, eph_s, kx_r]
T2 T1 plus eph_r
offer (sender → receiver; signed with X-OT-Auth when paired)
eph_s a fresh X25519 key, for this offer only
PSK = HKDF(K, salt, "open-transfer-psk/2") paired; 32 zero bytes unpaired
k1 = HKDF(X25519(eph_s, kx_r) ‖ PSK, salt, "open-transfer-offer/2" ‖ T1)
meta sealed with HKDF(k1, salt, "open-transfer-meta/2|…") names, types, who's sending
answer (receiver → sender, in the 201)
eph_r a fresh X25519 key, for this answer only
confirm = HMAC-SHA256(HKDF(k1, "", "open-transfer-confirm/2"), T2)
session = HKDF(X25519(eph_s, eph_r) ‖ k1, salt, "open-transfer-session/2" ‖ T2)
file key = HKDF(session, salt, "open-transfer-file/2|<sender>|<receiver>|<target>|<index>|<size>")
signal key = HKDF(session, salt, "open-transfer-signal/2|<direction>|<sender>|<receiver>|<target>")
verify key = HKDF(file key, "", "open-transfer-verify/2")
This is the shape of TLS 1.3’s PSK + (EC)DHE key schedule, with a Finished-style
confirmation; every primitive is cryptography’s (X25519, HKDF-SHA256,
HMAC-SHA256, AES-256-GCM), checked against RFC 7748, RFC 5869, RFC 4231 and
the GCM paper’s test vectors (tests/test_handshake.py). The composition
hasn’t had an outside review or a formal proof.
kx_r can make confirm. Unpaired: PSK
is zero, so it proves only that the answer came from whoever holds kx_r
(“encrypted, not verified”).confirm, and the sender refuses the transfer (never sends it plain).File contents: AES-256-GCM in STREAM records (the online-AE construction
of Hoang, Reyhanitabar, Rogaway and Vizár, as used by age and Tink):
AES-256-GCM(file key, nonce = i as 11 bytes ‖ last-flag, plaintext)
and is 16 bytes longer than its plaintext.size + 16 × max(1, ⌈size / 65536⌉).Metadata. File names, types and who is sending are sealed with the meta key (AES-256-GCM, random 96-bit nonce). The plain offer carries only placeholders and sizes, which the receiver needs for its space check.
Integrity confirmation. After the last record, the sender confirms the
whole file with HMAC(verify key, SHA-256 of the plaintext) instead of the
bare hash. A bare hash over plain HTTP would let a listener confirm a guess
of the file’s contents.
Nothing secret leaves the app. Keys are never in URLs, logs or API
responses; /api/state only says "encrypted": true|false.
"enc": 2 and its per-run key "kx" in /info and in hellos.enc: 2, it records that in
trusted.json (the enc flag). The flag is sticky until you unpair.kx carries
"enc": {"v": 2, "salt", "eph", "kx", "meta"}. Between paired apps the
offer is signed, so nobody can remove that block in transit.ot-file/2 answers 201 {…, "enc": 2, "eph", "confirm"}
and then accepts only encrypted bytes for that transfer.enc: 2, or its confirm doesn’t check out:
There is no silent fallback. A plain transfer is always visible as one, in the transfer list and in history.
| Path | Before | Now | Notes |
|---|---|---|---|
Paired app → app, small file (single PUT) |
Plain HTTP | AES-256-GCM STREAM | _Sink._put_remote encrypts and receive_file decrypts on the fly, 64 KiB at a time. |
Paired app → app, big file (2 MiB Content-Range pieces, resumable) |
Plain HTTP | AES-256-GCM STREAM | Each piece is 32 whole records. Content-Range stays in plaintext positions. The receiver decrypts each piece before staging it, so a resumed transfer still lines up. |
| Group send (one upload, many receivers) | Plain HTTP to each | Per-receiver keys | One plaintext stream fans out. Each receiver’s thread encrypts with that pair’s key. |
| Unpaired app ↔ app | Plain HTTP | AES-256-GCM STREAM, one-off key, labelled “encrypted, not verified” | X25519 between the sender’s one-off key and the receiver’s per-run key (never stored: forward secrecy), then HKDF as for a pair key. Contents and names are hidden from a listener. Not authenticated: someone who can answer in the receiver’s place gets the file. A stripped key is refused, never sent plain. |
| Paired, but the other app is older | Plain HTTP | Plain HTTP, labelled | Until it updates. |
| App’s own window → its app | Loopback | Loopback | Never on the network. |
| Visitor browser → its app (web page opened from a link or QR code) | Plain HTTP | Plain HTTP by default; TLS with --https |
See Browsers. The visitor’s page says “not encrypted” or “encrypted (HTTPS)”. |
| App → visitor browser (download, or pushed to a visitor) | Plain HTTP | Same as above | Same hop, same answer. |
| Android share sheet → the app | In-process | In-process | content:// streams are copied inside the app (no network). |
| Over a phone’s hotspot | — | Same as the path used | A hotspot is just another LAN: nothing changes per path. |
| Browser ↔ browser (WebRTC data channel) | DTLS | DTLS; its SDP is MAC’d between apps | Browsers always encrypt data channels; the file name and type travel inside DTLS. Between two apps the connection messages carry a MAC under the transfer’s key (Direct transfers). Each browser’s own hop to its app is plain HTTP unless --https, so an active attacker there could still swap the DTLS fingerprints. |
| Clipboard sync | Sealed per recipient (sync/1) |
Unchanged | See sync.md. |
| Android ↔ desktop, Windows ↔ macOS | — | Same as paired app ↔ app | Every app runs the same Python code (cryptography 42+ on Android via Chaquopy). |
A browser’s own hop to its app can’t use ot-file/2:
http://<LAN address> isn’t a secure context, so it has no
WebCrypto; JavaScript crypto from a library would be served over the same
plain HTTP, so an active attacker could replace it;The one sound answer is TLS, which gives the hop ephemeral ECDHE session keys
from the browser’s own vetted stack. --https (OPEN_TRANSFER_HTTPS=1)
serves browsers on the next port over TLS 1.2+ with a self-signed P-256
certificate (tls.py); links and QR codes then use https://. Apps keep
talking to each other on the plain port, encrypted with ot-file/2.
tls.json), like the pair keys.
Python’s ssl loads keys only from files, so it’s written to an
owner-only temporary file for the moment it’s read.--https, a browser that opens a page on the plain
port (an old http:// link, a typed address) is redirected to the TLS
port. The device’s own window (127.0.0.1) and the apps’ /api/p2p calls
stay on the plain port. An active attacker can still strip that redirect
for a browser that has never been to the https:// address (no HSTS: a
browser ignores it on a certificate it had to be told to accept).--https, a browser’s API calls on the plain
port are refused (403 https_required, with the HTTPS address), so a page
left open from an old link can’t keep sending over plain HTTP. Exempt: the
device’s own window (loopback), the apps’ /api/p2p calls, /api/health,
and iPhone Shortcuts (/api/sync/client/*), which can’t trust a self-signed
certificate and use a per-device token on plain HTTP (sync.md).Without --https, everything between a visitor’s browser and its app is
readable and changeable by someone on the same network, which means, in full:
With --https all of this is inside TLS, once the person accepted the
certificate. Comparing its fingerprint with the one on the owner’s Add device
sheet is what makes that acceptance an authentication rather than a guess.
| Option | Verdict |
|---|---|
TLS (--https) |
Done, opt-in. The only thing a browser trusts that isn’t sent over the hop it protects. Self-signed: one warning per device, then kept 397 days. |
| Certificate fingerprint check | Manual: the owner’s sheet shows the SHA-256. A page can’t check its own certificate (it would run on the connection it’s checking), and a QR code carrying the fingerprint is only useful to a scanner app that pins it, which browsers’ cameras don’t. |
| Authenticating the browser’s signaling | Not possible over plain HTTP. Any key the page used would be delivered by the same hop. Over TLS it’s already authenticated as far as the certificate is. |
| Ephemeral session credentials | Already there: a visitor’s cookie is random per browser, and a QR invite works for 10 minutes. They stop other browsers, not someone reading the hop. |
| Browser compatibility | TLS 1.2+, P-256: every browser that runs the page. WebRTC data channels are DTLS in every browser; the page falls back to the app if RTCPeerConnection is missing. |
A publicly trusted certificate (a real domain per device, like Plex’s *.plex.direct) |
Not adopted. Needs a domain, a CA account and internet to issue and renew, and puts each device’s key in a public CA’s logs; it breaks offline and hotspot use, the reason Open Transfer exists. |
| A local CA installed on each phone | Not adopted. Installing and trusting a profile (iOS Settings → General → VPN & Device Management, then Certificate Trust Settings) is harder and riskier than one warning, and a leaked CA key would let its holder impersonate any site to that phone. |
| Onboarding without TLS knowledge | Install the app and pair. Between apps everything is end-to-end encrypted and authenticated, with no certificates to judge: the safe path the page and README point to. For a browser that must stay a browser: --https, accept once, and (if it matters) compare the fingerprint on the owner’s Add device sheet. With --https the plain port refuses browsers, so the warning can’t be avoided by an http:// link. |
So a browser transfer is not end-to-end encrypted by Open Transfer. Its
data channel is DTLS, but the DTLS keys are authenticated only as well as the
SDP that carried their fingerprints, which crossed each browser’s hop to its
app: plain HTTP by default, TLS with --https.
A page sending to a browser opens a WebRTC data channel to it. The file
then goes browser to browser, inside DTLS. Each browser checks the other’s
DTLS certificate against the a=fingerprint in the SDP it was handed, so
whoever can change an SDP on its way can sit in the middle and read the
file. The SDP crosses up to three hops:
sender page ──(1)── its app ──(2)── receiver's app ──(3)── receiver page
| Hop | Protection |
|---|---|
| (1), (3): a page to its own app | The app’s own window: loopback, never on the network. A visitor’s browser: plain HTTP, or TLS with --https (above). |
| (2): app to app (only when the two browsers are on different apps) | For an encrypted transfer, a MAC under that transfer’s key. A plain one (an older app): the session secret only, as before. |
On hop (2) each message carries a counter n and
mac = HMAC-SHA256(K, JSON[dir, receiver's session id, sender's job id, target, kind, sdp, n]),
where K = HKDF(transfer key, salt, "open-transfer-signal/1|sender|receiver|target"):
n must be above the last one taken for that transfer and direction, so
a message can’t be replayed (a replayed offer would restart the receiving
browser’s connection). A message lost on the way just makes the page try
again with the next n;The SDP isn’t encrypted on hop (2): what it holds (a certificate fingerprint,
local addresses) isn’t secret, and DTLS already encrypts the data. Only
changing it matters, and the MAC stops that. (Between paired apps the request
also carries an X-OT-Auth signature, like every request to a paired app; the
MAC is what’s checked, since it also binds the transfer and the counter.)
| Attack on hop (2) | Result | Test (tests/test_signaling.py) |
|---|---|---|
| Changed DTLS fingerprint, ICE candidate, whole SDP, kind or counter | 403, the page gets nothing; the real message still works after |
test_a_changed_message_is_refused |
| MAC removed (a downgrade) or made with another key (another device) | 403 |
same |
| Replayed message | 403 |
test_a_replayed_message_is_refused |
| Message moved to another transfer, with that transfer’s (sniffed) secret | 403 |
test_a_message_moved_to_another_transfer_is_refused |
| Answer moved to another receiver in a group | 403 |
test_an_answer_moved_to_another_receiver_in_a_group_is_refused |
| Message for a transfer the receiver canceled | 409 |
test_messages_for_a_finished_transfer_are_refused |
| Message lost, sent again | Delivered once, with the next n |
test_a_lost_message_can_be_sent_again |
| Older app (plain transfer) | Works without a MAC, labelled “not encrypted” | test_an_older_app_still_swaps_messages_labelled_plain |
Each runs for a paired and an unpaired (one-off key) transfer. If no connection opens in ~12 s, or it breaks, the sender’s page falls back to sending through the apps (encrypted between them as usual).
| Event | What happens | Tested |
|---|---|---|
| Pairing | SRP-6a leaves both apps with the 32-byte pair key (trust-model) | test_mesh pairing tests |
| Each transfer | A new 32-byte random salt, so every file key is new. The pair key itself never encrypts anything. | test_every_transfer_gets_its_own_keys |
| Each file | Its own key: index, size, target and both app ids are in the HKDF info | test_ciphertext_from_another_file_or_transfer_is_refused |
| Group send | Each receiver’s file key comes from its pair key | test_every_receiver_in_a_group_gets_its_own_key |
| Unpair | The key is deleted. Encrypted transfers from that device stop, and new ones can’t be keyed. | test_unpairing_stops_transfers_from_that_device |
| Re-pair / reinstall | A new pair key; the enc flag starts over and is learned again from the next signed hello |
test_re_pairing_gives_a_new_key_and_transfers_still_work |
| History | Records hold names, sizes and states, never keys, so re-pairing never touches them | — |
| Key | Rotated | Revoked |
|---|---|---|
| Pair key | Only by pairing again (test_pairing_again_works_with_new_keys). Every transfer makes its own session key from a fresh handshake. |
Unpair: this app tells the other in a request signed with the pair key (its last use), then deletes the key, cancels what was under way with that device both ways and drops those session keys. The other forgets the pairing and its page says “X unpaired this device. Pair again…”. If it was away, its next send is refused with peer_unpaired and the toast offers Pair again; the old key opens nothing either way. History on both sides is kept. (tests/test_unpairing.py) |
| One-off keys | The receiver’s per run, the sender’s per offer; never stored. | — |
| Vault key | --rotate-keys (app not running) |
Delete the keystore item: pairings lock, and stay listed until paired again |
| TLS certificate | 30 days before it ends (397 days) | Delete tls.json: a new one next start (browsers warn again) |
| What was recorded | Later stolen | Can it be read? |
|---|---|---|
| A finished transfer’s file contents and WebRTC messages | The pair key | No: the session key also needs X25519(eph_s, eph_r), and both ephemeral keys were dropped during the handshake (test_a_stolen_pair_key_cant_decrypt_a_recorded_transfer) |
| Its file names and sender | The pair key, while the receiver is still running the same session of the app | Yes: names are sealed under k1, which uses the receiver’s per-run key (it can’t use eph_r, which doesn’t exist until the answer). Once that app restarts, no. |
| Anything | Memory of a running app mid-transfer | Yes: out of scope (malware running as you) |
Unpaired transfers get the same per-transfer forward secrecy, without the authentication.
Between two apps, for an encrypted transfer, someone on the network still sees:
Content-Length/Content-Range) and how
many files./info): its id, name,
icon, platform, version, whether it takes files only from paired devices,
its per-run key, and the names of browsers connected to it.from), and the
target’s id. File names, types and the person sending are sealed.Hiding names in announcements would hide the device from people choosing whom to send to, which is the point of them; sizes and timing are out of scope (see the threat model).
Secrets in the state folder are sealed (AES-256-GCM) with a random
32-byte vault key that lives in the operating system’s keystore
(keystore.py). Each sealed value names
its store and key id and is bound to what it is (pair|<device id>,
session), so it can’t be moved onto another entry.
| Platform | Vault key kept in | Protects against |
|---|---|---|
| macOS | the login Keychain (generic password, default access: only this app reads it without a prompt) | Copies and backups of the state folder; other apps (they trigger a prompt) |
| Windows | keys/<id>.dpapi, encrypted with DPAPI for this user |
Copies of the folder to another PC or user; offline disk reads without your Windows password |
| Android | keys/<id>.wrapped, wrapped by an AES key in the Android Keystore (hardware-backed where the phone has it; can’t be exported) |
Copies of the app’s data (backups are off too: allowBackup="false") |
| Linux desktop | the Secret Service keyring (GNOME Keyring, KWallet) via secret-tool; the key goes over stdin, never on a command line |
Copies and backups of the folder |
| Docker, Linux without a keyring | keys/<id>, mode 0600: a plain file, not OS-protected |
Nothing more than file permissions. open-transfer --keys and /api/state (keys.protected: false) say so; it’s never called protected. OPEN_TRANSFER_KEYSTORE=file picks this store on purpose (the tests do). |
| What’s sealed | File | Without its vault key |
|---|---|---|
| Pair keys | trusted.json ("key": "ot-vault/1:…") |
The pairing is kept, locked: never trusted, shown as “Couldn’t unlock the pairing with X … Pair again”, and back as soon as the key is (keychain access restored) |
| Browser sign-in key | secret |
A new one is made: browsers enter the PIN again |
Migration. An older trusted.json (keys in hex) and secret (raw
bytes) are sealed the first time the new version starts, in place; names,
enc flags and platforms are kept (test_old_trusted_json_is_migrated…).
Recovery, never silent loss.
open-transfer --rotate-keys (app stopped) reseals everything with a new
vault key, then deletes the old one.macOS and updates. An ad-hoc signed build counts as a new app after each update, so macOS asks once to let it read its Keychain item (“Always Allow”). Builds signed with a Developer ID keep their identity and won’t ask. If you click Deny, pairings are locked (above) until you allow it.
Logs and API. A TrustedDevice never prints its key (repr=False);
/api/state carries only the store’s name, whether it’s protected, and the
names of locked pairings.
| Check | Finding |
|---|---|
| File nonces | Unique: every file has its own key (HKDF over the pair or one-off key, a random 32-byte salt per offer, both app ids, target, index, size), and the nonce is the record counter (11 bytes, 2⁸⁸ records) plus the last-flag. A piece sent again after an error is the same encrypted body (_push_chunked keeps it), never new bytes under an old nonce. Retry makes a new offer, so a new salt and new keys. |
| Metadata nonces | One seal per meta key (the key is new with every offer), random 96-bit nonce. |
| Vault nonces | Random 96-bit nonces under one vault key; every save reseals every key, but that’s thousands of seals, far below the 2³² bound for random nonces. --rotate-keys starts a new key. |
| Key derivation | HKDF-SHA256 with a distinct label per use (open-transfer-file/1, -meta/1, -verify/1, -eph/1, -signal/1, pair-key/2). The pair key never encrypts anything itself. |
| One-off keys | X25519 from cryptography, which refuses a point that yields an all-zero secret (a 400, tested). The receiver’s key lasts one run and is never stored; the sender’s is new per offer. |
| Signaling | WebRTC messages between apps: HMAC-SHA256 under a per-transfer key, with a per-direction counter; see Direct transfers. |
| Replay | Signed requests carry a timestamp (±120 s) and are accepted once. A replayed record or piece fails: each transfer and file has its own key. Uploads need the session secret; between unpaired apps a listener can see that secret, but can’t make records that decrypt. |
| Metadata integrity | Sizes are in the file key, so a changed size fails decryption. Names, types and sender are sealed (AES-GCM). The plain from of an unpaired offer is not authenticated, like everything about an unpaired app. |
| Partial files | A file is written to .part and kept only after its last record and the MAC check pass; on any failure the .part is deleted (test_a_tampered_*, test_unpaired_tampering_leaves_nothing, test_a_canceled_encrypted_transfer_leaves_nothing). |
| Cause | Receiver | Sender |
|---|---|---|
| Wrong key, tampered or injected record, records out of order, file cut short | File removed: “It arrived damaged or wasn’t from X — nothing was kept.” | “X couldn’t verify the file.” |
| A downgrade was attempted | — | “Couldn’t set up encryption with X.” |
| “Encrypted transfers only”, the other app can’t encrypt | The offer is refused: “Y takes only encrypted transfers. Update Open Transfer on this device to send to it.” | “Not sent: X can’t encrypt (an older version?) and this device sends only encrypted transfers. Update Open Transfer on X, or turn off “Encrypted transfers only”.” |
| A WebRTC message was changed, moved or replayed | Refused (403); nothing reaches the page |
The page’s direct attempt times out and the file goes through the apps |
| Unpaired during a transfer | Transfers from that device stop: “No longer paired with X.” | Its next piece fails the same way. |
| Interrupted or app restarted | .part files and staged pieces are deleted (staged pieces after their usual expiry) |
Retried or resumed as before; every piece is authenticated again. |
python scripts/bench_encryption.py --mb 1024 on an Apple M5 Mac
(Python 3.14, cryptography 50, ot-file/2 at c0246c0) gave the figures
below. Both apps run in one process on 127.0.0.1, so one CPU does the
sender’s encryption and the receiver’s decryption, and the network is never
the limit. On real devices each side does half that work. “plain” stands for
an older app, “one-off” for an unpaired one, “paired” for a paired one.
| Mode | Streams | Size | Time | Throughput | CPU | Peak memory | 1 KiB latency |
|---|---|---|---|---|---|---|---|
| plain | 1 | 1024 MB | 2.74 s | 374 MB/s | 5.07 s | 82 MB | 3.1 ms |
| one-off | 1 | 1024 MB | 4.8 s | 213 MB/s | 8.49 s | 74 MB | 3.2 ms |
| paired | 1 | 1024 MB | 4.07 s | 252 MB/s | 8.01 s | 76 MB | 3.3 ms |
| plain | 4 at once | 1024 MB | 4.43 s | 231 MB/s | 12.76 s | 102 MB | 3.1 ms |
| one-off | 4 at once | 1024 MB | 6.54 s | 157 MB/s | 16.77 s | 81 MB | 3.0 ms |
| paired | 4 at once | 1024 MB | 6.41 s | 160 MB/s | 16.79 s | 81 MB | 4.1 ms |
AES-256-GCM on its own (encrypt and decrypt, one core): 1597 MB/s. The handshake (three X25519 operations a side, HKDF, HMAC, both ends in one process) takes 0.25 ms per transfer. From sending to “accepted” measured 55–59 ms in every mode, plain included: that’s the benchmark’s own 50 ms polling, so the handshake doesn’t show end to end.
Every OS in CI (bench_encryption.py --mb 256 on GitHub’s runners, run
41665075497 on 8c4c39a, ot-file/2: shared, slower CPUs than the M5; same
one-process setup; “paired” is the authenticated handshake):
| Runner | AES-GCM alone | Handshake | Plain, 1 stream | Unpaired, 1 | Paired, 1 | Paired, 4 at once | Peak memory | 1 KiB latency (plain / paired) |
|---|---|---|---|---|---|---|---|---|
| Linux x64 | 462 MB/s | 0.34 ms | 362 MB/s | 177 MB/s | 168 MB/s | 105 MB/s | 56–77 MB | 4.7 / 4.5 ms |
| Windows x64 | 489 MB/s | 0.37 ms | 143 MB/s | 122 MB/s | 114 MB/s | 89 MB/s | 59–68 MB | 21 / 60 ms |
| macOS x64 (Intel) | 321 MB/s | 1.12 ms | 196 MB/s | 94 MB/s | 83 MB/s | 67 MB/s | 47–74 MB | 9 / 11 ms |
| macOS arm64 | — | — | — | — | — | — | — | the CI job was cancelled before it got a runner; see the M5 figures above (0.25 ms handshake, 252 MB/s paired at 1 GB) |
Shared runners vary from run to run (Windows paired, 4 at once, measured
164 MB/s in run 41614032411 with ot-file/1 keys); read these as “several
times Wi‑Fi”, not as exact figures. Windows’ 1 KiB latencies swing the most.
Android emulator (the CI smoke test, phone → runner over the emulator’s network, 32 MB, run 41665075497): 3.7 MB/s unpaired (one-off key), 3.3 MB/s paired, both with the per-transfer handshake. The emulator’s networking is the limit there, not the cipher; it shows the encrypted path works on Android and costs little, not what a phone does.
For a very fast link you trust (2.5 or 10 Gb Ethernet, Thunderbolt), the send bar has Fast: send without encryption. It is off by default, shows only when an app (not a browser) is chosen, and applies to that one send. Wi-Fi and gigabit Ethernet are slower than encrypted transfers, so it changes nothing there.
"fast": true; a request that also has an enc block is treated as
encrypted. Checksums are still verified. Only the device’s own owner can ask for it.paired_only still
applies.scripts/bench_encryption.py --one fast, both apps on one computer):
plain throughput is about 1.5–2× encrypted; the 1 MiB pieces added roughly 15–45% on
top, and the runs were noisy.“Old” below means a released version before this one (no encryption at all,
3.3.0 and earlier), or an earlier build of this branch (ot-file/1).
| Sender | Receiver | Result |
|---|---|---|
| New | New, paired | Encrypted and authenticated, with forward secrecy (required) |
| New | New, unpaired | Encrypted with forward secrecy, labelled “not verified” |
| New | Old, paired, never said it encrypts | Plain, labelled; refused with “Encrypted transfers only” |
| New | Old, paired, said it encrypts (ot-file/1 build) |
Refused: “Couldn’t set up encryption” (never plain). Update it. |
| New | Old, unpaired | Plain, labelled; refused with “Encrypted transfers only” |
| Old | New | Plain, labelled; refused when the receiver has “Encrypted transfers only” (403 encrypted_only, “Update Open Transfer on this device to send to it”) |
| Browser | New app | Plain HTTP, or TLS with --https; labelled by the browser’s hop. With --https a browser can’t use the plain port at all (403 https_required, the page redirects) |
| New app | Browser | The same, for the browser’s hop; through another app, as that app reports its browser’s hop |
Defaults and migration.
device.json) keeps
working as before with older apps: the first start of this version records
"encrypted_only": false in settings.json, once. The owner turns it on
with the switch under Add device; --encrypted-only /
OPEN_TRANSFER_ENCRYPTED_ONLY=1 turns it on whatever was saved.--https stays off by default: browsers warn once on a self-signed
certificate, and Open Transfer is meant to be “open a link”. See
Browsers.The policy:
kx is refused too.
WebRTC messages for an encrypted transfer without a MAC are refused.--https, not by “Encrypted
transfers only”.The app works out one level for each transfer, from every hop it crossed
(mesh._delivery_security, _session_security):
| Label | Level | Means |
|---|---|---|
| “· encrypted” | verified |
Encrypted end to end between two apps that are paired: authenticated |
| “· encrypted, not verified” | unverified |
Encrypted, but nobody vouched for the other end: an unpaired app, or a WebRTC transfer whose connection messages crossed a plain hop |
| “· encrypted in transit” | transport |
Encrypted on each hop (HTTPS to a browser, DTLS between browsers): the app in between can read it, and the browser trusts its app only as far as the certificate it accepted |
| “· not encrypted” | plain |
Some hop was plain HTTP: a browser without --https, or an older app |
| (nothing) | local |
Never left this device |
Tested in tests/test_security_labels.py (9 cases, all failed first).
Older versions are simulated in the tests (an app with enc, kx or the
offer’s enc block removed: tests/test_encrypted_transfers.py,
tests/test_encrypted_only.py, tests/test_signaling.py); no released older
build was run against this one.
What each path gets, and only what’s tested. “Real device” means checked on physical hardware; none of these have been yet (device-testing.md). FS = forward secrecy (a later stolen pair key doesn’t open a recorded transfer).
| Transfer path | Encryption | Authentication | Integrity | FS | Label | Evidence |
|---|---|---|---|---|---|---|
| Paired app ↔ app | AES-256-GCM (ot-file/2) under a per-transfer session key; names and sender sealed |
Yes: offer signed with the pair key, answer confirmed with it | GCM per record, MAC’d checksum, sizes in the key, transcript-bound handshake | Contents: yes. Names: once the receiver restarts | encrypted | test_encrypted_transfers.py, test_handshake.py, test_forward_secrecy.py; CI on Linux, Windows, macOS, Android emulator |
| Unpaired app ↔ app | The same, PSK zero | No: whoever answers for the advertised key | Against anyone without the session key | As paired | encrypted, not verified | same, unpaired cases |
| WebRTC, app ↔ app hop | SDP not encrypted (not secret) | Paired: per-direction keys from the session (pair key). Unpaired: not verified. Older app: session secret only | Encrypted transfers: MAC, counter, state check | — | — | test_signaling.py |
| Browser ↔ browser | DTLS (the browsers’) | As far as each signalling hop: TLS with --https, loopback for an app’s window, none on plain HTTP |
DTLS | DTLS’s own (ephemeral ECDHE) | encrypted in transit, or encrypted, not verified | test_security_labels.py; test_mesh.py signal tests (no real WebRTC in CI) |
| Browser ↔ app | None by default; TLS 1.2+ with --https (then the plain port refuses browsers) |
--https: a self-signed certificate the person accepts (fingerprint on the owner’s sheet). Otherwise none: a PIN keeps strangers out, it doesn’t protect the hop |
TLS, or none | TLS’s own (ECDHE) | encrypted in transit, or not encrypted | test_https.py, test_security_labels.py, e2e/test_https_ui.py (Chromium over TLS) |
| Browser → app → app | TLS or plain to its app, then ot-file/2 |
Browser hop as above; app hop as paired/unpaired | Per hop | App hop only | the weakest hop | test_security_labels.py |
| Older app versions | None | Paired: signed requests. Unpaired: none | TCP only | No | not encrypted; refused with “Encrypted transfers only” (on for new installs) | simulated: test_encrypted_only.py, test_encrypted_transfers.py |
| Android Share ingestion | Not on a network (content:// copied in the app), then as the path it’s sent on |
An Android intent from the phone’s owner | In-process copy, then as sent | As sent | as sent | emulator smoke test in CI |
| Group transfers | Per receiver: own offer, ephemeral keys, salt, session | Per receiver | Per receiver; one receiver’s answer can’t stand for another’s | Per receiver | per receiver | test_each_receiver_in_a_group_has_its_own_session, test_an_answer_moved_* |
| Hotspot transfers | As the path used: a hotspot is a LAN | As the path used | As the path used | As used | as used | test_hotspot.py (simulated addresses) |
| iPhone Shortcuts (clipboard) | None: plain HTTP to its hub | A per-device token | None beyond TCP | No | — | sync.md; Shortcuts can’t trust a self-signed certificate |
Is Open Transfer end-to-end encrypted? Between two of its apps, yes:
encrypted end to end with forward secrecy, and authenticated when they’re
paired. Not every path: a browser’s hop is plain HTTP unless --https,
and even then the app in between reads what a browser sends; an older app
gets plain HTTP unless refused; iPhone Shortcuts use plain HTTP with a token.
So the product as a whole is not fully end-to-end encrypted, and its pages
say which kind each transfer had.
| Area | State |
|---|---|
| Remaining plaintext | A browser’s hop without --https; older apps (off for new installs); iPhone Shortcuts clipboard; discovery announcements and hellos (names, ids, the per-run key); offer sizes and counts. |
| Unauthenticated metadata | Everything from an unpaired app (who it says it is, its announcements); a peer’s report of its browsers’ hops (secure) and of its visitors; between paired apps the hellos are signed, multicast announcements aren’t. |
| Key storage | The vault key is in the OS keystore except Docker / Linux without a keyring (a private file, said so). Session keys live only in memory and are dropped, not wiped: Python can’t overwrite memory. An ad-hoc signed Mac build asks once per update for its Keychain item. |
| Forward secrecy | File contents and WebRTC messages: per transfer, both sides. File names and sender: per run of the receiving app (sealed before the receiver’s fresh key exists). Not against someone reading a running app’s memory. |
| Legacy risks | An existing installation keeps “Encrypted transfers only” off until its owner turns it on; earlier builds of this branch (ot-file/1) can’t receive from this one (refused, not plain). |
| Browser limits | Self-signed certificate: one warning per device, trust is the person’s choice; no HSTS; the app sees what a browser sends; a browser’s direct transfer is only as verified as its signalling hops. |
| Group isolation | Every recipient has its own handshake and keys; tested on the wire (one recipient’s session doesn’t open another’s copy). |
| Outside review | None. The handshake is a composition of standard parts in the shape of TLS 1.3’s PSK + ECDHE schedule, not a formally verified protocol. |