I received the G+D SmartCafé Expert 144k Dual smart-card. After some failed tries to authenticate to the card-manager, I managed to successfully authenticate using the following trick:

The point was that the card uses the EMV CPS 1.1 Key Derivation Scheme for the key calculation, which has to be specified in gpshell.

open_sc -scp 2 -scpimpl 0x15 -security 1 -keyind 0 -keyver 0 -key 404142434445464748494a4b4c4d4e4f -keyDerivation emvcps11

If you have a smart card and you are not sure what scpimpl or scp protocol is used then you can use the following GPShell code:

mode_211
enable_trace
establish_context
card_connect
get_data -identifier 0x66
card_disconnect
release_context
you will receive an answer from the smart card that will look like this:
Response <--664C734A06072A864886FC6B01600C060A2A864886FC6B02020101630906072A864886
FC6B03640B06092A864886FC6B040215650B06092B8510864864020103660C060A2B060104012A026E01029000
The response apdu can be decomposed the following way:
664C
734A 0607 2A864886FC6B 01
600C 060A 2A864886FC6B 02 02 01 01
6309 0607 2A864886FC6B 03
640B 0609 2A864886FC6B 04 02 15 <--- SCP 0x02 IMPL 0x15
650B 0609 2B8510864864 02 01 03
660C 060A 2B060104012A 026E0102
9000

 
The scp and impl parameters of the open_sc commands have to be adapted accordingly. Again be sure what your doing as the cards will be locked after a certain number of failed attempts to authenticate.

Share →

Leave a Reply

Your email address will not be published. Required fields are marked *