I've tried to generate a key pair using the Google sample (BasicAndroidKeyStore
). The only modification I made is setting the setUserAuthenticationRequired(true)
in the KeyGenParameterSpec.Builder
.
I assume it would work fine on a device with the embedded Fingerprint scanner, but running it on OnePlus One (working under Android 6.0), I get the following exception:
At least one fingerprint must be enrolled to create keys requiring user authentication for every use
The phone does have the lock screen set to use the pattern, but apparently it requires fingerprint for the authentication. Any idea how to use API 23 keystore without having the actual Fingerprint reader?