{"action":"created","issue":{"url":"https://api.github.com/repos/square/whorlwind/issues/50","repository_url":"https://api.github.com/repos/square/whorlwind","labels_url":"https://api.github.com/repos/square/whorlwind/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/square/whorlwind/issues/50/comments","events_url":"https://api.github.com/repos/square/whorlwind/issues/50/events","html_url":"https://github.com/square/whorlwind/issues/50","id":375292065,"node_id":"MDU6SXNzdWUzNzUyOTIwNjU=","number":50,"title":"Crash when attempting to decrypt after adding new fingerprints","user":{"login":"xxfast","id":13775137,"node_id":"MDQ6VXNlcjEzNzc1MTM3","avatar_url":"https://avatars0.githubusercontent.com/u/13775137?v=4","gravatar_id":"","url":"https://api.github.com/users/xxfast","html_url":"https://github.com/xxfast","followers_url":"https://api.github.com/users/xxfast/followers","following_url":"https://api.github.com/users/xxfast/following{/other_user}","gists_url":"https://api.github.com/users/xxfast/gists{/gist_id}","starred_url":"https://api.github.com/users/xxfast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xxfast/subscriptions","organizations_url":"https://api.github.com/users/xxfast/orgs","repos_url":"https://api.github.com/users/xxfast/repos","events_url":"https://api.github.com/users/xxfast/events{/privacy}","received_events_url":"https://api.github.com/users/xxfast/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-30T02:25:44Z","updated_at":"2018-11-21T16:05:47Z","closed_at":null,"author_association":"NONE","body":"### Steps to reproduce\r\n\r\n1. Open the sample app and register at least one value\r\n2. Close the app and head to settings to add additional fingerprints \r\n3. Reopen the sample app and try to read the previously stored value.. and it will crash\r\n\r\n### A few issues\r\n\r\n1. Upon reading the previously stored value, it returns a `NEEDS_AUTH` instead of an error state, (because new fingerprints was added)\r\n2. If you use any finger other than whats registered, its returns a `RECOVERABLE_ERROR` and asking users to retry - even though the number of fingerprints had changed\r\n3. And it crashes.. when you try to use any of the registered fingers\r\n\r\n### Crashlog\r\n```\r\n2018-10-30 13:24:11.113 26955-26955/com.squareup.whorlwind.sample I/Whorlwind: Failed to decrypt.\r\n    javax.crypto.IllegalBlockSizeException\r\n        at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:519)\r\n        at javax.crypto.Cipher.doFinal(Cipher.java:1736)\r\n        at com.squareup.whorlwind.FingerprintAuthOnSubscribe$2.onAuthenticationSucceeded(FingerprintAuthOnSubscribe.java:138)\r\n        at android.hardware.fingerprint.FingerprintManager$MyHandler.sendAuthenticatedSucceeded(FingerprintManager.java:1314)\r\n        at android.hardware.fingerprint.FingerprintManager$MyHandler.handleMessage(FingerprintManager.java:1224)\r\n        at android.os.Handler.dispatchMessage(Handler.java:105)\r\n        at android.os.Looper.loop(Looper.java:164)\r\n        at android.app.ActivityThread.main(ActivityThread.java:6938)\r\n        at java.lang.reflect.Method.invoke(Native Method)\r\n        at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)\r\n        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)\r\n     Caused by: android.security.KeyStoreException: Key user not authenticated\r\n        at android.security.KeyStore.getKeyStoreException(KeyStore.java:1137)\r\n        at android.security.keystore.KeyStoreCryptoOperationChunkedStreamer.update(KeyStoreCryptoOperationChunkedStreamer.java:132)\r\n        at android.security.keystore.KeyStoreCryptoOperationChunkedStreamer.doFinal(KeyStoreCryptoOperationChunkedStreamer.java:217)\r\n        at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:506)\r\n        at javax.crypto.Cipher.doFinal(Cipher.java:1736) \r\n        at com.squareup.whorlwind.FingerprintAuthOnSubscribe$2.onAuthenticationSucceeded(FingerprintAuthOnSubscribe.java:138) \r\n        at android.hardware.fingerprint.FingerprintManager$MyHandler.sendAuthenticatedSucceeded(FingerprintManager.java:1314) \r\n        at android.hardware.fingerprint.FingerprintManager$MyHandler.handleMessage(FingerprintManager.java:1224) \r\n        at android.os.Handler.dispatchMessage(Handler.java:105) \r\n        at android.os.Looper.loop(Looper.java:164) \r\n        at android.app.ActivityThread.main(ActivityThread.java:6938) \r\n        at java.lang.reflect.Method.invoke(Native Method) \r\n        at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327) \r\n        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374) \r\n```\r\nEDIT: ITS A SAMSUNG!!!"},"comment":{"url":"https://api.github.com/repos/square/whorlwind/issues/comments/440720121","html_url":"https://github.com/square/whorlwind/issues/50#issuecomment-440720121","issue_url":"https://api.github.com/repos/square/whorlwind/issues/50","id":440720121,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MDcyMDEyMQ==","user":{"login":"Rickard80","id":37076858,"node_id":"MDQ6VXNlcjM3MDc2ODU4","avatar_url":"https://avatars0.githubusercontent.com/u/37076858?v=4","gravatar_id":"","url":"https://api.github.com/users/Rickard80","html_url":"https://github.com/Rickard80","followers_url":"https://api.github.com/users/Rickard80/followers","following_url":"https://api.github.com/users/Rickard80/following{/other_user}","gists_url":"https://api.github.com/users/Rickard80/gists{/gist_id}","starred_url":"https://api.github.com/users/Rickard80/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rickard80/subscriptions","organizations_url":"https://api.github.com/users/Rickard80/orgs","repos_url":"https://api.github.com/users/Rickard80/repos","events_url":"https://api.github.com/users/Rickard80/events{/privacy}","received_events_url":"https://api.github.com/users/Rickard80/received_events","type":"User","site_admin":false},"created_at":"2018-11-21T16:05:47Z","updated_at":"2018-11-21T16:05:47Z","author_association":"NONE","body":"This usually happens on Samsung, and sometimes LG phones. It's a bug in their operating system. I think the same thing happens if you remove a fingerprint after installing the app. Here are two models that crashes:\r\n\r\nAndroid: 8.0.0\r\nManufacturer: samsung\r\nModel: SM-G950F\r\n\r\nAndroid: 8.0.0\r\nManufacturer: samsung\r\nModel: SM-G930F"}}
{"actor":{"display_login":"Rickard80"}}