Hello everyone,
I am using the OM26630FDK develop kit to learn how to use NFC-Reader Library-v071300-NDA-for-CLRC663,.The problem I am currently facing is that when using example 10 to read and write desfire cards, whether it is EV1, EV2, or EV3, they can only read and write blank empty cards because the master key is 0x00. When using cards with non-zero keys, key authentication fails. I have changed the key in the code to the correct key, but still cannot authenticate successfully. For example, I use a desfire EV1 card, which can successfully verify the 16-byte master key "key0" using the AES encryption method on the PC side of other card readers, and can also read and write normally. However, this card fails the AES authentication on the development kit, even though it uses the same AES key as the PC card reading tool.
Additionally, I also attempted to modify the values of several parameters in the function phalMfdfEVx_Authenticate.
phStatus_t phalMfdfEVx_Authenticate ( void * pDataParams,
uint16_t wOption,
uint16_t wKeyNo,
uint16_t wKeyVer,
uint8_t bKeyNoCard,
uint8_t * pDivInput,
uint8_t bDivLen
)
I tried modifying the values of the two parameters wKeyNo and wKeyVer, which correspond to the macro definitions AES128_KEY_ADDRESS and AES128_KEY_VERSION, but neither AES verification succeeded after the modification.
In the example code, if we want Example 10 to successfully authenticate with AES and perform normal read and write operations, besides modifying the array value of the correct master key, what other modifications are needed?