Trail of Bits Audit
Vault encryption (Argon2id) & recovery
A cryptographic review of the at-rest vault format, the Argon2id parameterisation and the recovery-phrase derivation, including offline brute-force resistance modelling.
Methodology
Findings & Fixes
Default Argon2id parameters below recommended threshold
The default Argon2id memory cost was set lower than the OWASP recommended minimum, reducing brute-force resistance on consumer hardware.
Raised default Argon2id parameters to m=64MB, t=3 iterations, p=4 parallelism, exceeding OWASP recommendations.
Recovery phrase entropy validation missing
The wallet did not validate that generated recovery phrases met the minimum entropy requirements before accepting them.
Added entropy validation step using a checksum-based verification before phrase acceptance.
Vault header lacks version field
The encrypted vault format did not include a version field, complicating future format migrations.
Added a versioned header to the vault format with backward-compatible parsing for legacy vaults.
Memory lock not enforced on all platforms
mlock/mlockall was not consistently applied across all supported platforms during key operations.
Implemented platform-specific memory locking with graceful fallback and clear user warning.
No formal proof of key-derivation correctness
The BIP-39 derivation implementation lacked formal verification or property-based tests.
Added property-based tests (Hypothesis) covering all BIP-39 edge cases and test vectors.
Backup file naming is predictable
Automatic backup files used predictable timestamps in filenames.
Added a random nonce to backup filenames while preserving sortability.
Salt reuse across vault upgrades
The vault salt was preserved across passphrase changes instead of being regenerated.
Always generate a fresh salt when the passphrase or KDF parameters change.
Missing documentation on threat model
The threat model was not clearly documented for users reviewing the security posture.
Published a formal threat model document covering all adversary types and mitigations.
No anti-forensic wipe on vault deletion
Deleting the vault did not perform anti-forensic wiping of the underlying storage.
Added optional secure wipe with Gutmann method and clear user documentation on limitations.