Titanium JIRA Archive
Appcelerator Community (AC)

[AC-5560] Android: Ti.identity failure to encrypt the data with the generated key.

GitHub Issuen/a
TypeImprovement
Priorityn/a
StatusResolved
ResolutionNeeds more info
Resolution Date2018-03-21T22:59:19.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsandroid, android-6, authentication, fingerprint, ti.identity, touchid
ReporterAyoub Zamouchi
AssigneeShak Hossain
Created2018-01-30T09:37:20.000+0000
Updated2018-03-22T17:43:59.000+0000

Description

In Ti.identity module, there is an additional step after a fingerprint validation success, which is to try to encrypt some data with the generated key in createKey method . [See onAuthenticationSucceeded method in FingerPrintHelper.java](https://github.com/azamouchi/titanium-identity/blob/63e0bd48d234b6211095007dd0750da9bf840d8c/android/src/ti/identity/FingerPrintHelper.java#L149) [See tryEncrypt method in FingerPrintHelper.java](https://github.com/azamouchi/titanium-identity/blob/63e0bd48d234b6211095007dd0750da9bf840d8c/android/src/ti/identity/FingerPrintHelper.java#L118) The problem is, on some android devices running Android 6.0 the encryption of the data with the previously generated key raise an exception, which leads to fails the authentification. As mentioned in this [stackOverflow thread](https://stackoverflow.com/questions/36043912/error-after-fingerprint-touched-on-samsung-phones-android-security-keystoreexce), the problem seems to be encountered randomly on some android devices running Android 6 like Samsung, OnPlus, in my case i face the problem every time i try to authenticate with [this device](https://www.gsmarena.com/wiko_u_feel_lite-8204.php), which make the fingerprint authentification impossible. My question : Is this encryption step mandatory ? can we make it optional ? since the onAuthenticationSucceeded method has been already called, which means that the fingerprint verification is OK.

Attachments

FileDateSize
Samsung_Galaxy_S6_Android_7_0_0.png2018-02-04T19:39:59.000+000047600
testTouchId.zip2018-02-04T19:43:44.000+000010014362
Wiko_U_FEEL_LITE_Android_6_0_0.png2018-02-04T19:40:02.000+000032430

Comments

  1. Sharif AbuDarda 2018-01-31

    Hello, Can you please provide a full reproducible code/project that we can test to validate the issue on some of those mentioned devices? Thanks.
  2. Ayoub Zamouchi 2018-02-04

    Hi, Sorry for the delay. You can find attached, a simple project that uses the packaged module version of ti.identity (SKD 7.0.1.GA). i tested the app on a [Wiko device](https://www.gsmarena.com/wiko_u_feel_lite-8204.php) (Android 6.0.0) and A Samsung Galaxy S6 (Android 7.0.0), the problem occur on Wiko and not on Samsung. (See attached screen shots) !Samsung_Galaxy_S6_Android_7_0_0.png|thumbnail! !Wiko_U_FEEL_LITE_Android_6_0_0.png|thumbnail! Test project : [^testTouchId.zip]
  3. Ayoub Zamouchi 2018-02-23

    Any news ? have you been able to reproduce the problem ?
  4. Sharif AbuDarda 2018-02-23

    Hello, So far we are unable to reproduce the issue. We don't have your specific device. Can you run a trace log of the issue? Thanks.
  5. Sharif AbuDarda 2018-03-16

    Hello [~azamouchi], Can you follow up here? Whats the update of your issue?
  6. Gary Mathews 2018-03-22

    I notice you linked to a fork of ti.identity, are you using this fork? If so, try using the latest [ti.identity-android-2.1.0.zip](https://github.com/appcelerator-modules/titanium-identity/releases/download/android-2.1.0/ti.identity-android-2.1.0.zip) release

JSON Source