Core Concepts

Security and Crypto

Why a sensitive feature without the platform's crypto and attestation primitives is a liability, and the security seams an interviewer probes for anything touching tokens, keys, or user data.

Premium~22 min

Security on Android is a threat model plus a small set of platform primitives that each defend against one specific attacker. The same auth token that looks "fine" in SharedPreferences is one adb backup from a developer's laptop and one rooted device from any user. This page covers the primitives every problem touching identity, secrets, payments, or DRM eventually leans on: the Android Keystore, BiometricPrompt, certificate pinning with Network Security Config, scoped storage, encrypted preferences, the APK signing schemes (v1-v4), and Play Integrity. End-to-end message encryption belongs to the Messenger design; PII redaction lives in the crash-reporting design; this page is the substrate they both build on.

The threat model

Every primitive on this page exists because of a specific attacker. Naming the attacker is what stops candidates from over-engineering or under-engineering:

AttackerWhat they can doPrimitive that defends
Premium content

Unlock the complete breakdown.

Browse free problems