The technical details, for developers and security reviewers. Everything here describes the code as it runs today. For the plain-language version, see Security.

Questions or a problem you’ve found? Email support@securefyle.com.

In short

Your browser encrypts document files, their names and numbers, search text, your tax ID and restricted details before they’re sent. The keys are made in your browser and reach our server only in encrypted form. Our server stores ciphertext and the metadata it needs for reminders and the calendar, and it can’t decrypt the rest.

Building blocks

All encryption uses the browser’s built-in WebCrypto. The only other library is hash-wasm, for Argon2id. The same code runs in the web app, the browser extension and our tests.

Used forAlgorithm and parameters
Password stretchingArgon2id, 64 MiB memory, 3 iterations, parallelism 4, 32-byte output, 16-byte random salt per person. The password is NFKC-normalised first. Parameters are stored per person, so they can be raised later.
Splitting into keysHKDF-SHA256 with info securefyle auth v1 and securefyle master v1.
Symmetric encryptionAES-256-GCM, a random 12-byte IV per message, 16-byte tag, with additional authenticated data (AAD) that names where the value belongs.
Key pairsECDH on P-256.
Encrypting to a public keyA new ephemeral P-256 key pair each time, ECDH, then HKDF-SHA256 (salt: the ephemeral public key, info: securefyle seal v1|<context>) into an AES-256-GCM key.
Random valuescrypto.getRandomValues and WebCrypto key generation.

Key hierarchy

Each key protects the keys or data below it. Our server holds only encrypted copies, plus public keys.

KeyWhat it is and doesWhat the server holds
Auth keyDerived from your password. Sent to sign in instead of your password.A bcrypt hash of it.
Master keyDerived from your password alongside the auth key. Never leaves your browser. Unlocks your private key.Nothing.
Your key pairECDH P-256, made in your browser at sign-up. Workspace keys are encrypted to its public key.The public key, and the private key encrypted with your master key (context user:<id>:private-key).
Recovery key128 random bits plus a 12-bit checksum, shown once as 28 characters in 7 groups. The checksum catches typos only. HKDF-SHA256 turns it into an AES-256-GCM key that also encrypts your private key.A second encrypted copy of your private key (context user:<id>:recovery). Never the recovery key.
Workspace documents keyAES-256-GCM, one per workspace. Encrypts file keys, document names, who a document is for, reference numbers, file names and search text.One copy per person and per device that has access, each encrypted to their public key (context grant:<workspace>:DOCUMENTS:<version>).
Workspace restricted keyAES-256-GCM, one per workspace. Encrypts your tax ID and restricted custom details.The same, with kind RESTRICTED. A device gets it only if you gave it restricted access.
Workspace inbox key pairECDH P-256. Lets people outside the workspace, and our server for email-in, encrypt files to the workspace without being able to decrypt them.The public key, and the private key encrypted with the documents key (context inbox:<workspace>:<version>).
File keysAES-256-GCM, a new one for every file and every version of it.The key encrypted with the documents key (context file:<document>:<version>).
Share keys256 random bits, one per share link. Encrypts the shared files’ keys and their names.Nothing. The key is in the link’s fragment, after #k=.

While you’re signed in, your unlocked private key is kept in IndexedDB as a non-extractable CryptoKey, so page scripts can use it but can’t read its bytes. Signing out clears it. The browser extension can’t keep a CryptoKey across restarts, so it stores its own device private key in the extension’s local storage and holds unlocked workspace keys in memory only. Disconnecting the extension deletes both.

Formats

Every encrypted value carries a version prefix, so the formats can change later. The AAD binds each value to where it belongs: a value copied into another field or document fails to decrypt.

FormatLayout (base64url)AAD
Fieldzk1.<iv>.<ciphertext>field|<context>, for example doc:<id>:name, company:<id>:taxId or field:<id>:value
Wrapped keyzw1.<iv>.<ciphertext>wrap|<context>, for example file:<document>:<version>
Sealed to a public keyzs1.<ephemeral public key>.<iv>.<ciphertext>The HKDF info, securefyle seal v1|<context>

Files

  • Header

    4 bytes SFZ1, then the chunk size as a 32-bit big-endian number (4 MiB).

  • Chunks

    The file is split into 4 MiB chunks. Each is stored as its 12-byte IV followed by its ciphertext and 16-byte tag.

  • Chunk AAD

    <fileId>|<chunk index>|<1 if last, else 0>, with fileId = <document>:<version>. Chunks can’t be dropped, reordered, cut short or moved into another file without decryption failing.

  • Size

    The encrypted size is 8 + 28 per chunk + the original size. The browser declares it before upload and the server checks the stored object matches.

  • Names

    Stored objects are named by workspace and document ID, never by file name, and downloads are served as document.bin.

What the server stores

Some details stay readable on purpose, because server features need them. The server also refuses readable values where it expects ciphertext.

Readable to our serverWhy
Your email, your name, and your workspace’s name and web addressSign-in, emails and links.
Each document’s type, category, issue and expiry dates, status, size, file type and version numberRenewal reminders, the calendar feed, supplier tracking, plan limits and the dashboard. Emails and the calendar name a document by its type, such as “Passport”.
Basic company details: name, address, phone, website, NAICS code and bondingConnected browsers with basic access fill these into forms.
The activity log, public keys, and the encrypted values themselvesYour record of access, and what your browsers need to unlock things.

