Security & Cryptography
CDUS guarantees confidentiality, integrity, and authenticity for all synchronized data across your local devices and fallback relays.
1. The Noise Protocol Framework
Instead of wrapping brittle TLS stacks with complex certificate authorities, CDUS relies on formal, mathematically verified handshake patterns from the Noise Protocol Framework using the Noise_XX_25519_ChaChaPoly_BLAKE2s and Noise_IK_25519_ChaChaPoly_BLAKE2s cipher suites.
Out-of-Band Pairing (Noise XX)
When you pair a new computer or phone, neither device possesses the other's public key. The initiating device displays an ephemeral QR code encoding its listening socket and an out-of-band token. The devices then execute a three-phase mutual handshake:
- Message 1: Initiator sends ephemeral public key
e. - Message 2: Responder sends ephemeral public key
e, executes Diffie-Hellman, and transmits its static public keysencrypted. - Message 3: Initiator transmits its static public key
sencrypted, achieving mutual authentication.
Both devices compute a visual 6-digit confirmation digest from the completed handshake transcript. Confirming these digits protects against active Man-in-the-Middle attackers on shared or hostile Wi-Fi networks.
Zero-RTT Reconnection (Noise IK)
Once paired, devices store each other's static public keys. Future sessions establish with a single round-trip using Noise IK. Ephemeral keys generate fresh session keys with authenticated forward secrecy for every connection cycle.
2. BLAKE3 Chunk Integrity & Resumption
Transferred files are split into deterministic 1 MB chunks. Each chunk carries a 32-byte BLAKE3 cryptographic hash computed prior to transmission:
- Instant Rejection: If a bit flips in transit, the chunk hash check fails immediately upon disk flush, preventing corrupted data from entering the filesystem.
- Resilience: If a transfer disconnects at 99%, only the missing chunks are re-requested upon reconnection. The already-verified chunks remain valid.
3. Zero-Knowledge Fallback Relays
When devices cannot establish direct peer-to-peer connections due to symmetric NAT or firewall policies, CDUS routes packets through an open-source Go relay:
- The relay never possesses decryption keys. All payloads passing through the relay are Noise-encrypted ciphertext.
- The relay routes solely by ephemeral connection tokens. It has zero knowledge of device static keys, clipboard contents, or filenames.
4. Native Hardware Keychain Storage
Private static keys are never written to unencrypted plaintext config files:
- Linux: Stored via Secret Service API (GNOME Keyring / KWallet).
- macOS: Stored in Apple Keychain Services with hardware enclave backing.
- Windows: Stored via Windows Credential Manager with DPAPI protection.
- Android: Stored in Android KeyStore with StrongBox / TEE hardware isolation.