Forum › MIFARE SmartCard IC`s › MIFARE DESFire › Problem to change PICC master key settings (AES). › Reply To: Problem to change PICC master key settings (AES).
Hello, I'm facing the same issue in PICC Change key settings, when PICC master key is of AES type.
My cryptogram logic works fine in Change PICC/Application keys.
Can you guide me, where I'm doing wrong?
A preceding AES authentication got success with PICC Master Key.
AESEncryption AES = new AESEncryption();
IV = "00000000000000000000000000000000";
string CRC32_For_Data = Crc32.Compute("540B"); //CRC calculation for data
CRC32_For_Data = CRC32_For_Data .Substring(6,2) + CRC32_For_Data .Substring(4,2) + CRC32_For_Data .Substring(2,2) + CRC32_For_Data .Substring(0,2); //To send LSB first
string DataWithCRC = PaddingDesFire(CRC32_For_Data, 32, "00"); //to make data of 16 bytes
string EncipheredData = AES.AESEncipher(DataWithCRC, LastSessionKeyAES, IV);
APDUCommand = “54” + EncipheredData; // ChangeKeyCommand + EncipheredData, which contains New KeySettings (0x0B)
CardResponse = Transmit(ReaderName, APDUCommand, “T1”); // it gives 0x1E response, either I send MSB or LSB first
Thank you in advance
My cryptogram logic works fine in Change PICC/Application keys.
Can you guide me, where I'm doing wrong?
A preceding AES authentication got success with PICC Master Key.
AESEncryption AES = new AESEncryption();
IV = "00000000000000000000000000000000";
string CRC32_For_Data = Crc32.Compute("540B"); //CRC calculation for data
CRC32_For_Data = CRC32_For_Data .Substring(6,2) + CRC32_For_Data .Substring(4,2) + CRC32_For_Data .Substring(2,2) + CRC32_For_Data .Substring(0,2); //To send LSB first
string DataWithCRC = PaddingDesFire(CRC32_For_Data, 32, "00"); //to make data of 16 bytes
string EncipheredData = AES.AESEncipher(DataWithCRC, LastSessionKeyAES, IV);
APDUCommand = “54” + EncipheredData; // ChangeKeyCommand + EncipheredData, which contains New KeySettings (0x0B)
CardResponse = Transmit(ReaderName, APDUCommand, “T1”); // it gives 0x1E response, either I send MSB or LSB first
Thank you in advance
+ 0
|
- 0