Code: Select all
--> 80 E4 00 00 LC 4F <AID Len> <AID>
<-- 90 00
Since Delegated Management feature is enabled in my card and a Public Token key and a Receipt key are loaded in the ISD, I thought maybe the mentioned error is due to not using the Delete Token in the DELETE APDU command. So I calculated the Delete Token as below:
Global Platform Card Specification 2.2.0.7 : Figure C-8: Delete Token Calculation

Code: Select all
DeleteToken = RSA_Sign("00 00 LC 4F <SSD AID Len> <SSD AID>", TokenPrivateKey)
Code: Select all
--> 80 E4 00 00 <LC+Len(DeleteToken)> 4F <SSD AID Len> <SSD AID> 9E <Len(DeleteToken> <DeleteToken>
<-- 69 85
Update:
I even tried the DELETE APDU command with P2 = 0x80 to delete the SSD with all the related objects. But it failed too:
Code: Select all
--> 80 E4 00 80 09 4F <SSD AID Len> <SSD AID>
<-- 6A 86 (= Incorrect P1 or P2 parameter)
I even tried to send the DELETE APDU command in a secure channel (SecLevel = 03). But again, I received 6985 status words. Which hash algorithm am I need to use to generate the Delete Token? As far as I know, The GP Specification doesn't specify the hash algorithm.
Update3:
The mentioned SSD is instanciated from the card's ISD package with 0E privilege, which means:
Security Domain + Delegated Management + DAP verification