My app uses Android 6.0 Fingerprint API to protect AES key in the Android KeyStore. The stored key can be used only when user is authenticated by fingerprint sensor because
I also had this issue when using RSA and could solve it by creating a copy of the public key as soon as i want to encrypt some data.
// create a copy of the public key -> workaround for android.security.KeyStoreException: Key user not authenticated
val publicKey = KeyFactory
.getInstance("RSA")
.generatePublic(X509EncodedKeySpec(keyPair.public.encoded))
// encrypt with the public key
val cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding")
cipher.init(Cipher.ENCRYPT_MODE, publicKey)
val encryptedData = cipher.doFinal(data)