eXXecutor
eXXecutor

Reputation: 101

Extended APDU Format

I am trying to send a extended APDU to my smartcard reader, but i keep getting

67 00 (Wrong Length)

My extended APU:

00A4010200010400B2012400FE7081FB9F4681F7811DD6333ED4D5F911D64CC5D19D78B923F5C7F07498AE5B515923266845CD3318611504C1F946DEA20E90DAE200587B6F5B3DC5AD64D3B1000E4041FD9D7AA457103F3E726B28F113EE1F32BC2ABA08BE6D08D7EA505A0FF97D8D4CBCBF8411D55A5319442931BF784C7F627D10AF3F7A4FF375F084BB22A11EEAFCD8C535D8BE8463244C62B1FBCD4102598FC2EB9FB457DF2B6DCE2FE86C4DE43BA98404DFCD820622F80A07299066D208E999C12AE29992A76F91CD6ACBDB006E8988401BED65DF3FFAE9178588C568464FC36B1C315856F720810BA8CE92DC88B24A4ED7D352E7247910F0055C20F44D642EDD70F8

Breakdown of the APDU:

CLA: 0x00
INS: 0xA4
P1 : 0x01
P2 : 0x02
LC : 0x00 0x01 0x04 (3 Bytes long)
Data: 00B2012400FE7081FB9F4681F7811DD6333ED4D5F911D64CC5D19D78B923F5C7F07498AE5B515923266845CD3318611504C1F946DEA20E90DAE200587B6F5B3DC5AD64D3B1000E4041FD9D7AA457103F3E726B28F113EE1F32BC2ABA08BE6D08D7EA505A0FF97D8D4CBCBF8411D55A5319442931BF784C7F627D10AF3F7A4FF375F084BB22A11EEAFCD8C535D8BE8463244C62B1FBCD4102598FC2EB9FB457DF2B6DCE2FE86C4DE43BA98404DFCD820622F80A07299066D208E999C12AE29992A76F91CD6ACBDB006E8988401BED65DF3FFAE9178588C568464FC36B1C315856F720810BA8CE92DC88B24A4ED7D352E7247910F0055C20F44D642EDD70F8

I found information about extended APDU's here: https://docs.oracle.com/javacard/3.0.5/prognotes/extended-apdu-format.htm

And according to this reference my extended APDU should be alright. The LC field is 3 bytes because the data length exceeds 255 bytes (0x104 = 260 Bytes).

I cant find out what is wrong with this APDU, is the length not formatted right?

Upvotes: 1

Views: 1011

Answers (0)

Related Questions