Forum / MIFARE SmartCard IC`s / MIFARE DESFire / DESFire EV2 ChangeFileSettings 0x1E error
Tagged: DESFire EV2 ChangeFileSettings
-
I’m trying change the file settings of a Linear Record File in order to update the additional access rights in a DESFire EV2 card, but I'm getting the 0x1E as return code.
The application and the file were created successfully with the following settings:
### Create application
AID = 111111
KeySett1 = 0x0B
KeySett2 = 0xB4 (Key Settings 3 enabled)
KeySett3 = 0x01 (Application key sets)
AKSVersion = 0
NoKeySets = 2
MaxKeySize = 16 (AES-128)
CAPDU: 90CA0000173322110BB4002000000000000190010056D700000000F000
RAPDU: 9100
CreateApplication AID=112233 OK
### Create linear file
FileNo = 0x02
FileOption = 0x81 (Additional Access Rights + MAC)
AccessRights1 = 0x3110 (Read: 0x03, Write: 0x01, ReadWrite: 0x01, Change: 0x00)
RecordSize = 44
MaxNoOfRecs = 2 (1 for data + 1 required for update command)
CAPDU: 90C100000C0202208110312C000002000000
RAPDU: A81C38E43654B5409100
CreateLinearRecordFile File#2 OK
And the ChangeFileSettings is being done with the following data:
### Change File Settings
Session Key AES (16): 6E4B8F9A83B0B04379F692AB8568713E
IV (16): 00000000000000000000000000000000
AuthenticateAES OK
FileNo = 0x02
FileOption = 0x81
AccessRights1 = 0x3110 (Read: 0x03, Write: 0x01, ReadWrite: 0x01, Change: 0x00)
AccessRights2 = 0x211f (Read: 0x02, Write: 0x01, ReadWrite: 0x01, Change: 0x0F)
AccessRights3 = 0x111f (Read: 0x01, Write: 0x01, ReadWrite: 0x01, Change: 0x0F)
CRC32 Input = 5F02811031021F211F11
CRC32 Value = 5AB92AA1
Data to encipher (16): 811031021F211F115AB92AA180000000 (data + crc32 + padding)
Data ciphered (16): 4C9AA62AD9BBEAC030C2187EEE6E57C5
CAPDU: 905F000011024C9AA62AD9BBEAC030C2187EEE6E57C500
RAPDU: 911E
From the DESFire EV2 documentation, this command must be performed using CommMode.Full (command data ciphered).
What I’m doing wrong?
Thanks in advance.
+ 0 | - 0
Resolved!
To execute this command on an EV2 it is necessary use the AuthenticateEV2First command for authentication.
It is also required to use the EV2 full encryption mode (EV1 mode is not compatible).
+ 1 | - 0
-
AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.