[ZenFone 2 Android Development] jb.bobo:
Security problem

Hi,

I have a problem with this ROM when using some applications.

Secure applications, like "Protonmail" or "Revolut".

The problem put when opening applications, below the logs of the "Protomail" application:

04-19 10:17:35.780 1612 1612 E IntelKeyMaster: cannot read key; it was not made by this keymaster
04-19 10:17:35.784 1612 1612 E IntelKeyMaster: OpenSSL error in intel_keymaster_get_keypair_public 67109003: error:0400008b:RSA routines:eek:PENSSL_internal:VALUE_MISSING
04-19 10:17:35.784 1612 1612 E Keymaster0Engine: Error -1 extracting public key
04-19 10:17:35.928 8563 8563 E AndroidRuntime: FATAL EXCEPTION: main
04-19 10:17:35.928 8563 8563 E AndroidRuntime: Process: ch.protonmail.android, PID: 8563
04-19 10:17:35.928 8563 8563 E AndroidRuntime: java.lang.RuntimeException: Unable to create application ch.protonmail.android.core.ProtonMailApplication: java.security.ProviderException: Failed to load generated key pair from keystore
04-19 10:17:35.928 8563 8563 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5501)
04-19 10:17:35.928 8563 8563 E AndroidRuntime: at android.app.ActivityThread.-wrap2(ActivityThread.java)
04-19 10:17:35.928 8563 8563 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1575)
04-19 10:17:35.928 8563 8563 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
04-19 10:17:35.928 8563 8563 E AndroidRuntime: at android.os.Looper.loop(Looper.java:154)
04-19 10:17:35.928 8563 8563 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6236)
04-19 10:17:35.928 8563 8563 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
04-19 10:17:35.928 8563 8563 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:891)
04-19 10:17:35.928 8563 8563 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:781)
04-19 10:17:35.928 8563 8563 E AndroidRuntime: Caused by: java.security.ProviderException: Failed to load generated key pair from keystore
04-19 10:17:35.928 8563 8563 E AndroidRuntime: at android.security.keystore.AndroidKeyStoreKeyPairGeneratorSpi.loadKeystoreKeyPair(AndroidKeyStoreKeyPairGeneratorSpi.java:518)
04-19 10:17:35.928 8563 8563 E AndroidRuntime: at android.security.keystore.AndroidKeyStoreKeyPairGeneratorSpi.generateKeyPair(AndroidKeyStoreKeyPairGeneratorSpi.java:470)
04-19 10:17:35.928 8563 8563 E AndroidRuntime: at java.security.KeyPairGenerator$Delegate.generateKeyPair(KeyPairGenerator.java:699)
04-19 10:17:35.928 8563 8563 E AndroidRuntime: at e.a.a.k.a.a(SecureSharedPreferences.kt:61)
04-19 10:17:35.928 8563 8563 E AndroidRuntime: at e.a.a.k.a.<init>(SecureSharedPreferences.kt:8)
04-19 10:17:35.928 8563 8563 E AndroidRuntime: at e.a.a.k.a.<init>(SecureSharedPreferences.kt:1)
04-19 10:17:35.928 8563 8563 E AndroidRuntime: at e.a.a.k.a$a.a(SecureSharedPreferences.kt:6)
04-19 10:17:35.928 8563 8563 E AndroidRuntime: at ch.protonmail.android.core.ProtonMailApplication.a(ProtonMailApplication.java:1)
04-19 10:17:35.928 8563 8563 E AndroidRuntime: at ch.protonmail.android.api.models.User.load(User.java:1)
04-19 10:17:35.928 8563 8563 E AndroidRuntime: at ch.protonmail.android.core.m.d(UserManager.kt:4)
04-19 10:17:35.928 8563 8563 E AndroidRuntime: at ch.protonmail.android.core.m.w(UserManager.kt:1)
04-19 10:17:35.928 8563 8563 E AndroidRuntime: at ch.protonmail.android.core.ProtonMailApplication.E(ProtonMailApplication.java:1)
04-19 10:17:35.928 8563 8563 E AndroidRuntime: at ch.protonmail.android.core.ProtonMailApplication.onCreate(ProtonMailApplication.java:18)
04-19 10:17:35.928 8563 8563 E AndroidRuntime: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1025)
04-19 10:17:35.928 8563 8563 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5498)
04-19 10:17:35.928 8563 8563 E AndroidRuntime: ... 8 more
04-19 10:17:35.928 8563 8563 E AndroidRuntime: Caused by: java.security.UnrecoverableKeyException: Failed to obtain X.509 form of public key
04-19 10:17:35.928 8563 8563 E AndroidRuntime: at android.security.keystore.AndroidKeyStoreProvider.loadAndroidKeyStorePublicKeyFromKeystore(AndroidKeyStoreProvider.java:230)
04-19 10:17:35.928 8563 8563 E AndroidRuntime: at android.security.keystore.AndroidKeyStoreProvider.loadAndroidKeyStoreKeyPairFromKeystore(AndroidKeyStoreProvider.java:259)
04-19 10:17:35.928 8563 8563 E AndroidRuntime: at android.security.keystore.AndroidKeyStoreKeyPairGeneratorSpi.loadKeystoreKeyPair(AndroidKeyStoreKeyPairGeneratorSpi.java:509)
04-19 10:17:35.928 8563 8563 E AndroidRuntime: ... 22 more
04-19 10:17:35.928 8563 8563 E AndroidRuntime: Caused by: android.security.KeyStoreException: Unknown error
04-19 10:17:35.928 8563 8563 E AndroidRuntime: at android.security.KeyStore.getKeyStoreException(KeyStore.java:676)
04-19 10:17:35.928 8563 8563 E AndroidRuntime: at android.security.keystore.AndroidKeyStoreProvider.loadAndroidKeyStorePublicKeyFromKeystore(AndroidKeyStoreProvider.java:231)
04-19 10:17:35.928 8563 8563 E AndroidRuntime: ... 24 more
04-19 10:17:36.040 1926 2042 E ConnectivityService: RemoteException caught trying to send a callback msg for NetworkRequest [ LISTEN id=19, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&FOREGROUND] ]

I tested this:

Fresh installation

Change of security "pattern, pin ..."

I wanted to thank you for this ROM because without this problem everything works fine!

Good day