BlockchainSecurity2Go-Android icon indicating copy to clipboard operation
BlockchainSecurity2Go-Android copied to clipboard

Unwise to change key number on failure

Open joseluu opened this issue 4 years ago • 0 comments

In file NfcUtils.java around line 79, the software allocates a new key in case of failure when using the currently selected key.

This does not fit with the current user interface, as the newKeyIndex is not shown nor reflected by the user's choice from the UI. So if the card reader, misreads or mistransmits the APDU or if the user gesture with the card is too fast, then another key is used, another address is shown at the user interface without the ability to know it and reach it for subsequent transactions.

I removed the if (e.getSw1Sw2() == SW_KEY_WITH_IDX_NOT_AVAILABLE) { ...

joseluu avatar Feb 23 '21 16:02 joseluu