The README makes claims. This file backs them up.
How it works: JanusKey implements architectural reversibility by storing inverted operations alongside each mutation. The delete operation, implemented in crates/januskey-cli/src/obliteration.rs, calculates and stores a full restoration record before removing file content. The delta.rs module generates inverse metadata that sufficient to reconstruct the pre-operation state. Every operation in the transaction layer (crates/januskey-cli/src/metadata.rs) maintains a "prior state" record, enabling perfect reversal through the undo pathway.
Caveat: Reversibility is strong only when the operation log remains intact. If .jk/ metadata store is corrupted or lost, recovery becomes impossible. The system trades write amplification (each operation doubles metadata I/O) for guaranteed recoverability.
Evidence: crates/januskey-cli/src/lib.rs (public API) delegates to obliteration.rs and delta.rs for operation logic; see Reversible trait (if present) or reversibility-proof comments in attestation.rs.
How it works: The metadata store (crates/januskey-cli/src/metadata.rs) maintains an append-only operation log. The attestation.rs module calculates cryptographic commitments (SHA256 hashes) of each operation, creating a tamper-evident chain. Content-addressed storage (crates/januskey-cli/src/content_store.rs) ensures deduplication by content hash, preventing duplicate storage while maintaining full history.
Caveat: The audit trail is only as trustworthy as the append-only mechanism. If the log is truncated or rewritten on-disk, the chain breaks. For forensic-grade auditing, integrate with an external append-only store (database, blockchain).
Evidence: crates/januskey-cli/src/metadata.rs defines the log structure; attestation.rs computes cryptographic bindings; content_store.rs handles SHA256 hashing.
| Technology | Learn More |
|---|---|
Rust |
|
Content-Addressed Storage |
SHA256 deduplication |
Maximal Principle Reduction |
Security by construction |
| Path | Purpose |
|---|---|
|
CLI entry point, command dispatch (delete, modify, move, copy, undo, begin, commit, rollback, preview) |
|
Public API: init, delete, modify, move, copy, undo, transaction logic |
|
Delete operation with restoration metadata |
|
Computes inverse operations (modify undo, move undo, copy undo) |
|
Append-only operation log, transaction tracking, rollback state |
|
SHA256 content hashing, deduplication, storage management |
|
Cryptographic commitments, audit trail, tamper detection |
|
Cryptographic key management (if key-based reversibility) |
|
Error types and propagation |
| Project | Integration | | panic-attacker | Can scan JanusKey for unwrap() and unsafe code in critical paths | reposystem | Could model file operations as graph edges (modified → reversed) | proof-of-work | Could Z3-verify reversibility proofs for select operations | vql-ut | Could query operation audit trail as temporal dataset