Repository navigation
Security assessment
This page assesses protocol v3 as the protocol specifies it, the Go server and CLI, the verified local clients nylzo web and nylzo open, the browser client, storage, the Compose and Hetzner/Flatcar deployment profiles, and the release controls. It is the project's own assessment, based on source review, the protocol's requirements and the automated tests it names. No independent audit or penetration test has taken place.
Review this page before a release that changes cryptography, capabilities, the message lifecycle, external interfaces, storage, trusted proxies, dependencies or publishing authority, and update the affected threats, controls, tests and remaining risks in the same pull request. A new primitive or trust boundary needs a fresh assessment, not a statement that the existing tests still pass.
The assets are plaintext, the link secret S, passphrases, the read and manage signing keys, the server's pepper, the epoch seed and the expiry shares it issues, the OPAQUE registrations, live-message state, release identities, and the operator's passkeys and admin sessions.
Confidentiality covers stored data and protocol traffic. A copy of the server opens nothing without the link, and after a message's deadline it opens nothing even with the link, because the expiry share that the content key needs is gone. Confidentiality does not cover a compromised sender or recipient device, a hostile web client served to a website visitor, or a recipient who keeps the plaintext.
Open counts, passphrase attempts, leases and every rule that applies before the deadline depend on an honest running server and its state. An operator can refuse service, delete data, serve modified code to website visitors or restore an older database, and restoring an older seed file brings back shares of messages that have expired since. The security model describes these limits for users.
| Actor or subsystem | Actions and authority | Boundary |
|---|---|---|
| Sender browser or CLI | Creates keys, registers the message with OPAQUE, encrypts content, uploads an envelope, shares the read link, keeps the cancel and status capability | Plaintext, S, the passphrase and the private keys stay on the client |
| Recipient browser or CLI | Uses the read capability to run a handshake, claim, download, decrypt, acknowledge or burn | Holding the link grants the protocol capabilities; a passphrase also restricts reading and burning, and every attempt costs a handshake the server counts |
| Anonymous network client | Requests public metadata, ids and challenges, creates messages within the limits, sends arbitrary API input | All input is untrusted; size limits, rate limits and authorization apply before any state changes |
| Server and its store | Enforces signatures, leases, expiry, attempt limits, open counts, deletion and rate limits; derives the OPAQUE server keys from the pepper; issues expiry shares from the epoch seed; stores ciphertext and operational state | State changes are atomic; server data alone opens no message |
| Operator's admin session | Enrolls a passkey with a one-time link printed on the server host, signs in, reads aggregate counts, server load and the clients refused in the last hour, signs out | A passkey of the instance's origin opens a session for one in-memory Ed25519 key; every request is signed over a single-use challenge; no route reads or changes a message |
| TLS proxy and hosting operator | Terminates TLS, forwards client addresses, serves the web client and the instance, controls host data and availability | Trusted to serve the intended browser code, to supply correct forwarding metadata and to record no request headers; an active proxy during creation learns the expiry share and can attack the registration |
| Link holder or malicious recipient | Can keep the plaintext, delete a message (one with a passphrase only with the passphrase), use up the attempts, or pass the link on | Holding the link is the authorization; there is no sender identity and no non-repudiation |
| Attacker with a copy of the server | Inspects SQLite and its WAL, blobs, logs and configuration, possibly with the pepper and the epoch seed | Without the link the copy opens nothing; see the threat table for what the link adds before and after the deadline |
| Dependency publisher or compromised registry | Supplies code and tools that builds consume | Locked versions, integrity checks, restricted build scripts, review and scanning reduce the risk |
| Maintainer and release automation | Reviews code and bounded dependency updates, signs tags, publishes artifacts and provenance | Publishing authority is separate from untrusted test runs; signatures identify provenance, not correctness |
The HTTP API lists methods, paths, authorization and data for create, instance, challenge, metadata, handshake, claim, blob, ack, burn, cancel and status, the visit signal (§6.7) and the operator's admin area (§6.8). Its other sections define envelopes, signatures, leases, errors, transport limits and storage rules. The CLI guide covers command-line input, output, exit codes and server selection.
The HTTP surface also has /healthz, the browser pages including the operator's /admin, hashed assets, the transparency and client manifests and crawler metadata. routes.go registers them, and protocol §9 and the operations guide document them. A URL fragment carries the capabilities and never reaches the server as part of a request. Instance metadata and transparency information are public; nobody checks the operator's declarations.
The local clients serve the web client built into the nylzo binary from a random origin under localhost for each session, and relay only the API and transparency.json to the instance (§14.1). nylzo open hands a link over through a single-use token (§14.2).
On disk the server uses the data directory: nylzo.db with its WAL, admin.db with a rollback journal, encrypted blobs and the upload pool, the pepper files, and the epoch seed, which both deployment profiles keep on tmpfs. The CLI reads and writes only the files its arguments name, and nylzo open writes a handoff file that only its user can read. Operations and self-hosting describe the settings and the trusted proxies. A release consists of immutable GitHub assets, signed checksum manifests, provenance attestations, SBOMs and digest-addressed GHCR images.
| Threat | Controls and evidence | Remaining risk |
|---|---|---|
| Plaintext or capabilities leak through creation or a stolen store | Encryption on the client; shared protocol vectors; TestCreateCarriesNoSecrets inspects the traffic, and TestStolenServerRevealsNothing searches a copy of the data directory, the epoch seed and the log for every secret, raw, base64url and hex |
A compromised device, a hostile web client or the link changes what the attacker can do |
| A copy of the server opens a message after its deadline | The content key needs the expiry share E, an HMAC of the message's minute key; the seed moves forward every minute and is overwritten in place, and E is never stored (§5.6); both profiles keep the seed on tmpfs, and the server pins its pages in memory; TestContentKeysNeedTheShare, TestShareGoesAtItsDeadline, TestAPassedMinuteLeavesNoSeed, TestACopyTakenWhileLiveStaysClosedOnceItsDeadlineHasPassed, TestASeedCopiedEarlierOpensNoMessageIssuedInALaterHour, TestATmpfsThatSwapCanReachIsRefused, TestPinLocksTheSeedPagesUntilClose
|
A copy that holds the seed and was taken before the deadline opens, with the link, every message live at that moment and every id issued later in that hour; restoring an older seed file brings back expired shares; SSD remapping and provider snapshots can keep old blocks |
| A clock step changes expiry | The ratchet never moves back and issues no id while the wall clock is more than a minute behind it; a clock more than 5 minutes behind replaces the generation, and its ids end as lost; on Hetzner Nylzo starts only after the clock is synchronised; TestABackwardClockStepIssuesNothing, TestAGenerationStartedByAClockAheadNeverIssuesOnceTheClockIsBack, TestAnInstanceBehindTheRatchetIssuesNoID, TestProcessesThatShareTheSeedIssueFromOneGenerationAfterAReplacement
|
Expiry follows the clock: after a forward jump with the server running, the generation in use started at most 6 minutes early; losing the seed, for example on reboot, ends every live message as lost |
| Ciphertext or header modification, or request substitution | Key commitment checked before AES-GCM; the object hash in the link checked first; a server tag over the salt and every encrypted byte, checked before a claim or download spends anything; a salt tag checked before a handshake counts; signed request transcripts over single-use challenges; TestTamperingFailsIntegrity, TestCommitmentRejectsAnotherKeyBeforeDecrypting, TestReaderRejectsAnObjectTheLinkDoesNotPin, TestChangedBlobSpendsNoOpenOrDownload, TestTheSaltTagFollowsTheSpecAndRefusesAnotherSalt, TestRequestSignatureBindsEveryField, TestSignatureBindsTheRequest
|
Whoever can write the data directory can deny a message or restore opens; a handshake checks only the salt tag, so changed object bytes still let it count an attempt; there is no sender identity |
| Replay after rejection or restart | Single-use challenges held in memory and the replay rules; TestSignedRequestsAreSingleUse, TestRejectedRequestsCannotBeReplayed, TestReplayAfterRestartIsRefused
|
Restoring old storage restores old state; backups are not tamper-proof counters |
| Concurrent reads exceed the open limit or break lease and deletion state | Transactional lifecycle and lease rules; TestConcurrentClaimsHTTP, TestFlowCreateMetadataClaimBlobAck and the lease expiry tests |
A recipient can copy decrypted data; availability stays the operator's responsibility |
| Online passphrase guessing, or locking out another reader | Every handshake counts until a matching KE3 takes the attempt back; the first 5 attempts are free, the wait then doubles up to an hour, and 100 failures lock the message; clients refuse weak passphrases and suggest five words (six in Chinese); TestPassphrasePolicyHTTP, TestKE3IsBoundToItsHandshake, TestARefusedHandshakeCountsNoAttempt, and PassphraseBackoff and LifetimeCap in the store suite |
Any link holder can use up the attempts and nothing resets them; the time between handshake and claim shows whether a message has a passphrase |
| Offline passphrase guessing from recorded traffic or a stolen copy | OPAQUE (RFC 9807): the passphrase enters only the blinded OPRF input, and the OPRF key comes from the pepper and `id | |
| Recorded traffic is decrypted later, for example by a quantum computer | Both profiles accept only TLS 1.3 with X25519MLKEM768, and CI checks the Compose stack; the expiry share travels in HPKE with X-Wing (ML-KEM-768 with X25519) to a fresh client key for every request; TestCaddyfilesProtectTheEdge, TestShareVectors, TestRefusedShareKeys, TestRefusedShareKeysSpendNothing
|
Ed25519 signatures and OPAQUE stay classical; X-Wing is an IETF draft; on Hetzner the published crawler ranges may use X25519 alone and reach only public documents (TestCrawlersReachOnlyPublicDocumentsOverClassicalTLS); the CLI uses the Go TLS defaults |
| Lengths reveal content | Every object is padded to 64 KiB steps, a text and a file alike, and a blob on disk to its Padmé size; only nylzo create --compress compresses, and then the length shows only a halving class; TestTextAndFilePadToTheSameLength, TestPaddedSizeFollowsPadme, TestAttachmentIsCompressedOnlyOnRequest, TestCompressedLengthShowsOnlyAHalvingClass
|
The size in 64 KiB steps stays visible; a compressed length depends on the content, which permits probing (§3.2); on a quiet instance request times can link a sender to a reader |
| Message enumeration, storage faults or timing differences show existence | One 404 for an unknown id, a wrong key and a failed signature, one 409 for a live and an ended message; every lookup does the same work against a dummy row and key; a refusal answers no earlier than 5 ms; TestUniformNotFoundAndConflict, TestAuthorizeDoesTheSameWorkForKeysThatFailTheKeyCheck, TestStorageFaultKeepsUniformNotFound, TestARefusalTakesTheFloorAndSpendsTheReadBudget, TestLookupDoesTheSameWorkForEveryLocator
|
Network conditions and outside observation need a review of each deployment; with very little traffic the hourly counts can match one message |
| Creation floods, slow connections or forged forwarding headers exhaust resources | Body, header and connection limits, source and global caps, proof of work capped at difficulty 7, a disk reserve, exact trusted proxies; TestCreateRateLimitAndGlobalCap, TestForwardedForOnlyFromTrustedProxy, TestSlowConnectionsAndLyingContentLength, TestCaddyfilesBoundSlowAndLargeRequests
|
Distributed attacks and provider outages remain possible; operators must set the caps for their real disk capacity |
| Modified browser code or redirected CLI traffic exposes secrets | The verified clients (the CLI, nylzo web and nylzo open) take no code from the instance and are tested against a hostile one; the website has a static hash-based CSP, Trusted Types, SRI on every script and stylesheet, and a key derivation worker checked against the import map; releases are signed, logged and reproducible; the CLI accepts only HTTPS and loopback origins and refuses redirects; on nylzo.com nylzo verify-client compares the served client with the release every 30 minutes, and an hourly browser check compares the assets it receives with the signed checksums; TestRelayCarriesOnlyTheAPIAsANativeClient, TestEachSessionHasItsOwnOriginAndAnswersOnlyIt, TestSecurityHeadersAndStaticPolicy, TestPagePolicyAdmitsOnlyTheInlineCodeOfThePage, TestRedirectsAreRefused, and the hostile-instance and resource-integrity specs in web/e2e
|
A server under someone else's control can send a modified page to one chosen website visitor, and the checks find only a change that does not single out its victim; no shipping browser verifies a site's code; revisit when a browser enforces WAICT by default or WEBCAT leaves alpha; Connection-Allowlist works only in Chromium |
| Another program reads secrets from a CLI process | Every command that can hold a secret hardens its process before it reads anything: no core files, refusal of a traced process, PT_DENY_ATTACH on macOS, a DACL on Windows, locked memory or a check that swap is encrypted; a link in the arguments is refused; TestEveryCommandProtectsItsProcessFirst, TestProtectHidesTheProcessFromTheSameUser, TestAProcessUnderATracerIsRefused, TestSecretsNeverTravelInArguments, TestProcessListShowsNoSecretSmoke
|
Root or an administrator can read the memory, and hibernation writes it to disk; a program of the same user can read the browser's memory and profile |
| CI input injection or stolen publishing credentials replace a release | Quoted and validated inputs, SHA-pinned actions, separate permissions, protected tags and environments, keyless signatures, immutable assets, policy checks | A compromise of the owner account can change repository settings; a trusted writer stays an administrative risk |
| Someone steals, guesses or reuses an admin enrollment link | The link exists only in the output of nylzo admin-enroll on the server host; the token is 192 random bits in the URL fragment, stored only as SHA-256, valid 15 minutes, used up by the one enrollment it allows and replaced by a newer link; at most 8 passkeys; a wrong or used token answers 401 and, once a passkey exists, lists the sender among the refused clients; TestEnrollmentLinkAddsOnePasskeyOnce
|
A link read from the terminal or its scrollback within 15 minutes enrolls the reader's passkey; nylzo admin-passkeys shows it and nylzo admin-reset removes it |
| A look-alike site phishes the operator's sign-in | Passkeys only, bound to the instance's origin and relying party id, with user verification required; the server checks origin, relying party hash, flags and signature counter with the Go standard library; TestRegistrationMatchesW3CVectorAndStillNeedsUserVerification, TestAssertionMatchesW3CVectorAndStillNeedsUserVerification, TestRegistrationRefusesEveryBrokenRule, TestAssertionRefusesEveryBrokenRule
|
A compromised operator device or authenticator signs in as the operator |
| A stolen, replayed or cross-site admin request acts for the operator | No cookie or stored credential; the session is a non-extractable Ed25519 key in page memory; every request is signed over method, path with query and a single-use challenge; the cross-origin guard covers /api/; a session ends after 15 minutes idle, 12 hours, sign-out, restart or nylzo admin-reset; TestAdminAnswersOnlyToASessionAPasskeyOpened, TestAdminResetEndsOpenSessions
|
Script running in the admin page while the session lives can use the key |
| Brute force against enrollment or sign-in | 192-bit tokens; a ceremony challenge works once and for 5 minutes, and a sign-in challenge is held nowhere, so a flood of challenge requests cannot push the operator's out; every failure answers 401, counts as a held event and, once a passkey exists, lists the client for an hour; the token buckets of protocol §8 apply | Guessing 192 bits is out of reach; a distributed attacker can push older entries off the refused list, which holds 256 |
| Forged visit signals inflate or distort the counts | Signals change only counts, answer 200 {} whatever happens and pass the token buckets; only whoever served a page reports it, and the report route answers only the nylzo frontend (NYLZO_EDGE_REPORTS); robots, script clients, navigator.webdriver, more than 60 views an hour and more than 64 visitors from one address or one IPv6 /64 count apart from people; message pages are never counted; TestVisitSignalsForMessagePagesAreDropped, TestDocumentReportsComeOnlyFromWhoeverServedThePage
|
Anyone can still inflate the counts, so the operator should read them as an estimate |
| Visit counting or the refused list leaks visitor addresses | A visitor is an 8-byte keyed hash under a key redrawn each UTC day and kept in memory; admin.db holds counts only, written after their hour has ended, with visitors and countries per UTC day, no WAL and a journal overwritten after every write; refused clients stay in memory for an hour and are never logged or written; nothing is kept while no passkey exists; TestVisitCountsKeepNoAddress, TestEnrollmentLinkAddsOnePasskeyOnce, TestCountsReachTheDiskWhenTheirPeriodEnds, TestRemovedRowsLeaveNoCopyBehind
|
Whoever controls the running process sees the addresses anyway; on a day with one visitor and one message the day's country count points at the sender's country |
| Script injection in the admin page | The same hash-based CSP, Trusted Types and SRI as every page; its Connection-Allowlist adds only https://db-ip.com/, the attribution link of the country table; WebAuthn is allowed only on /admin
|
An injection would act inside a live session and see what the operator sees |
| A compromised admin session or passkey | No admin route reads, opens or ends a message; the overview and live answers carry aggregates, server load and the refused clients of the last hour | The attacker learns traffic levels and refused address ranges |
| The frontend's visit reports slow down or break pages | Reports wait in a queue of 256 and go through the route's own proxy after the page is served; a full queue drops them, a backend that counts nothing, has no report address or breaks off its answer pauses them for a minute, a panic of the proxy outside a request is caught, and nothing a client sends shapes a report beyond its address and a User-Agent of at most 512 bytes; TestFrontendSurvivesAReportTheBackendBreaksOff, TestAClientCannotStopTheReports, TestFrontendReportsCountedPagesWithoutWaitingForTheBackend, TestFrontendIsIndependentOfTheBackend
|
Dropped reports undercount visits under load |
| A dependency gains a vulnerability or contains malicious code | Locked Go and npm dependencies, checksum verification, restricted install scripts, dependency review, vulnerability scans and release artifact scans | Scanners cannot prove the absence of unknown vulnerabilities or malicious behavior |
The Hetzner/Flatcar profile is the hardened production profile that nylzo.com runs. It adds infrastructure state, provider tokens, an image factory, OS updates and a privileged host updater. Tokens stay off the server, plans and state are encrypted, images are signature-verified, and application updates need a signed release identity and provenance. The epoch seed stays on tmpfs, the host refuses swap, and Nylzo starts only after the clock is synchronised. A failed state migration stops the deployment instead of restoring spent message state. Hetzner and the administrator accounts stay trusted; there is no attested boot and no protection from a hostile host.
The largest accepted limit is the delivery of browser code: TLS and encryption in the browser do not protect a website visitor from the operator who serves the page. The verified clients are the alternative for anyone who needs code they can check, and a message is safe from such a server only when the sender and the reader both use one. After that, the priority is keeping the lifecycle atomic and confidential under faults, which the protocol tests, race runs, timing tests, fuzz tests and cross-language vectors exercise.
Supply-chain controls establish where an artifact comes from and stop known findings; they are not an independent cryptographic review. The project has one human maintainer and a documented review exception, so it does not meet the Baseline Level 3 requirement of a second person approving every change to the main branch. A bot approval does not meet it.
Report vulnerabilities through the disclosure policy. Publish the affected and fixed versions and the mitigations, and update this page when a finding changes a trust boundary. Test only with synthetic data on a local instance; nothing here authorizes testing someone else's instance.
Use Nylzo
Run an instance
Implement
Contribute
Maintain
Brand