Never readable to our server

Your password, master key, private key and recovery key. Workspace keys, file keys and share keys. Document files and every earlier version. Document names, who a document is for, reference numbers, file names and search text. Your tax ID and restricted custom details. The one exception is an emailed file at the moment it arrives (see email-in below).

Team access

Giving someone access means encrypting the workspace keys to their public key. The risk is a server that hands out a public key of its own, so every grant is checked by a person.

  • The safety code

    A person waiting for access sees a 30-digit safety code: six groups of five digits taken from the SHA-256 hash of their public key. Whoever gives them access types the code in, after hearing it in person, by phone or in a chat.

  • No code, no keys

    The browser checks the typed code against the public key the server sent, and seals the keys only if they match.

  • Anyone with access can give it

    Any member who holds the keys can grant them, not only owners and admins, so a workspace isn’t locked out if its only admin loses access.

  • Losing your password

    With your recovery key, you set a new password and keep everything. Without it, you get a new key pair, and a teammate gives you access again with your new safety code. In a one-person workspace, the documents can’t be recovered, and the reset screen says so first.

Device pairing

A browser extension gets its own key pair and only the workspace keys its permissions allow.

  • A code with a part the server never sees

    The dashboard shows the server’s pairing code with 4 more characters made in your browser, like VK-7KQ2-M9XD-3FJ8. The extension sends only the first three groups to the server.

  • The pairing proof

    The extension makes its key pair and sends its public key with an HMAC-SHA256 of that key, keyed by the SHA-256 of the full code. Your dashboard checks this proof against the code it showed before sealing any keys to the device.

  • Limit

    The browser-only part is short so it’s easy to type. It makes swapping in another key much harder for the server, but it is a weaker check than the 30-digit safety code used for people.

  • Only the keys it needs

    A device gets the restricted key only with profile:read:restricted, and the documents key only with documents:download:explicit. API keys for integrations can’t hold either.

Removing people and devices

Removing someone deletes their copies of the keys. Then the remover’s browser changes the keys, because our server can’t.

  • What rotation does

    The browser makes new documents and restricted keys and a new inbox key pair. It re-encrypts every file key, every encrypted name and field, and grants the new keys to everyone who still has access. The server accepts this only as one complete change.

  • When it runs

    Right after an owner or admin removes a member, or revokes a device that held keys. If it fails, the dashboard says so and offers to try again.

  • The limit

    Files aren’t re-encrypted, only their keys. A removed person can’t open anything added or changed afterwards. Anything they could open before, including any file key or file they kept, may still be readable to them.

Share links, requests and email-in

People outside the workspace can send and receive documents without an account or our server reading them.

  • Share links

    Your browser makes a share key, encrypts each shared file’s key and name with it (contexts share:<share>:<document> and …:name), and puts the key in the link after #k=. Browsers don’t send the part after # to servers. An optional passcode is checked by the server (stored as a bcrypt hash), as a second gate.

  • Document requests

    The supplier’s browser encrypts the file with a new file key and seals that key, and the file name, to the workspace inbox public key. The next time a member opens the workspace, their browser re-encrypts the file key under the documents key.

  • Email-in is the exception

    Email isn’t end-to-end encrypted, so our server receives an emailed attachment readable. It encrypts the file at once to the workspace inbox public key, stores only the encrypted copy and discards the readable one. AI never reads emailed files.

AI on request

AI is optional, on paid plans, off by default, and runs only on a file you choose.

  • You press “Let AI read this”

    Your browser decrypts that one file and sends it to our suggestion endpoint, which forwards it through our AI gateway (Penstoke) to the AI provider. Our server keeps it in memory only and stores nothing.

  • What comes back

    Suggested details for the form, and the document’s text for search. Your browser encrypts the text with the documents key before it’s saved.

  • Search

    Your browser downloads the encrypted search texts, decrypts them and searches them locally. There is no server-side search.

  • What this means

    For that one request, the file is readable to our server and the AI provider. Nothing else is ever sent to AI.

Threat model

What this design is meant to stop, and what it can’t.

Protects against

  • A breach of our servers or storage

    An attacker gets ciphertext, public keys and the metadata listed above.

  • A rogue insider

    Nobody at Securefyle has the keys, so nobody here can read your files or restricted details.

  • A legal demand for readable data

    We can hand over only what we hold, and we can’t decrypt it.

Doesn’t protect against

  • A compromised device

    Malware on your computer or phone can read what you read.

  • A tampered web app

    The web app is served by our server. If that server were compromised, it could serve code that captures your password or keys. This is true of every web-based encrypted service.

  • Metadata we can see

    Document type, category, dates, sizes, file types, basic company details and the activity log are readable to us.

  • Copies people made

    Anyone you gave access, or sent a share link, may have saved what they opened.

Not done yet

So you can weigh this page accordingly.

  • No independent audit

    No outside firm has reviewed this design or code yet. We plan one.

  • Source not yet published

    The encryption code isn’t public yet. We plan to publish it so anyone can check it against this page.

  • Off-site backups

    Backups kept with a separate provider are being set up.

See what’s live and what’s next on the roadmap.