i have some issues with reading the IBAN number from the german CashCards (also known as Geldkarte). I can communicate with my card, and i get some informations from it. but i don`t know which commandApdu i must send to the card, to get the IBAN number...
The application runs on Java 7 and i use the java.smartcardio api
Protocoll is T=1
my commandApdu to get the date looks like this:
byte[] commandBytes = new byte[]{0x00, (byte)0xa4, 0x04, 0x00, 0x07, (byte)0xa0, 0x00, 0x00, 0x00,0x04, 0x30, 0x60, 0x00};
the information i get is:
6F 32 84 07 A0 00 00 00 04 30 60 A5 27 50 07 4D 61 65 73 74 72 6F 87 01 03 9F 38 09 9F 33 02 9F 35 01 9F 40 01 5F 2D 04 64 65 65 6E BF 0C 05 9F 4D 02 19 0A
Can anyone tell me the correct apdu for getting the IBAN number?
i am sorry if i forgott some information needed, but this is my first question in this board :-)
i solved my problem after a long time this way: At first send a command to the card, to select the aid (application identifier):
then i hat to raise the security-level:
last thing to do was to read the record:
regards Andreas
I would like to add, the IBAN returning from the card is not straightforward.
The IBAN returned is that of the main Bank, and then the account number from the card holder in other record. Therefore one must come out with the right IBAN through code as the check digit has to be calculated as seen here
Since in records we find Country Code (DE), Bankleitzahl BLZ (8 Digits) and Account Number (10 digits), Check Digit can be calculated through
Source (In German): here
Okay so the card has sent back this:
Which translates to:
So now you've selected the application you'll want to send a series of 'Read Record' commands to it to get the data out of it like (Card number, expiry date, card holder name, IBAN (if it's in there, haven't seen it before)). The structure of the 'Read Record' command can be found in EMV Book 3 however here's some rough psuedocode as to what your Read Record loop should look like. Off the top of my head I usually set NUM_SFIS to 5 and NUM_RECORDS to 16 as there's not usually anything past these points.