Toporin / SatochipApplet

The open source hardware wallet smartcard - Satochip.io
https://satochip.io/shop
GNU Affero General Public License v3.0
120 stars 44 forks source link

ImportKey method has non-standard behaviour #6

Closed kuhy closed 4 years ago

kuhy commented 4 years ago

The problem is in the following code snippet:

if (key_size != LENGTH_EC_FP_256)
    ISOException.throwIt(key_size);

This is non-standard behavior that violates ISO7816. For instance, when I send the following APDU to the card, the response will be 9000 (= command correct). However, this command is invalid (wrong length).

B03200002C000C900000000000000000201111111111111111111111111111111111111111111111111111111111111111
Toporin commented 4 years ago

Hi,

Thanks for raising this issue. We are working on a patch release with various minor issues. We will address this and keep you informed.