android-keystore

android.security.KeyStoreException: Unknown error On a rare number of devices

别等时光非礼了梦想. 提交于 2020-06-12 05:27:05
问题 I'm getting android.security.KeyStoreException: Unknown error On a rare number of devices with different Android Versions (6 - 8) This is my key generation code: final KeyPairGenerator keyGenerator = KeyPairGenerator .getInstance(KeyProperties.KEY_ALGORITHM_RSA, ANDROID_KEY_STORE); keyGenerator.initialize(new KeyGenParameterSpec.Builder(ALIAS, KeyProperties.PURPOSE_ENCRYPT | KeyProperties.PURPOSE_DECRYPT) .setKeySize(2048) .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_RSA_PKCS1)

Android KeyGenParameterSpec.Builder ignoring setCertificateNotBefore and setCertificateNotAfter when not in Secure Hadware

ε祈祈猫儿з 提交于 2020-06-01 05:02:41
问题 I've created the following method that creates a KeyPair and logs the Certificate details: @RequiresApi(api = Build.VERSION_CODES.N) public void createRSAKeyPairtWithChallenge(final String alias, final String attestationChallenge) throws NoSuchProviderException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, KeyStoreException, CertificateException, IOException { Calendar start = Calendar.getInstance(); Calendar end = new GregorianCalendar(2025,03,24); KeyPairGenerator

Usage of software/hardware-backed Android Keystore and possible security/usability drawbacks

早过忘川 提交于 2020-04-08 09:01:56
问题 I'm currently looking at the possibilities of storing/using secrets keys in an Android application. I've found Nikolay Elenkov's blog very helpful regarding this topic and I've learnt a lot of things about the Android keystore and some hardware-based implementations. Still I've got some questions about security and user experience aspects. Software keystore For what I understood, in this configuration a masterkey is derived (using PBKDF2) from a user password (plus a salt to prevent rainbow