Dear Support team,
We are developing CLRC663 application with using NFC Library v05.22.00.
We have a problem with reading Mifare DESFire EV1 tag.
We issue DESFire tag with 3KDES encryption, and we use following API:
phStatus_t phalMfdf_AuthenticateISO(
void * pDataParams,
uint16_t wOption,
uint16_t wKeyNo,
uint16_t wKeyVer,
uint8_t bKeyNoCard,
uint8_t * pDivInput,
uint8_t bDivLen
)
When the program run on FRAME Command and go to the step- [Get the encrypted RndA' into bWorkBuffer], it will occur the error: [MF DF Current authentication status does not allow the requested cmd].
If wee use DES encryption tag, then it will be OK.
We want to know the reason why cause this error. Or there is needed parameters initialization we miss?
Following code we wrote for 3KDES and doesn't work:
case KEY_TYPE_3KDES:
{
Is_Gigatms_Mdf_Setkey(g_tRegisters.s2.DF.bKey ,PH_KEYSTORE_KEY_TYPE_3K3DES ,STORE_KEYNUM_3K3DES);
status = phalMfdf_AuthenticateISO(psalMFDF, PHAL_MFDF_NO_DIVERSIFICATION, STORE_KEYNUM_3K3DES, 0, 0, NULL, 0);
break;
}
Following code we wrote for DES is working fine:
case KEY_TYPE_DES:
Is_Gigatms_Mdf_Setkey(g_tRegisters.s2.DF.bKey ,PH_KEYSTORE_KEY_TYPE_DES ,STORE_KEYNUM_DES);
status = phalMfdf_AuthenticateISO(psalMFDF, PHAL_MFDF_NO_DIVERSIFICATION, STORE_KEYNUM_DES, 0, 0, NULL, 0);
break;
}
Following code we wrote is used to set key:
bool Is_Gigatms_Mdf_Setkey(uint8_t *pKey, uint8_t bKeyType, uint8_t bKeyName)
{
status = phKeyStore_FormatKeyEntry(psKeyStore, bKeyName, bKeyType);
if ((status & PH_ERR_MASK) != PH_ERR_SUCCESS)
return FALSE;
/* Set Key Store */
status = phKeyStore_SetKey(psKeyStore, bKeyName, 0, bKeyType, pKey, 0);
if ((status & PH_ERR_MASK) != PH_ERR_SUCCESS)
return FALSE;
return TRUE;
}
Thanks for viewing this topic.
Best Regards,
David Huang
Hello @david13 ,
The NDA version of NFC reader library contains such kind of demo for DESFire, and you may request it from NXP doc store, but it requires you sign NDA at first, have you contacted your local Disti for help with this?
Have a great day,
Kan
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi Kan,
Yes, I have contacted my local Disti. (see below), but cannot get any help to solve my question.
CENS.com - China Economic News Service - Global Export Media
I have applied for upgrading my access level, but it seems I still cannot get my wanted file. It looks I need to sign NDA first. I will continue to contact my Disti. to solve issue.
Thanks for your information.
Best Regards,
David Huang
Hello David,
Alternatively you may ask for NDA by submitting a private ticket according to the following link:
Hope that helps,
Have a great day,
Kan
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi Kan,
I have received below file today and many thanks for your help.
* Sw672310 - NFC Reader Library V06.10.00 for CLEV6630B including All Software Examples, NDA Version (1.0)
I also asked for [NFC Reader Library V06.10.00] but not get replied.
Do I need to create a new message for asking this V06.10.00 library? Or can you give me this file ID number (such as swxxxxxx)? I can apply for this library to your support team more specifically.
We are now using this library sw375622 NFC-Reader-Library-v052201, I want to upgrade to the same version of the examples.
Best Regards,
David Huang
Hi @david13 ,
Actually NDA version includes all examples from the normal version, so I don't think you have to request the normal version again.
Have a great day,
Kan
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi Kan,
I found there is a folder NxpNfcRdLib that contains my wanted files.
Thanks for your notice and prompt reply.
Best Regards,
David Huang
Hello @david13 ,
You are welcome!
Have a great day,
Kan
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi Kan,
I cannot view the link you put cause I don't have sufficient privileges.
I will try to find the way of asking for NDA by submitting a private ticket .
Thanks for your information.
Best Regards,
David Huang