Case 47BC03 · Cryptography · L3 Applied
Certificate Pinning Trade-offs
Interview questionThe mobile team wants to add certificate pinning to our app. Would you support that, and how would you do it safely?
- 01 Answer
- 02 Example
- 03 Trade-offs
What a strong answer covers
Try it out loud first. Then check yourself:
- Pinning trusts only specific keys, not any CA in the store; it blocks rogue CA certs and casual interception proxies.
- Pin SPKI hashes (often an intermediate or your own CA key) not leaf certs, and ship backup pins for planned rotation.
- Biggest risk is self-inflicted outage: a key change bricks old app versions; browsers dropped HPKP largely for this reason.
- It is not anti-tampering: on a rooted device Frida or objection hooks the check, so do not rely on it to hide your API.
- Alternatives: CT enforcement plus short-lived certs; if pinning, add a remote kill switch and monitor pin failures.
If the interviewer pushes back
- Enterprise customers run TLS inspection and your pinned app now fails on their networks. How do you handle that?