Skip to content

Latest commit

 

History

History
65 lines (45 loc) · 3.91 KB

File metadata and controls

65 lines (45 loc) · 3.91 KB

JanusKey — Show Me The Receipts

The README makes claims. This file backs them up.

Claims Substantiation

Claim 1: "100% Reversible - Every operation can be undone, always"

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.

Claim 2: "Complete Audit Trail - Every change tracked automatically"

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 Choices

Technology Learn More

Rust

https://www.rust-lang.org

Content-Addressed Storage

SHA256 deduplication

Maximal Principle Reduction

Security by construction

File Map

Path Purpose

crates/januskey-cli/src/main.rs

CLI entry point, command dispatch (delete, modify, move, copy, undo, begin, commit, rollback, preview)

crates/januskey-cli/src/lib.rs

Public API: init, delete, modify, move, copy, undo, transaction logic

crates/januskey-cli/src/obliteration.rs

Delete operation with restoration metadata

crates/januskey-cli/src/delta.rs

Computes inverse operations (modify undo, move undo, copy undo)

crates/januskey-cli/src/metadata.rs

Append-only operation log, transaction tracking, rollback state

crates/januskey-cli/src/content_store.rs

SHA256 content hashing, deduplication, storage management

crates/januskey-cli/src/attestation.rs

Cryptographic commitments, audit trail, tamper detection

crates/januskey-cli/src/keys.rs

Cryptographic key management (if key-based reversibility)

crates/januskey-cli/src/error.rs

Error types and propagation

Dogfooted Across The Account

| 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

Readiness

CRG Grade: C (Beta) - Reversibility architecture sound, append-only log working, needs edge-case testing around symlinks and special files.