Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Fingerprint Sensor instead of PIN #38

Open
cgebe opened this issue Jun 21, 2018 · 13 comments
Open

Use Fingerprint Sensor instead of PIN #38

cgebe opened this issue Jun 21, 2018 · 13 comments

Comments

@cgebe
Copy link
Contributor

cgebe commented Jun 21, 2018

From @rico666 on October 12, 2017 16:31

For devices that offer a Fingerprint sensor, allow the user to use that instead of a PIN.

Copied from original issue: PoC-Consortium/burstcoin-mobile-doc#31

@cgebe
Copy link
Contributor Author

cgebe commented Jun 21, 2018

From @ElCarlosCZ on January 12, 2018 23:42

Why not add both? ;-)
Im also voting for fingerprint support

@cgebe
Copy link
Contributor Author

cgebe commented Jun 21, 2018

From @ndawad on January 14, 2018 19:31

Why not... Sound like a great idea

@cgebe
Copy link
Contributor Author

cgebe commented Jun 21, 2018

From @harry1453 on March 4, 2018 13:11

I would be happy to work on developing this if the source code was out there.

@cgebe
Copy link
Contributor Author

cgebe commented Jun 21, 2018

@harry1453 This will soon be the case!

@cgebe
Copy link
Contributor Author

cgebe commented Jun 21, 2018

From @harry1453 on March 4, 2018 13:25

@cgebe Thanks!! Any idea of a timescale?

@cgebe
Copy link
Contributor Author

cgebe commented Jun 21, 2018

A matter of days.

@cgebe
Copy link
Contributor Author

cgebe commented Jun 21, 2018

From @harry1453 on March 4, 2018 13:37

Thanks! Would you mind letting me know when it happens? I am very keen to help out on this

@cgebe
Copy link
Contributor Author

cgebe commented Jun 21, 2018

You will be able to find the repo in our github org in addition to an announcement on twitter!

@cgebe
Copy link
Contributor Author

cgebe commented Jun 21, 2018

From @harry1453 on March 4, 2018 15:30

Thanks. On the actual issue, I understand the pin is not stored locally. This makes sense however if we were to enable fingerprint authentication either the pin would have to be stored locally to decrypt the passphrase (which is insecure) or the fingerprint data would have to be used to encrypt the passphrase, which would result in the user having to choose between using fingerprint or using PIN.

So the potential solutions are using an unencrypted copy of the passphrase and having the authentication at a GUI level only, keeping a plaintext copy of the pin in the application storage space, which is user-accessible on rooted devices, or some other solution such as this project, which could potentially allow us to store two copies of the encrypted passphrase: one encrypted with the PIN, one encrypted with the fingerprint. I will look into it!

@cgebe
Copy link
Contributor Author

cgebe commented Jun 21, 2018

Hey, thanks for the suggestion. Im happy to discuss this. Take into account, that at the moment the passphrase is saved encrypted (AES) with the following key: sha256(pin + device.id). The pin is not saved at all and therefore needs to be entered everytime an authorized action needs to be executed.

In order to not change the current process at all, an option would be saving the pin or the key (sha256(pin + device.id) encrypted with a key based on a constant provided by the fingerprint sensor and save it in an additional field of the account object. I need to look into the fingerprint library in order to verify this possible solution.

Edit: fyi, i do not want to replace the pin with the fingerprint process completely, just offer it as an alternative.

@cgebe
Copy link
Contributor Author

cgebe commented Jun 21, 2018

From @harry1453 on March 4, 2018 16:39

Edit: fyi, i do not want to replace the pin with the fingerprint process completely, just offer it as an alternative.

That makes absolute sense as a significant proportion of devices do not have fingerprint sensors.

Saving sha256(pin + device.id) encrypted with the fingerprint data sounds like it would work nicely, however the NativeScript (I gather from other posts around here this is what we are using) library has only this (line 112):

onAuthenticationSuccess(): void {
    resolve();
}

There are multiple branching options in that file but all of them end up with a true or false return value.

I suggest that we store on the device a separate copy of sha256(device.id) which allows for the functionality to be added and then we rely on a programmatic block to prevent bypassing the PIN. We could potentially increase security by using sha256(device.id + (walletNumericID)) to prevent direct theft of the wallet without access to the app first, however both of these are susceptible to attacks if the device is rooted, as this allows direct access to the application's private data directory.

Also, are you on the Telegram group?

@cgebe
Copy link
Contributor Author

cgebe commented Jun 21, 2018

Sounds reasonable, i will look into this as well in the next couple of days. I would like have the fingerprint verification as an extension. So to say, it will somehow result in storing the pin or a derivation of the same encrypted in local storage. Unfortunately, by seeing your reference, the fingerprint library obviously cannot provide a constant footprint dynamically generated when touching the sensor (which would be the best case, to prevent an unhindered decryption in case the internal storage gets accessed or stolen by an attacker). I need to evaluate the options we have.

https://discord.gg/xenZTNw for direct communication. @cgb

@cgebe
Copy link
Contributor Author

cgebe commented Jun 21, 2018

From @harry1453 on March 4, 2018 17:25

Thanks for your help. I would love to be able to address or help to address this issue when the source code becomes open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant