Hello @frederic_surleau
For the below issues, I have received reply from the internal experts. The following is from expert suggestions:
There is the KillAuthentication command, which will invalidate all authentications, or only the PICC Auth (P1 param)
simply inject that one between 3 and 4, that is the correct solution, and will bring the dataparams in a defined state.
Hope the above reply could help you.
Hi, I use a PC/SC reader to personalize SAM AV2 / AV3 via a windows software I wrote using NXP Reader Library.
The SAM will then be used to authenticate Mifare DESFire EV1 cards.
In the process of personalizing the SAM, I need the change Key Entries, for example, the entry n°0 as host / unlock key.
- Call phhalHw_SamAV2_Cmd_SAM_GetKeyEntry to determine key type and key versions
- Authenticate with default key with authType 0x02 to encipher host channel.
- Call phhalHw_SamAV2_Cmd_SAM_ChangeKeyEntry to change entry.
- Call phhalHw_SamAV2_Cmd_SAM_GetKeyEntry to check all is OK.
After step 3, the Host is no longer authenticated with entry 0 because the key changed.
So for Step 4 to succed, I need to force pDataParams->bAuthType to 0x00 (plain).
Thats not a big deal to do, but it was confusing to no be able to use phhalHw_SamAV2_Cmd_SAM_GetKeyEntry. This function is supposed to be available at any time.
So I imagine that phhalHw_SamAV2_Cmd_SAM_ChangeKeyEntry could reset AuthType in case the authentication is invalidated.
Regards,
Fred.