My presentation about the Android Biometric API, KeyStore and Key Attestation as presented at droidcon Lisbon 2025 on September 5, 2025.
Intro
Do you need to protect some functionality or store sensitive data in your Android app? Biometric authentication seems both convenient and secure at face value. However under the skin of standardized APIs like androidx.biometric lies a web of strange edge cases and security vulnerabilities caused by API misuse in many cases.
Based on extensive research and development of security-sensitive apps, we will discuss the quirks and features of Biometrics API and the Keystore system of Android. Among many others, you will learn:
- How Biometric authentication can be bypassed without proper usage of the CryptoObject.
- Which are the obvious (and not so obvious) usability implications of making Android invalidate keys when new (biometric) credentials are added?
- How do we require user authentication for accessing keys and what it means? Also, what does the timeout parameter mean in this case?
- How to use hardware-backed key storage, Strongbox, and how to verify them via key attestation.
Links
Open source library to wrap different biometric APIs (only use if you can trust it):
https://github.com/sergeykomlach/AdvancedBiometricPromptCompat
Jetpack Biometric Library:
https://developer.android.com/jetpack/androidx/releases/biometric
Blogpost announcing Biometric API changes (including the introduction of Biometric Classes) in Android 11:
https://security.googleblog.com/2020/09/lockscreen-and-authentication.html
Official Android documentation about showing a BiometricPrompt and authenticating with it:
https://developer.android.com/identity/sign-in/biometric-auth
My sample app to check the secure storage capabilities of a device:
https://github.com/balazsgerlei/AndroidSecureStorageCapabilitiesInspector
Android Device Security Database research project listing some devices that has a StrongBox Secure Element:
https://www.android-device-security.org/database/?realMeasurementsOnly=true&show=Strongbox&sortBy=COUNT%20Lab%20Strongbox%20True
Official Android documentation about Key Attestation
https://developer.android.com/privacy-and-security/security-key-attestation
Google's Key Attestation implementation:
https://github.com/android/keyattestation
We meant to present it together with my colleague but things turned out like I presented it alone.