AndroidKeyStore KeyPairGenerator Crashes On Small Number of Devices
My application only targets Android 6.0+. In my application I generate a RSA key in the AndroidKeyStore with the following: KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA", "AndroidKeyStore"); kpg.initialize(new KeyGenParameterSpec.Builder( "myKey", KeyProperties.PURPOSE_ENCRYPT | KeyProperties.PURPOSE_DECRYPT) .setCertificateSubject(new X500Principal("CN=myKey")) .setDigests("SHA-1") .setEncryptionPaddings("OAEPPadding") .build()); KeyPair kp = kpg.generateKeyPair(); This works well on 20+ devices that we have tested and nearly 100% percent of our users. However, there is a small