acorde assumes the following:
- Device Compromise: If an attacker gains full access to a running, unlocked device, they can read the data (Memory is not encrypted).
- Network Compromise: An attacker on the network (MITM) cannot read sync traffic or inject invalid data.
- Storage Theft: An attacker stealing the physical disk (
~/.acorde) cannot read data without the password. - Malicious Peer: A malicious peer without the key can store/relay data but cannot read it. A malicious peer with the key can corrupt data (detected by AEAD authentication failure).
The Master Key is encrypted using a "Wrapper Key" derived from the user's password.
- Algorithm: Argon2id
- Memory: 64 MB (
64 * 1024KB) - Iterations: 3
- Parallelism: 2 threads
- Salt: 16 bytes (Random)
Entry content is encrypted using AEAD (Authenticated Encryption with Associated Data).
- Algorithm: XChaCha20-Poly1305
- Why? Native Go support, resistant to nonce reuse (192-bit nonce), high performance.
- Key: 32-byte Master Key.
- Nonce: 24 bytes (Randomly generated per encryption).
- AAD (Associated Data):
Entry.ID- Why? Binds the ciphertext to a specific Entry ID. Prevents "replay" or "swapping" content between entries.
Keys are stored in ~/.acorde/keys.json.
{
"salt": "<base64_salt>",
"data": "<base64_encrypted_master_key>",
"params": {
"mem": 65536,
"time": 3,
"threads": 2
}
}- User inputs Password.
- Generate random
MasterKey(32 bytes). - Generate random
Salt(16 bytes). - Derive
WrapperKey=Argon2id(Password, Salt). - Encrypt
MasterKeywithWrapperKey(AAD = directory path). - Save to disk.
- User inputs Password.
- Read
SaltandEncryptedMasterKeyfrom disk. - Derive
WrapperKey. - Decrypt
MasterKey.- If integrity check fails: Incorrect password.
- Keep
MasterKeyin memory for duration of process.
- Inviter encrypts the
MasterKeyusing a temporary ephemeral key (PeerID + Time). - Inviter encodes result into Invite Link.
- Receiver imports Invite.
- Receiver prompts user for new local password.
- Receiver re-encrypts the
MasterKeywith their new password and saves to their disk.- Result: Both devices share the same
MasterKey, but typically protect it with different local passwords.
- Result: Both devices share the same