Security

Encryption

FitBuddy encrypts your backup data with AES-256-GCM — the same cipher used by governments, banks, and secure messaging apps. Your health data is protected by cryptography that is computationally infeasible to break.

Overview

When you set a backup password, FitBuddy encrypts all exported and cloud-uploaded data on your device before it ever leaves the app. The encrypted backup is a self-describing JSON envelope containing the ciphertext and the non-secret parameters needed to decrypt it — but never the password itself.

Without the password, the ciphertext is indistinguishable from random noise. There is no backdoor, no master key, and no recovery mechanism — this is by design.

AES-256-GCM cipher

AES (Advanced Encryption Standard) with a 256-bit key is the gold standard of symmetric encryption. It was selected by NIST through a rigorous multi-year public competition and is approved for Top Secret classified data by the US government (NSA Suite B / CNSA). There is no known practical attack against AES-256 — a brute-force search of the 2256 key space would require more energy than exists in the observable universe.

GCM (Galois/Counter Mode) adds authenticated encryption: it simultaneously encrypts and integrity-protects the data. If even a single bit of the ciphertext or envelope metadata is tampered with, decryption fails immediately with an authentication error rather than producing garbled output. This means:

Key derivation (PBKDF2)

Your password is never used directly as an encryption key. Instead, FitBuddy derives a 256-bit key from it using PBKDF2-HMAC-SHA256 with the following parameters:

ParameterValue
AlgorithmPBKDF2WithHmacSHA256
Iterations120,000
Salt length128 bits (16 bytes)
Output key length256 bits

The high iteration count makes each password guess computationally expensive. At 120,000 rounds of HMAC-SHA256, even a dedicated GPU cluster testing billions of passwords would need astronomical time to crack a strong password. A random 16-character password at this iteration count would take longer than the age of the universe to brute-force.

The random salt (generated fresh for each backup via SecureRandom) ensures that identical passwords produce different keys across different backups. This defeats precomputation attacks (rainbow tables) entirely — an attacker cannot build a lookup table because every backup has a unique salt.

Envelope format

Encrypted backups are stored in a versioned, self-describing JSON envelope:

{
  "fitbuddyBackup": 1,
  "enc": "AES-GCM",
  "kdf": "PBKDF2-HMAC-SHA256",
  "iterations": 120000,
  "salt": "<base64, 16 random bytes>",
  "iv": "<base64, 12 random bytes>",
  "ciphertext": "<base64, AES-256-GCM(payload) + 128-bit auth tag>"
}

The envelope stores only the non-secret parameters needed to re-derive the key and decrypt. The password is never written into the envelope, the file, or any export. Key fields:

FitBuddy also supports importing legacy plain-JSON backups (pre-encryption) and unencrypted-but-wrapped backups ("enc": "none") for forward compatibility. The format is classified automatically at import time without needing user input about the file type.

Android Keystore protection

If you set a custom cloud-backup password, FitBuddy remembers it on-device so automatic uploads can re-encrypt without prompting you each time. This remembered password is itself encrypted using the Android Keystore — a hardware-backed (on supported devices) secure key storage:

On devices with a hardware security module (StrongBox or TEE), the Keystore key lives in dedicated tamper-resistant silicon. Extracting it would require physically attacking the chip — a level of effort beyond virtually all threat models.

Zero-knowledge design

FitBuddy's encryption follows a zero-knowledge architecture:

In-memory safety

FitBuddy takes care to minimise the time sensitive material spends in memory:

These measures ensure no recoverable copy of your password or key material survives in process memory after the operation.

Why this is unbreakable

"Unbreakable" is a strong claim, so here's the math:

The weakest link is always the password.

The cryptography is unbreakable, but a weak or guessable password (like "password123") can still be cracked through dictionary attacks. Use a strong, unique password of at least 12 characters mixing letters, digits, and symbols. FitBuddy enforces a minimum of 8 characters.

Summary

LayerWhat it does
AES-256-GCM Encrypts and authenticates your backup data with a 256-bit key
PBKDF2-HMAC-SHA256 Derives the key from your password; 120k iterations make guessing expensive
Random salt (128-bit) Unique per backup; defeats rainbow tables and precomputation
Random IV (96-bit) Unique per backup; ensures identical data encrypts differently each time
GCM auth tag (128-bit) Detects any tampering or corruption of the encrypted file
Android Keystore Hardware-backed protection for the remembered cloud password on-device
Zero-knowledge upload Cloud receives only ciphertext; plaintext never leaves the device
Memory zeroing Passwords and keys are wiped from RAM after each operation

FitBuddy treats your health data with the same seriousness as a banking app treats financial data. The encryption is not optional security theatre — it is a rigorous, standards-based implementation that makes your backed-up data cryptographically inaccessible to anyone without the password.

See also: Backup & cloud guide · Privacy policy · FAQ