Threema, a secure messaging application, prioritizes user privacy by avoiding server-side storage and ensuring that message content remains on users' devices. On Android, it utilizes the Keystore for secure cryptographic key management, storing data in an app-specific directory to isolate it from other applications. All stored data is encrypted, making it unreadable without the appropriate key. The Android Keystore allows for key generation without direct access to raw data, enhancing security by performing cryptographic operations internally. Modern devices with dedicated security chips provide hardware-backed security, while older devices rely on a software-backed Keystore, which is more vulnerable. Threema offers users the option to set a passphrase, adding an extra layer of protection by encrypting data before it is stored in the Keystore. This multi-layered security strategy adapts to the device's capabilities.