365 Networking · Vault

Every file in parts, every part its own key.

365Vault cuts a file into three to five parts and encrypts each part with its own random 256-bit key, using one of three authenticated ciphers so that neighbouring parts never share one. The parts are written to three different database engines, and the keys live apart from them, in a record sealed under a master key.

Kept apart until the moment its owner asks for it.

Built The store is written and was tested on earlier servers; the databases it wrote to were on servers that are no longer in service, so it is not running today.

Drawn by ImageForge, our own image engine

Storing a file Built

Cut, sealed, and stored apart

What happens to a file between the upload and the moment it rests, step by step, as the code does it.

  1. Read into memory

    The upload is read into the vault's memory.

  2. Cut into parts

    Three parts for files and documents; four for legal papers, secrets and wallet files; five for SSH keys.

  3. Sealed part by part

    Each part gets a fresh random 256-bit key and one of AES-256-GCM, ChaCha20-Poly1305 or XSalsa20-Poly1305. Neighbouring parts never share a cipher, and every part carries its own authentication tag.

  4. The key record

    The cipher, nonce and key of every part go into one record, sealed with AES-256-GCM under the master key and kept apart from the parts.

  5. Stored apart

    The parts are written in turn to PostgreSQL, MariaDB and SQLite, three different database engines.

Storing a file in 365Vault as built: the file is read into memory and cut into parts; each part is sealed with its own key and a cipher different from its neighbour's, AES-256-GCM, ChaCha20-Poly1305 or XSalsa20-Poly1305; the parts are written to PostgreSQL, MariaDB and SQLite; the key of every part goes into a key record sealed under the master key and kept in the vault database; every part is needed to rebuild the file Your file read into memory Cut into parts three to five, by what it is Part 1 own key AES-256-GCM Part 2 own key ChaCha20 Part 3 own key XSalsa20 neighbours never share a cipher PostgreSQL MariaDB SQLite THE KEYS, KEPT APART Key record each part's key and cipher Sealed AES-256-GCM, master key every part is needed; no replica
An example of three parts. Each cipher is picked at random, never the same as its neighbour's; a fourth and fifth part continue the rotation of engines.

Reading it back

Joined only in memory, only for its owner

The way back is the way in, reversed, and every step can refuse.

  1. The key record opens

    The master key unseals the record that holds each part's key and cipher.

  2. Each part is fetched

    Every part is read back from the engine that holds it.

  3. Each part is checked

    A part whose authentication tag does not verify is refused, and the file with it.

  4. Joined and streamed

    The parts are decrypted, joined in memory and streamed to their owner.

The key split Built

Four shares, any three

A key can be split into four shares so that any three of them rebuild it and any two reveal nothing about it: Shamir's scheme, byte by byte, over the field GF(2^8).

Implemented and tested in code: every set of three shares out of four rebuilt the key. It has not been deployed as a distributed key.

The key split: a 256-bit key is split byte by byte with a random polynomial of degree two over GF(2^8) into four shares; any three shares rebuild the key and any two reveal nothing A 256-bit key 32 bytes Split, byte by byte degree-2 polynomial, GF(2^8) Share 1 Share 2 Share 3 Share 4 Any three: the key any two: nothing
Tested in code; not deployed as a distributed key.

Said plainly

What 365Vault is not

A vault is only as honest as its description. These are the limits of the design as built.

  • Not zero-knowledge

    Encryption happens on the vault's server, and the master key opens every key record. Whoever operates the vault holds the key to what it stores.

  • No copies

    Every part is needed to rebuild a file. There is no replica and no parity: lose one engine's part, and that file is gone.

365 Networking

Separate engines, one house