Skip to content
Repos

TOSV

Markdown 7.3 KB99 lines Opens in site

Directory Raw Download

TOSV vault (0.6.1)

Single-purpose secret vault, built for integration with other products. It is a component, not a product on its own: your product owns users, UI and policy, TOSV owns encrypted storage, grants, caps and the audit trail.

One HTTP/WebDAV binary (tosv, 728KB) plus one SSH/SFTP daemon (tosv-sftp), sharing one data root and one crypt core (vault.inc). Blobs are XChaCha20-Poly1305 secretstream under Argon2id (v1 stays readable, never written). Both network surfaces are post-quantum by default: in-tree TLS 1.3 with X25519MLKEM768 (no external TLS library) and SSH with mlkem768x25519-sha256; classical key exchange is refused unless you opt in. Secret memory is overwritten after use and keys are mlock'd. Plain HTTP is loopback only.

make build                          # vendors libsodium and mlkem-native once, builds both binaries
./tosv --tls-selfsign HOST c.pem k.pem   # Ed25519 cert and key (or bring your own)
TOSV_TLS_CERT=c.pem TOSV_TLS_KEY=k.pem TOSV_BIND=0.0.0.0 ./tosv 8765   # PQ TLS
./tosv 8765                         # loopback plain HTTP (wizard, grants, store, fetch, WebDAV)
./tosv-sftp 2222                    # SSH plus SFTP, PQ-only (gateway keys, in-band grant proof)
./tosv --restore-v2                 # dry run: list v1 blobs to convert (add --apply)
make ci                             # lint plus doc-check plus smoke plus Gate 2 (377 asserts)

Opt-outs for old clients: TOSV_TLS_ALLOW_CLASSICAL=1, TOSV_SFTP_ALLOW_CLASSICAL=1. Full CLI walkthrough and verdict: comparison.

Comparison with other tools

Competitor cells were checked against primary sources on 2026-11-05 (record). TOSV is not the best tool overall: pick Vault or OpenBao for dynamic secrets, age or restic for files and backups. TOSV's claim is the combination: PQ-only by default on both surfaces, one sub-megabyte static binary, hard caps, explicit memory scrubbing, made to be embedded. It has no external security review yet.

Legend: yes, no, partial, n/a, unverified (no primary source found), not assessed. "PQ" means a post-quantum hybrid key exchange.

Property TOSV 0.6.1 Vault / OpenBao age restic rclone crypt gocryptfs Cryptomator Vaultwarden / Bitwarden KeePassXC SOPS OpenSSH sftp
Role blob vault component secrets platform file encryption backup tool encrypted remote wrapper encrypted filesystem encrypted cloud folders password manager password manager secrets in git file transfer
Single binary, no runtime deps yes (728KB, libc only) unverified yes unverified unverified no (needs FUSE) no (Java) no (containers) no (Qt app) CLI yes, KMS backends need network no
Built to be embedded yes partial (API, heavy) yes (Go library) partial partial no no no no partial (Go module) partial
At-rest cipher and KDF XChaCha20-Poly1305, Argon2id AES-256-GCM ChaCha20-Poly1305, scrypt or X25519 AES-256-CTR plus Poly1305-AES, scrypt XSalsa20-Poly1305, scrypt AES-256-GCM (also AES-SIV, XChaCha20), scrypt AES-SIV names, AES-GCM content, scrypt AES-256-CBC plus HMAC, PBKDF2 600k or Argon2id AES, Twofish, ChaCha20, Argon2 AES-256-GCM n/a
PQ transit, HTTP yes, PQ-only by default yes, hybrid by default via Go 1.24+ TLS (Vault docs); OpenBao 2.7 can enforce it n/a partial (inherits Go) partial (inherits Go) n/a n/a unverified n/a n/a n/a
PQ transit, SSH yes, PQ-only by default n/a n/a follows system ssh partial (inherits Go x/crypto) n/a n/a n/a n/a n/a yes, default since 10.0; classical still allowed with a warning
PQ at rest symmetric 256-bit symmetric hybrid PQ recipients since 1.3.0 symmetric symmetric symmetric symmetric symmetric symmetric symmetric n/a
Secret memory handling explicit wipe, mlock for keys mlock on by default, memory inspection out of threat model, zeroing undocumented undocumented unverified unverified zeroing documented, GC limits admitted unverified clients purge keys on lock, server undocumented zeroes own allocations, anti-ptrace, no mlock found undocumented unverified
Duress wipe yes none documented none documented none documented none documented none documented none documented none documented none documented none documented none documented
Per-grant IP, time, append-only yes policies (richer) no no no no no org policies no no partial
Hard caps on rates, sizes, counts yes not assessed not assessed not assessed not assessed not assessed not assessed not assessed not assessed not assessed not assessed
Dynamic secrets, leases, PKI, SSO no yes no no no no no partial no no no
Independent audit no Vault yes (ALMOND 2025, report not fully read); OpenBao none found none found informal 2017 review only none found design audit 2017 Cure53 2017 yes (Cure53 and others, SOC 2; Vaultwarden BSI 2024) yes (2023 audit, ANSSI visa) none found unverified
Maturity new mature mature mature mature mature mature mature mature mature mature

Start here: SPEC (normative), status (full handoff), implementation (guided tour), SFTP contract, SFTP runbook.

Test coverage

Integration (all green, Gate 2: 377 passed, 0 failed):

Surface How Evidence
HTTP store/fetch Gate asserts, curl battery gate2.sh
WebDAV class 1 Gate asserts, rclone drill, PROPFIND 10k, 512MB, kill-9 gate2.sh
SFTP stock client OpenBSD sftp put/get/rename/chmod/ls, forced rekeys byte-identical gate2.sh, App D
SFTP asyncssh put/get plus forced rekeys byte-identical gate2.sh, App D
SFTP raw socket 32-case probe: escapes, proofs, duress, truncations tests/sftp/raw_probe.py
SFTP fuzz libFuzzer plus ASan/UBSan, 354847 runs, 0 findings make fuzz-sftp
SFTP to HTTP sftp-put/http-fetch plus http-store/sftp-get at 5 sizes, byte-compared x-surface legs
SFTP to DAV dav-put/sftp-get plus sftp-put/dav-get at 5 sizes, byte-compared x-surface legs

Load (all 0 errors, 2026-11-02, final code; charts in docs/bench/):

Target Harness Last result
HTTP smoke 10u/60s Locust fetch p50 61ms p95 75ms, DAV p50 7ms p95 10ms, 959 reqs 0 failed
HTTP soak 64u/600s Locust fetch p50 7ms p95 9ms at 67.5/s, DAV p50 7ms p95 9ms, 67952 reqs 0 failed, RSS 36MB
SFTP smoke 10u/60s bench.py put p95 697ms, get p95 36ms, 10.2 MiB/s, 0 errors
SFTP soak 40u/600s bench.py put p95 1174ms, get p95 4998ms, 75.2 MiB/s, 0 errors, RSS 18MB

Known gaps: none open. Refresh with make bench (smokes) or make bench-soak (soaks); both regenerate the charts.

| rclone SFTP (1.60.1) | copyto 1MB up (0.14s) plus down, sha-identical, lsd clean | Gate leg rclone sftp roundtrip (SKIPs when rclone absent) |

Benchmark graphs

Charts live in docs/bench/ (SVG, auto-generated). One command refreshes everything:

make bench          # HTTP smoke plus SFTP smoke, then graphs
make bench-soak     # both 10-min soaks, then graphs
49.2ms