Reply To: SAM AV2 ChangeKeyEntry error 0x6982

Forum MIFARE general topics and applications SAM AV2 ChangeKeyEntry error 0x6982 Reply To: SAM AV2 ChangeKeyEntry error 0x6982

Re: SAM AV2 ChangeKeyEntry error 0x6982

23. March 2018 at 11:31
I do an authentication with the key required to change this keyentry. I believe that the authentication is performed correctly.
Below you can find the steps executed. Can you verify if the steps are correct?

Thanks in advance.

AutheticationHost AES-128
Key : 6E40CAFEC6AB18BCB41FFA3F379ACDF6
KeyNo : 0x00
KeyVer : 0x00

CAPDU (8): 80A4000002000000
RAPDU (18): 8573385F5644106B3985FF45EA110B9590AF

Random B ENC (16): 8573385F5644106B3985FF45EA110B95
Random B (16): 272C63E00A540A04F46F60B36AC2EA8A
Random B' (16): 2C63E00A540A04F46F60B36AC2EA8A27
Random A (16): C94F85B6F8ABA21424A044A8FA36347F
Random AB' (32): C94F85B6F8ABA21424A044A8FA36347F2C63E00A540A04F46F60B36AC2EA8A27
Random AB' ENC (32): E9D492D45A4751DB452EE7536DCD0A466DCC004FB8EADAA86F0AB7FFF75144DC

CAPDU (38): 80A4000020E9D492D45A4751DB452EE7536DCD0A466DCC004FB8EADAA86F0AB7FFF75144DC00
RAPDU (18): AB6F8E07EC73588845C5133420B959BD9000

Random A' ENC (16): AB6F8E07EC73588845C5133420B959BD
Random A' (16): 4F85B6F8ABA21424A044A8FA36347FC9
Random A' INT (16): 4F85B6F8ABA21424A044A8FA36347FC9 (calculated internally based on Random A)
Session Key AES (16): C94F85B6272C63E0FA36347F6AC2EA8A
Session IV (16): 00000000000000000000000000000000
AuthenticateHostAES_AV1 OK

ChangeKeyEntry
KeyNo : 0x01
ProMask : 0xFF
Current CEKeyNo : 0x00
Current CEKeyV : 0x00

DataToCRC32 (60): 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FF2001000102
CRC32 value (4) : 37C54191
DataToEncrypt (64): 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FF200100010237C54191
CipheredData (64): 2CE7A49BDEACCCB2D54E3BC9A1529BA019BB2376BE663757D651758E9BF85CDAABB9D6B7EB83D01C68DDD3C8A8602DF47EA022B6CF1B5E9708C6C4841A15F0B7

CAPDU (69): 80C101FF402CE7A49BDEACCCB2D54E3BC9A1529BA019BB2376BE663757D651758E9BF85CDAABB9D6B7EB83D01C68DDD3C8A8602DF47EA022B6CF1B5E9708C6C4841A15F0B7
RAPDU (2): 6982

+ 0  |  - 0