GP 2.1.1. delete command

Hi!I wan't to delete a key set (tag D2).The smartcard response is a 6700 wrong length.Is it mandatory to append the AID with the tag 4F to the command data?Thanks, globalplayer.
[213 byte] By [globalplayera] at [2007-11-27 5:46:34]
# 1
Paste the APDU trace.
lexdabeara at 2007-7-12 15:29:42 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 2

Okay here is my trace.

The first number is the length in a decimal value.

13 00 A4 04 00 08 A0 00 00 00 03 00 00 00

02 61 70

05 00 C0 00 00 70

114 6F 6E 84 08 A0 00 00 00 03 00 00 00 A5 62 73 2F 06 07 2A 86 48 86 FC 6B 01 60 0C 06 0A 2A 86 48 86 FC 6B 02 02 01 01 63 09 06 07 2A 86 48 86 FC 6B 03 64 0B 06 09 2A 86 48 86 FC 6B 04 01 05 9F 6E 2A 20 50 50 00 40 41 52 73 00 60 70 45 00 00 00 03 00 00 19 12 70 45 19 13 70 45 19 14 70 45 00 00 00 00 00 00 00 00 00 00 00 00 9F 65 01 FF 90 00

13 80 50 00 00 08 01 02 03 04 05 06 07 08

02 61 1C

05 00 C0 00 00 1C

30 00 00 70 45 00 00 00 03 00 00 02 01 4F A1 31 1C F3 86 08 6D 42 9C 0F 89 5E 51 B9 23 90 00

21 84 82 00 00 10 14 F7 CB CC 5F 31 11 19 18 8F 2D 4E 17 76 63 84

02 90 00

05 80 CA 00 E0 00

02 6C 26

05 80 CA 00 E0 26

get data (Key information template, tag number 0x00E0)

40 E0 24 C0 04 01 02 81 10 C0 04 02 02 81 10 C0 04 03 02 81 10 C0 04 01 01 81 10 C0 04 02 01 81 10 C0 04 03 01 81 10 90 00

delete

07 80 E4 00 00 02 D2 01

02 67 00

THanks!

globalplayera at 2007-7-12 15:29:42 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 3
Seems like the DELETE key command is expecting a MAC.Try to use Security Level C_MAC (EXT-AUTH P1=0x01) and if it doesn't work, then C_DECRYPTION (EXT-AUTH P1=0x03).
lexdabeara at 2007-7-12 15:29:42 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 4
HI!The different security leves don't work.The GP says that the Le byte must be present. I have changed this but the response ist still "wrong length".Is it possible that an AID is mandatory or if no AID is present the selected on is choosen?Thanks!
globalplayera at 2007-7-12 15:29:42 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 5
If an AID must be present means that DELETE key is not supported by the card, but only DELETE package/instance.
lexdabeara at 2007-7-12 15:29:42 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 6
Okay! Delete key is supported but only tag D2.Maybe my specification of the card is wrong.Tanks.
globalplayera at 2007-7-12 15:29:42 > top of Java-index,Java Mobility Forums,Consumer and Commerce...