[Samsung Galaxy S7 (Exynos) ROMs, Kernels, Recoveri] Kenajcrap:
It seems like I'm still having keystore issues with my banking app even after the 2022.06.24 update.

here is the error stacktrace:

06-30 03:55:40.285 5916 6043 W System.err: com.ca.mas.foundation.MASException: Error generateKeyInAndroidKeyStore
06-30 03:55:40.285 5916 6043 W System.err: at com.ca.mas.foundation.notify.Callback.transform(Unknown Source:63)
06-30 03:55:40.285 5916 6043 W System.err: at com.ca.mas.foundation.notify.Callback.onError(Unknown Source:56)
06-30 03:55:40.285 5916 6043 W System.err: at com.ca.mas.foundation.MASUser$2.onError(Unknown Source:131)
06-30 03:55:40.285 5916 6043 W System.err: at com.ca.mas.core.MAGResultReceiver.onReceiveResult(Unknown Source:80)
06-30 03:55:40.285 5916 6043 W System.err: at android.os.ResultReceiver.send(ResultReceiver.java:86)
06-30 03:55:40.285 5916 6043 W System.err: at com.ca.mas.core.service.MssoService.respondError(Unknown Source:276)
06-30 03:55:40.286 5916 6043 W System.err: at com.ca.mas.core.service.MssoService.handleErrorResponse(Unknown Source:231)
06-30 03:55:40.286 5916 6043 W System.err: at com.ca.mas.core.service.MssoService.onProcessRequest(Unknown Source:221)
06-30 03:55:40.286 5916 6043 W System.err: at com.ca.mas.core.service.MssoService.onCredentialsObtained(Unknown Source:156)
06-30 03:55:40.286 5916 6043 W System.err: at com.ca.mas.core.service.MssoService.onHandleWork(Unknown Source:124)
06-30 03:55:40.286 5916 6043 W System.err: at com.ca.mas.core.service.MssoService$ServiceHandler.handleMessage(Unknown Source:310)
06-30 03:55:40.286 5916 6043 W System.err: at android.os.Handler.dispatchMessage(Handler.java:106)
06-30 03:55:40.286 5916 6043 W System.err: at android.os.Looper.loopOnce(Looper.java:201)
06-30 03:55:40.286 5916 6043 W System.err: at android.os.Looper.loop(Looper.java:288)
06-30 03:55:40.286 5916 6043 W System.err: at android.os.HandlerThread.run(HandlerThread.java:67)
06-30 03:55:40.287 5916 6043 W System.err: Caused by: java.lang.RuntimeException: Error generateKeyInAndroidKeyStore
06-30 03:55:40.287 5916 6043 W System.err: at com.ca.mas.core.security.DefaultEncryptionProvider.encrypt(Unknown Source:60)
06-30 03:55:40.287 5916 6043 W System.err: at com.ca.mas.core.storage.MASSecureSharedStorage.save(Unknown Source:38)
06-30 03:55:40.287 5916 6043 W System.err: at com.ca.mas.core.datasource.MASSecureStorageDataSource.put(Unknown Source:72)
06-30 03:55:40.287 5916 6043 W System.err: at com.ca.mas.core.store.ClientCredentialStorage.saveClientCredentials(Unknown Source:35)
06-30 03:55:40.287 5916 6043 W System.err: at com.ca.mas.core.context.MssoContext.setClientCredentials(Unknown Source:572)
06-30 03:55:40.287 5916 6043 W System.err: at com.ca.mas.core.policy.ClientCredentialAssertion.processRequest(Unknown Source:70)
06-30 03:55:40.287 5916 6043 W System.err: at com.ca.mas.core.policy.PolicyManager.processRequest(Unknown Source:119)
06-30 03:55:40.287 5916 6043 W System.err: at com.ca.mas.core.policy.PolicyManager.execute(Unknown Source:152)
06-30 03:55:40.287 5916 6043 W System.err: at com.ca.mas.core.context.MssoContext.executeRequest(Unknown Source:408)
06-30 03:55:40.287 5916 6043 W System.err: at com.ca.mas.core.service.MssoService.onProcessRequest(Unknown Source:177)
06-30 03:55:40.287 5916 6043 W System.err: ... 7 more
06-30 03:55:40.287 5916 6043 W System.err: Caused by: java.lang.RuntimeException: Error generateKeyInAndroidKeyStore
06-30 03:55:40.288 5916 6043 W System.err: at com.ca.mas.core.util.KeyUtilsSymmetric.generateKeyInAndroidKeyStoreAndroidN(Unknown Source:283)
06-30 03:55:40.288 5916 6043 W System.err: at com.ca.mas.core.util.KeyUtilsSymmetric.generateKey(Unknown Source:155)
06-30 03:55:40.288 5916 6043 W System.err: at com.ca.mas.core.security.KeyStoreKeyStorageProvider.getKey(Unknown Source:86)
06-30 03:55:40.288 5916 6043 W System.err: at com.ca.mas.core.security.DefaultEncryptionProvider.encrypt(Unknown Source:56)
06-30 03:55:40.288 5916 6043 W System.err: ... 16 more
06-30 03:55:40.288 5916 6043 W System.err: Caused by: java.security.ProviderException: Keystore key generation failed
06-30 03:55:40.288 5916 6043 W System.err: at android.security.keystore2.AndroidKeyStoreKeyGeneratorSpi.engineGenerateKey(AndroidKeyStoreKeyGeneratorSpi.java:413)
06-30 03:55:40.288 5916 6043 W System.err: at javax.crypto.KeyGenerator.generateKey(KeyGenerator.java:612)
06-30 03:55:40.288 5916 6043 W System.err: at com.ca.mas.core.util.KeyUtilsSymmetric.generateKeyInAndroidKeyStoreAndroidN(Unknown Source:278)
06-30 03:55:40.288 5916 6043 W System.err: ... 19 more
06-30 03:55:40.289 5916 6043 W System.err: Caused by: android.security.KeyStoreException: Unsupported block mode
06-30 03:55:40.289 5916 6043 W System.err: at android.security.KeyStore2.getKeyStoreException(KeyStore2.java:356)
06-30 03:55:40.289 5916 6043 W System.err: at android.security.KeyStoreSecurityLevel.handleExceptions(KeyStoreSecurityLevel.java:57)
06-30 03:55:40.289 5916 6043 W System.err: at android.security.KeyStoreSecurityLevel.generateKey(KeyStoreSecurityLevel.java:145)
06-30 03:55:40.289 5916 6043 W System.err: at android.security.keystore2.AndroidKeyStoreKeyGeneratorSpi.engineGenerateKey(AndroidKeyStoreKeyGeneratorSpi.java:400)
06-30 03:55:40.289 5916 6043 W System.err: ... 21 more
06-30 03:55:40.293 5916 6043 W System.err: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
06-30 03:55:40.293 5916 6043 W System.err: at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(Unknown Source:226)
06-30 03:55:40.294 5916 6043 W System.err: at com.google.gson.Gson.fromJson(Unknown Source:932)
06-30 03:55:40.294 5916 6043 W System.err: at com.newrelic.agent.android.instrumentation.GsonInstrumentation.fromJson(Unknown Source:126)
06-30 03:55:40.294 5916 6043 W System.err: at com.google.gson.Gson.fromJson(Unknown Source:897)
06-30 03:55:40.294 5916 6043 W System.err: at com.newrelic.agent.android.instrumentation.GsonInstrumentation.fromJson(Unknown Source:117)
06-30 03:55:40.294 5916 6043 W System.err: at com.google.gson.Gson.fromJson(Unknown Source:846)
06-30 03:55:40.294 5916 6043 W System.err: at com.newrelic.agent.android.instrumentation.GsonInstrumentation.fromJson(Unknown Source:99)
06-30 03:55:40.294 5916 6043 W System.err: at o.jIb.d(Unknown Source:446)
06-30 03:55:40.294 5916 6043 W System.err: at o.jIb.e(Unknown Source:143)
06-30 03:55:40.294 5916 6043 W System.err: at o.jKO.b(Unknown Source:35)
06-30 03:55:40.294 5916 6043 W System.err: at o.jKO$e.invokeSuspend(Unknown Source:15)
06-30 03:55:40.294 5916 6043 W System.err: at o.lOr.resumeWith(Unknown Source:33)
06-30 03:55:40.294 5916 6043 W System.err: at kotlinx.coroutines.UndispatchedCoroutine.afterResume(Unknown Source:142)
06-30 03:55:40.294 5916 6043 W System.err: at kotlinx.coroutines.AbstractCoroutine.resumeWith(Unknown Source:102)
06-30 03:55:40.295 5916 6043 W System.err: at o.lOr.resumeWith(Unknown Source:46)
06-30 03:55:40.295 5916 6043 W System.err: at kotlinx.coroutines.DispatchedTask.run(Unknown Source:104)
06-30 03:55:40.295 5916 6043 W System.err: at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(Unknown Source:571)
06-30 03:55:40.295 5916 6043 W System.err: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(Unknown Source:750)
06-30 03:55:40.295 5916 6043 W System.err: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(Unknown Source:678)
06-30 03:55:40.295 5916 6043 W System.err: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(Unknown Source:665)
06-30 03:55:40.295 5916 6043 W System.err: Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
06-30 03:55:40.295 5916 6043 W System.err: at com.google.gson.stream.JsonReader.beginObject(Unknown Source:386)
06-30 03:55:40.295 5916 6043 W System.err: at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(Unknown Source:215)
06-30 03:55:40.295 5916 6043 W System.err: ... 19 more

After clearing storage + cache, and then reinstalling the app, here is the full `adb logcat --pid [app's pid]`:

--------- beginning of main06-30 03:54:46.712 5916 5916 E libprocessgroup: F - Pastebin.com

Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

pastebin.com

dmesg:

https://pastebin.com/yZ9mXLMp

My apologies for the external links. Neither of the texts were small enough to post directly

please, let me know how may I provide "proc/kmsg" and "data/tombstones" as I'm not sure how to do it, and also any other needed information.

Thank you for your work!

Edit:

Update: I had done an upgrade from LineageOS 18.1 from Ivan_Meler, so I tried doing an install from scratch and experienced the same problem.

More information on steps to reproduce:

- Download banking app

- Select "I'm already a client"

- Input a valid identification number

- Input any password (it can be a correct or incorrect password)

- The error happens after pressing "Enter"