Repository navigation
Security model
Nylzo encrypts message content on the sender's device. Its URL fragment carries the decryption secret; browsers do not send that fragment in HTTP requests. The protocol defines the cryptography and request rules. The security policy explains disclosure and supported versions.
Nylzo is early software and has not had an independent security audit. Automated checks, a verified Git signature, and build provenance do not certify the product's security.
Your browser does not send the key after # to the server. The page that handles the key, though, also comes from the server. If the server, its hosting or a valid certificate for its name is in someone else's hands, they can send you a page that reads your message, and neither you nor your browser can notice. Browsers cannot yet check the code of an ordinary website before running it. A verified client runs code from a signed, publicly logged release instead, so the server receives only encrypted data: nylzo web and nylzo open in your browser, the nylzo command line, and later a browser extension. The sender and the reader both need one. The protocol, section 14, lists the rules and what stays impossible.
The Compose and Hetzner/Flatcar profiles isolate web delivery from the API process on the same host. Their Caddy build embeds the static frontend and client manifest, and never requests these from the backend. An API response cannot set browser policies, cookies or redirects; a data-only response boundary rejects HTML, scripts and encoded bodies. The backend has no write access to Caddy's executable, configuration, certificate state or release authority. This restricts a compromise of the backend process; it does not protect against a compromised host, TLS endpoint, publishing workflow or a vulnerability in the trusted frontend. A standalone nylzo serve still serves both the API and embedded frontend from one process.
nylzo verify-client compares an instance's client bytes, build identity, and security headers with the client embedded in the binary. It establishes what the server sent to that check. A hostile server can recognize the CLI and send different code to a browser. The CLI guide describes this limit.
The production client bundles its scripts, styles and fonts locally. The final build parses the emitted JavaScript module graph and CSS URLs, rejecting external imports, computed module imports, missing assets and unbundled CSS imports. It adds SHA-384 SRI to script and stylesheet elements, including stylesheets created during prerendering. A generated import map supplies SHA-384 metadata for the dynamically imported application module and for the worker, whose hash the client reads from it. Browser tests reject a modified entry script, dynamically imported module, worker and stylesheet. Safari 26.6 blocks a module under Integrity-Policy when only the import map gives its integrity and it is loaded by a static import (WebKit bug 326340, open). The client has no such import: the entry module carries its own SRI attribute, the application module is loaded with import(), for which WebKit sends the import map's integrity with the request, and its one static import is the entry module, which the browser has already loaded. The Integrity-Policy: blocked-destinations=(script) header also rejects script fetches without integrity metadata in supporting browsers. Chromium tests enforce this missing-metadata case. Stylesheets always receive SRI attributes and hash-mismatch tests; the header does not advertise the style destination, which the tested Chromium does not implement. Unsupported browsers retain element SRI and CSP protections.
The HTTP CSP allows scripts and stylesheets only from the same origin, plus the inline import map and inline styles of each page by their SHA-384 hash. It uses no nonce, so a page and its header are the same on every response. Anyone can then compare the page a browser received with the hash the instance publishes, and the page meets the rules of WEBCAT and WAICT, which refuse nonces. Trusted Types, same-origin worker restrictions and the connection policy stay in force.
Import-map integrity applies to the document module loader, and no browser checks integrity for new Worker(). The client therefore fetches the KDF worker once, before its first API request, with fetch and the SHA-384 value from the import map, and starts every worker from a blob: URL of those verified bytes. A modified worker fails the check and never receives a passphrase. The CSP allows workers only from blob: URLs, and the nylzo-kdf Trusted Types policy accepts only the URL the client has just created. The client creates its Trusted Types policy as its entry module loads, so later code cannot take its name first. No remote loader or compatibility polyfill is fetched. Browsers without import-map integrity support still enforce element SRI and CSP; they do not gain integrity checking for imported modules from the map.
SRI protects a resource relative to its expected hash. An attacker who can replace the HTML can replace its hashes and policies too. These controls do not remove the trust boundary described above.
References: Subresource Integrity, import-map integrity, multiple CSP policies.
COOP same-origin and COEP require-corp enable cross-origin isolation in supported secure browser contexts. CORP same-origin restricts resource embedding, and CSP frame-ancestors 'none' blocks framing. Isolation reduces exposure to other origins; it does not guarantee a particular operating-system process layout or eliminate all side channels. Permissions Policy denies every feature the client does not use, from sensors, cameras and screen capture to local network access, built-in AI models, USB, Bluetooth and WebAuthn, as listed in the protocol. Only Chromium reads the header today; Firefox and Safari ignore it.
CSP limits fetches, but not navigations, DNS prefetch or WebRTC. Connection-Allowlist closes those paths in Chromium 152 and later: every page may connect and navigate only to its own origin, the GitHub repository the client links to and the operator's contact, and redirects and WebRTC are refused. Code that got into the page, for example through a compromised dependency, therefore cannot carry a link key or a decrypted message away by navigating to another address, also not by first moving to another page of the instance, since every page carries the list. Firefox and Safari ignore the header.
The HTTP script policy is 'self' plus the hash of the import map, with object-src 'none' and base-uri 'none'. It has no strict-dynamic and no fallback for unsafe-inline, http: or https:, so an injected inline script or a script from another origin does not run. Trusted Types is enforced where the browser implements it, allowing only the exact-URL KDF worker policy. Svelte builds component templates element by element (fragments: 'tree'), so it needs no policy and the bundle passes no string to an HTML sink. There is no default policy that silently blesses strings. Tests exercise rejected HTML sinks, forbidden policy creation and eval from a real user-event callback, outside the browser automation debugger's CSP exemption.
Messages and attachment names are rendered as text nodes. They are never parsed as HTML, so applying a sanitizer would change the message instead of adding a needed boundary. Lint rules reject raw Svelte HTML and unsafe markup sinks. If a future feature deliberately accepts HTML, it needs its own review and a safe Sanitizer API path or a narrowly scoped, audited sanitizer policy; it never adds a policy that passes strings through, and the build refuses any policy other than nylzo-kdf.
Browser mutations require X-Requested-With: XMLHttpRequest, exact Origin/Referer checks and Go's native Fetch Metadata protection before any request body is read. The target comes from NYLZO_PUBLIC_URL, not forwarded headers. Signed native CLI requests retain their existing authentication rules and compatibility. No wildcard or sibling-subdomain CORS allowlist is enabled. The marker is an additional browser boundary, not a substitute for signatures or a defense against XSS.
The HSTS header sets two years with includeSubDomains; preload. HTTPS must work for every subdomain covered by that commitment. The preload token alone does not enroll a domain in browser preload lists; submission is a separate operator decision. It is not submitted automatically by this software.
References: Go CrossOriginProtection, OWASP CSRF prevention, strict CSP, cross-origin isolation, safe Sanitizer API methods, HSTS deployment and preload, Connection Allowlists.
AES-256-GCM encryption and decryption, HKDF, hashing and Ed25519 signing use the browser's crypto.subtle API. Content keys are derived with extractable: false and kept in memory. Read and verifier signing keys are imported as non-extractable keys; no private key is exported to obtain its public half. A PKCS#8 import failure can retry a non-extractable JWK import. If native signing is unavailable, reading fails rather than retaining a raw signing seed.
Two operations still use the bundled Noble libraries: the protocol's scrypt password derivation, which Web Crypto does not provide, and public-key derivation from a seed, which has no interoperable browser API. Scrypt runs in a dedicated worker that terminates after each operation. This does not change the protocol, password cost or encrypted format.
Remembering a message is off by default, and the local client does not offer it. When a sender chooses Track in Sent after creating a link, IndexedDB stores the message's non-extractable Ed25519 management key through structured cloning, with the optional label the sender typed in clear. That key can check status or cancel the message; it cannot decrypt its content. Non-extractable does not mean protected on disk: Chromium and Firefox write the key bytes into the browser profile, so anyone who can read the profile's files can check the status and cancel the message until the record is removed, one day after the message ends. Safari wraps stored keys with a key from the Keychain. The Track in Sent row says this before the sender saves. Both reads and writes validate the key type, algorithm, permitted usage and non-extractability.
The link secret, the passphrase and every key derived from them stay in memory and are never written to browser storage. An interrupted read can still finish without spending another open: the tab's session storage keeps the server lease, which authorizes nothing without the read key. After a reload the page asks the reader to open the link again and then finishes from the lease. Acknowledgement or a terminal message state removes the lease. Earlier clients kept an encrypted copy of the link in IndexedDB whose key Chromium stored in clear next to it; the client now deletes that database and its session pointers when it starts. Deleted data can stay in free disk blocks until the system overwrites them.
Mutable secret buffers are overwritten after use, including error paths, and references to content keys and fragments are released when no longer needed. When the client derives an Ed25519 public key from a seed with the Noble library, it overwrites the SHA-512 digest and both of its halves afterwards. The private scalar is a JavaScript BigInt, which cannot be overwritten, and the native-signing fallback for WebKit passes the seed to the browser as a JWK string. JavaScript strings, browser-managed keys, garbage collection, disk remnants and device backups cannot be reliably zeroized by a page. Non-extractability blocks exportKey and wrapKey; hostile same-origin JavaScript can still ask the browser to use a key. It does not promise hardware-backed storage, encryption of the browser profile or protection from a compromised device.
References: CryptoKey extraction rules, Web Crypto algorithms, structured cloning, Web Crypto security considerations (working draft).
Anyone holding the link can delete a message or exhaust its passphrase attempts, even when a passphrase protects the content. Someone with both the link and a copy of the server's data, taken before the message expired, can guess a weak passphrase offline. A passphrase you choose needs at least 15 characters; the clients offer a generated one by default. Send it through a different channel than the link.
The link also carries a hash of the encrypted message. The reader checks it before decrypting, so a server cannot hand a later reader other content, and every reader loads the same page, /r, which names no message.
Expiry and open limits control access to the server's copy. Expiry is also cryptographic: each message needs a key share that only the epoch key of its expiry hour produces, and the server erases that key by the end of the hour after the message expires. From then on the server cannot open the message, and neither can a copy of its data taken without the seed file, even together with the link. A disk image or backup that holds the seed and was taken while the message lived still opens it later with the link, so the seed belongs on a tmpfs or outside every image and backup (protocol §5.6). None of this can erase a recipient's screenshot, saved file, clipboard, backup, or memory. Encryption also cannot protect a compromised sender or recipient device.
A browser that opens a link records the whole address, key included, before the page can remove it: in its history and history sync, in session restore and tab sync, in its favicon store and, in Chromium, in the URL-keyed metrics it uploads to Google for users who allow that. Anyone with that browser profile or synced account then holds a working link until the message's last open or expiry. To avoid this, open the link with the local client (nylzo open), which reads it from a hidden prompt, or protect the message with a passphrase. When a message still has opens left after it is shown, the read page says that a clicked link stays in this browser and offers to delete the remaining opens.
Passphrase fields carry autocomplete="one-time-code", which stops Chrome's automatic offer to save them; Chrome still lets a user save one by hand from its key icon. The page empties the field before it sends a request, and Firefox's login detection skips empty fields. Third-party managers are asked to skip the fields with their own attributes. Safari's handling is not publicly documented and was not tested. Do not save a message passphrase in a password manager: next to a link that the browser history already holds, it gives both factors to whoever gets into that account.
Fields for secrets and the revealed message ask the browser not to spell-check, autocorrect, capitalize, translate or offer writing suggestions. Chrome's "Help me write" menu item ignores these attributes in a text area, and no web attribute switches a phone keyboard into its incognito mode, so use a private window for sensitive text on a phone.
Copying puts the link or the message on the system clipboard. Windows clipboard history and cloud clipboard and Apple's Universal Clipboard can keep or sync it, and no web API lets a page keep an item out of them. Where the system offers a share sheet, the sender can hand the link straight to an app without the clipboard. After copying, the page offers to clear the clipboard; that empties the current clipboard but not copies already in clipboard history.
Revealed text shows bidirectional controls and invisible characters, such as U+202E or a zero-width space, as visible codes, because they can make the text on screen differ from the text a copy contains. Copying such a text needs a second confirmation.
When a message ends, the server overwrites the 4 KiB block at the start of its blob file where it lies, syncs it and only then deletes the file. That block holds the salt of the key that encrypts the stored object, and no other copy of the salt exists, so a disk image taken afterwards opens nothing, even together with the link: neither the content nor a passphrase guess, because the verifier mac also covers the salt. The database rewrites older row versions in place, and after every deletion the server overwrites its write-ahead log with zero pages. This needs a file system that overwrites in place, so the server refuses to start on anything other than ext4, XFS or tmpfs on Linux. Layers below the file system, such as SSD block remapping or a provider's snapshots, can still keep an old block; an encrypted volume keeps those copies unreadable. A copy of the server taken while a message was live opens it with its link as long as the copy holds the seed file, even after the message expires; without the seed it stops opening at the end of the hour after the expiry. The protocol lists what a stolen server holds.
The server observes padded content sizes and request timing. Some retained times are rounded to minutes. Logs and a low-traffic instance can still link a sender's requests to a reader's by their timing. Encryption hides the content but leaves the traffic visible.
An attachment is gzip-compressed on the sender's device before encryption only when the sender asks for it with nylzo create --compress. The web client never compresses, and the server cannot make a client compress. Text and other messages are excluded from each file's compression context. The visible padded size then reflects compressed content; padding does not remove all length-based inference. Do not combine attacker-controlled bytes with secrets in a file if the attacker can repeatedly observe its compressed size. Readers authenticate before decompressing and enforce the original file-size limit. Older CLI versions must be updated to read compressed attachments. See the protocol.
Inspect an instance's /transparency page for its operator, limits, storage and logging policy, web-client hashes, and client/server build identities. These are the operator's declarations. A hostile operator can falsify them.
The deployment profiles accept only TLS 1.3 with the hybrid post-quantum key exchange X25519MLKEM768, so traffic recorded today cannot be decrypted later with a quantum computer that breaks X25519 alone. Every browser in web/.browserslistrc uses it by default, as do the CLI and Node 26. Older clients cannot connect at all, so they get no page that tells them why. That includes Safari and iOS before 26, and with it every iPhone that cannot install iOS 26 (the XS, XR and older). It also includes Firefox ESR 128, programs built on OpenSSL older than 3.5 such as curl on Ubuntu 24.04 and Debian 12, and many link-preview bots and third-party uptime monitors. Test a monitor before you rely on it. HTTP/3 0-RTT is off, because early data can be replayed and is protected only by the resumption secret. Caddy sets the client address itself and drops client-sent forwarding headers.
TLS protects the connection, not the server: whoever holds the instance's certificate key or controls the server sees what that server sees. Certificates live 160 hours on the Hetzner profile, CAA restricts issuance to the instance's own Let's Encrypt account, and a monitor watches Certificate Transparency for any other certificate. See Hetzner Flatcar.
Verify a release against the canonical repository, exact tag, and release workflow. Version strings and server JSON identify a build; they are not cryptographic proof. A signed checksum manifest binds the downloaded files to the publishing workflow. Provenance identifies their source and build workflow. An independent rebuild checks whether the same source produces the published bytes.
Report vulnerabilities through private reporting. Report abusive content to the operator contact on the affected instance's /transparency page, if it lists one.
Use Nylzo
Run an instance
Implement
Contribute
Maintain
Brand