NTAG 5 Link AUTHENTICATE command only errors 0F

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

NTAG 5 Link AUTHENTICATE command only errors 0F

820 Views
F938FAFFA317AB
Contributor I

I'm sort of pulling my hair out here. I cannot get the chip to perform a TAM1 or MAM1 cryptographic command. It will only respond with an 0F error. Here is the configuration of my test chip (yes I've tried multiple different chips).

Device Security Configuration (Block 0x3F)
- DEV_SEC_CONFIG: 0xA2 — AES mode enabled, writable

Global Crypto Header (Block 0x0C, Byte 1)
- NFC_GCH: 0xC1 — Access Right Activated

Crypto Config Header (Block 0x0D, Byte 1)
- NFC_CCH: 0xE7 — Active/Locked

Authentication Limit (Block 0x0E)
- NFC_AUTH_LIMIT: 0 — Unlimited attempts

Key Headers (NFC_KHx)
- KEY0 (0x10): 0xE7 — Active/Locked
- KEY1 (0x12): 0xE7 — Active/Locked
- KEY2 (0x14): 0xE7 — Active/Locked
- KEY3 (0x16): 0xE7 — Active/Locked

Key Privileges (NFC_KPx)
- KEY0 (0x11): 0xFF — All privileges (AREA1_Write, AREA1_Read, CryptoConfig, EAS/AFI, Destroy, Privacy, Write, Read)
- KEY1 (0x13): 0x00 — None
- KEY2 (0x15): 0x00 — None
- KEY3 (0x17): 0x00 — None

Key Storage Blocks
- All key storage blocks (0x20–0x2F) are protected and unreadable

Here is the command I'm sending;

 

The message portion (bytes 12–23) is 12 bytes = 96 bits, as required by the specification.

The response from the chip is always 01 (flags) 0F (error). 

What the heck am I doing wrong here?

 

0 Kudos
Reply
4 Replies

788 Views
EduardoZamora
NXP TechSupport
NXP TechSupport

Hello @F938FAFFA317AB,

Hope you are doing well.

Based on GET NXP SYSTEM INFO response, I can see that your NTAG 5 Link variant is AES capable.

By any chance, is your Reader adding the proper CRC16 to the Authentication command frame?

This may be a basic question; did you provide a valid AES Key before locking the Key being used? Are you able to authenticate with a different KeyID?

Regards,
Eduardo.

0 Kudos
Reply

782 Views
F938FAFFA317AB
Contributor I

Hi Eduardo,

Thank you for your reply.

> By any chance, is your Reader adding the proper CRC16 to the Authentication command frame?

Yes I am primarily using an ACR1552U, however I have tested using an HID OmniKey 5022CL as well as an Android 14 application sending the same commands and getting the same 0F error response.

did you provide a valid AES Key before locking the Key being used? Are you able to authenticate with a different KeyID?

Yes, for ease of testing, key0 is set to all AA bytes, key1 is set to all BB bytes, etc. I first set the operational mode to AES because if you attempt to write keys prior to this, only key0 and part of key1 will retain the data. After writing keys, reading them back, power cycling the chip (removing and placing back on the reader), and reading again, only then did I activate each key. I have tried to send MAM1 and TAM1 via AUTHENTICATE (35h) and specified all keys (00, 01, 02, 03) and all attempts return the same 0F error response. Furthermore, I have tried  TAM1 via unaddressed mode CHALLENGE with 250ms delay and READBUFFER and the data returned appears random and does not decrypt to the correct response.

I am at a loss. I have used multiple NTAG 5 link chips embedded in our product, and even chips on test boards - NTP5332 NFC Tag Click board™ | NTAG 5 Link Click

0 Kudos
Reply

751 Views
F938FAFFA317AB
Contributor I

A little more progress... I have switched to using the HID OmniKey 5022 CL reader since transparent transceive commands are a little more straightforward using it. I was able to use the AUTHENTICATE command to send a TAM1 challenge and receive a response. The MAM1 still returns error 0F however.

 

Sadly MAM1 still fails with 0F response.

 

Response:
0000010F9000

0 Kudos
Reply

818 Views
F938FAFFA317AB
Contributor I

For more information, here is the response to NXP GET SYSTEM INFO (0xAB);

Command sent: 02 AB 04 (flags, command, manufacturer code)

Response received: 00 00 20 00 FF F1 07 64

Byte 0 (0x00) — Response Flags
Success, no error.

Byte 1 (0x00) — Protection Pointer Address
Block address 0x00 (protection starts at block 0).

Byte 2 (0x20) — Protection Pointer Condition
- Bit 5 (WH) = 1: Page 0-H IS write protected
- Bit 4 (RH) = 0: Page 0-H is NOT read protected
- Bit 1 (WL) = 0: Page 0-L is NOT write protected
- Bit 0 (RL) = 0: Page 0-L is NOT read protected

Byte 3 (0x00) — Lock Bits
All features unlocked (PP area, DSFID, EAS, AFI all modifiable).

---
Bytes 4-7 — Feature Flags

Byte 4 (0xFF) — Features Set 0:
- Customer ID (CID) — Supported
- EAS IR (extended inventory) — Supported
- Inventory Read Extended Mode — Supported
- AFI Protection — Supported
- EAS Protection — Supported
- EAS ID — Supported
- NFC Counter — Supported
- User Memory Protection — Supported

Byte 5 (0xF1) — Features Set 1:
- High Bitrates — Supported
- Write CID — Supported
- DESTROY Feature — Supported
- NFC Privacy Mode — Supported
- Persistent Quiet — Not supported
- Originality Signature — Supported

Byte 6 (0x07) — Features Set 2:
- Key Privileges — Supported
- Mutual Authentication (MAM) — Supported
- Tag Authentication (TAM) — Supported

Byte 7 (0x64) — Features Set 3:
- Extended Flags — None
- Interface — GPIO and I2C (11b)
- Number of Keys — 4

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2317028%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3ENTAG%205%20Link%20AUTHENTICATE%20command%20only%20errors%200F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2317028%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CP%3EI'm%20sort%20of%20pulling%20my%20hair%20out%20here.%20I%20cannot%20get%20the%20chip%20to%20perform%20a%20TAM1%20or%20MAM1%20cryptographic%20command.%20It%20will%20only%20respond%20with%20an%200F%20error.%20Here%20is%20the%20configuration%20of%20my%20test%20chip%20(yes%20I've%20tried%20multiple%20different%20chips).%3C%2FP%3E%0A%3CP%3EDevice%20Security%20Configuration%20(Block%200x3F)%3CBR%20%2F%3E-%20DEV_SEC_CONFIG%3A%200xA2%20%E2%80%94%20AES%20mode%20enabled%2C%20writable%3C%2FP%3E%0A%3CP%3EGlobal%20Crypto%20Header%20(Block%200x0C%2C%20Byte%201)%3CBR%20%2F%3E-%20NFC_GCH%3A%200xC1%20%E2%80%94%20Access%20Right%20Activated%3C%2FP%3E%0A%3CP%3ECrypto%20Config%20Header%20(Block%200x0D%2C%20Byte%201)%3CBR%20%2F%3E-%20NFC_CCH%3A%200xE7%20%E2%80%94%20Active%2FLocked%3C%2FP%3E%0A%3CP%3EAuthentication%20Limit%20(Block%200x0E)%3CBR%20%2F%3E-%20NFC_AUTH_LIMIT%3A%200%20%E2%80%94%20Unlimited%20attempts%3C%2FP%3E%0A%3CP%3EKey%20Headers%20(NFC_KHx)%3CBR%20%2F%3E-%20KEY0%20(0x10)%3A%200xE7%20%E2%80%94%20Active%2FLocked%3CBR%20%2F%3E-%20KEY1%20(0x12)%3A%200xE7%20%E2%80%94%20Active%2FLocked%3CBR%20%2F%3E-%20KEY2%20(0x14)%3A%200xE7%20%E2%80%94%20Active%2FLocked%3CBR%20%2F%3E-%20KEY3%20(0x16)%3A%200xE7%20%E2%80%94%20Active%2FLocked%3C%2FP%3E%0A%3CP%3EKey%20Privileges%20(NFC_KPx)%3CBR%20%2F%3E-%20KEY0%20(0x11)%3A%200xFF%20%E2%80%94%20All%20privileges%20(AREA1_Write%2C%20AREA1_Read%2C%20CryptoConfig%2C%20EAS%2FAFI%2C%20Destroy%2C%20Privacy%2C%20Write%2C%20Read)%3CBR%20%2F%3E-%20KEY1%20(0x13)%3A%200x00%20%E2%80%94%20None%3CBR%20%2F%3E-%20KEY2%20(0x15)%3A%200x00%20%E2%80%94%20None%3CBR%20%2F%3E-%20KEY3%20(0x17)%3A%200x00%20%E2%80%94%20None%3C%2FP%3E%0A%3CP%3EKey%20Storage%20Blocks%3CBR%20%2F%3E-%20All%20key%20storage%20blocks%20(0x20%E2%80%930x2F)%20are%20protected%20and%20unreadable%3C%2FP%3E%0A%3CP%3EHere%20is%20the%20command%20I'm%20sending%3B%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EThe%20message%20portion%20(bytes%2012%E2%80%9323)%20is%2012%20bytes%20%3D%2096%20bits%2C%20as%20required%20by%20the%20specification.%3C%2FP%3E%0A%3CP%3EThe%20response%20from%20the%20chip%20is%20always%2001%20(flags)%200F%20(error).%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhat%20the%20heck%20am%20I%20doing%20wrong%20here%3F%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2317452%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20NTAG%205%20Link%20AUTHENTICATE%20command%20only%20errors%200F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2317452%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20Eduardo%2C%3C%2FP%3E%3CP%3EThank%20you%20for%20your%20reply.%3C%2FP%3E%3CP%3E%3CEM%3E%26gt%3B%26nbsp%3BBy%20any%20chance%2C%20is%20your%20Reader%20adding%20the%20proper%20CRC16%20to%20the%20Authentication%20command%20frame%3F%3C%2FEM%3E%3C%2FP%3E%3CP%3EYes%20I%20am%20primarily%20using%20an%20ACR1552U%2C%20however%20I%20have%20tested%20using%20an%20HID%20OmniKey%205022CL%20as%20well%20as%20an%20Android%2014%20application%20sending%20the%20same%20commands%20and%20getting%20the%20same%200F%20error%20response.%3C%2FP%3E%3CP%3E%26gt%3B%26nbsp%3B%3CSPAN%3Edid%20you%20provide%20a%20valid%20AES%20Key%20before%20locking%20the%20Key%20being%20used%3F%20Are%20you%20able%20to%20authenticate%20with%20a%20different%20KeyID%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EYes%2C%20for%20ease%20of%20testing%2C%20key0%20is%20set%20to%20all%20AA%20bytes%2C%20key1%20is%20set%20to%20all%20BB%20bytes%2C%20etc.%20I%20first%20set%20the%20operational%20mode%20to%20AES%20because%20if%20you%20attempt%20to%20write%20keys%20prior%20to%20this%2C%20only%20key0%20and%20part%20of%20key1%20will%20retain%20the%20data.%20After%20writing%20keys%2C%20reading%20them%20back%2C%20power%20cycling%20the%20chip%20(removing%20and%20placing%20back%20on%20the%20reader)%2C%20and%20reading%20again%2C%20only%20then%20did%20I%20activate%20each%20key.%20I%20have%20tried%20to%20send%20MAM1%20and%20TAM1%20via%20AUTHENTICATE%20(35h)%20and%20specified%20all%20keys%20(00%2C%2001%2C%2002%2C%2003)%20and%20all%20attempts%20return%20the%20same%200F%20error%20response.%20Furthermore%2C%20I%20have%20tried%26nbsp%3B%20TAM1%20via%20unaddressed%20mode%20CHALLENGE%20with%20250ms%20delay%20and%20READBUFFER%20and%20the%20data%20returned%20appears%20random%20and%20does%20not%20decrypt%20to%20the%20correct%20response.%3C%2FP%3E%3CP%3EI%20am%20at%20a%20loss.%20I%20have%20used%20multiple%20NTAG%205%20link%20chips%20embedded%20in%20our%20product%2C%20and%20even%20chips%20on%20test%20boards%20-%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.mikroe.com%2Fntag-5-link-click%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3ENTP5332%20NFC%20Tag%20Click%20board%E2%84%A2%20%7C%20NTAG%205%20Link%20Click%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2317401%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20NTAG%205%20Link%20AUTHENTICATE%20command%20only%20errors%200F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2317401%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F259858%22%20target%3D%22_blank%22%3E%40F938FAFFA317AB%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EHope%20you%20are%20doing%20well.%3C%2FP%3E%0A%3CP%3EBased%20on%20GET%20NXP%20SYSTEM%20INFO%20response%2C%20I%20can%20see%20that%20your%20NTAG%205%20Link%20variant%20is%20AES%20capable.%3C%2FP%3E%0A%3CP%3EBy%20any%20chance%2C%20is%20your%20Reader%20adding%20the%20proper%20CRC16%20to%20the%20Authentication%20command%20frame%3F%3C%2FP%3E%0A%3CP%3EThis%20may%20be%20a%20basic%20question%3B%20did%20you%20provide%20a%20valid%20AES%20Key%20before%20locking%20the%20Key%20being%20used%3F%20Are%20you%20able%20to%20authenticate%20with%20a%20different%20KeyID%3F%3C%2FP%3E%0A%3CP%3ERegards%2C%3CBR%20%2F%3EEduardo.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2317034%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20NTAG%205%20Link%20AUTHENTICATE%20command%20only%20errors%200F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2317034%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EFor%20more%20information%2C%20here%20is%20the%20response%20to%26nbsp%3BNXP%20GET%20SYSTEM%20INFO%20(0xAB)%3B%3C%2FP%3E%3CP%3ECommand%20sent%3A%2002%20AB%2004%20(flags%2C%20command%2C%20manufacturer%20code)%3C%2FP%3E%3CP%3EResponse%20received%3A%2000%2000%2020%2000%20FF%20F1%2007%2064%3C%2FP%3E%3CP%3EByte%200%20(0x00)%20%E2%80%94%20Response%20Flags%3CBR%20%2F%3ESuccess%2C%20no%20error.%3C%2FP%3E%3CP%3EByte%201%20(0x00)%20%E2%80%94%20Protection%20Pointer%20Address%3CBR%20%2F%3EBlock%20address%200x00%20(protection%20starts%20at%20block%200).%3C%2FP%3E%3CP%3EByte%202%20(0x20)%20%E2%80%94%20Protection%20Pointer%20Condition%3CBR%20%2F%3E-%20Bit%205%20(WH)%20%3D%201%3A%20Page%200-H%20IS%20write%20protected%3CBR%20%2F%3E-%20Bit%204%20(RH)%20%3D%200%3A%20Page%200-H%20is%20NOT%20read%20protected%3CBR%20%2F%3E-%20Bit%201%20(WL)%20%3D%200%3A%20Page%200-L%20is%20NOT%20write%20protected%3CBR%20%2F%3E-%20Bit%200%20(RL)%20%3D%200%3A%20Page%200-L%20is%20NOT%20read%20protected%3C%2FP%3E%3CP%3EByte%203%20(0x00)%20%E2%80%94%20Lock%20Bits%3CBR%20%2F%3EAll%20features%20unlocked%20(PP%20area%2C%20DSFID%2C%20EAS%2C%20AFI%20all%20modifiable).%3C%2FP%3E%3CP%3E---%3CBR%20%2F%3EBytes%204-7%20%E2%80%94%20Feature%20Flags%3C%2FP%3E%3CP%3EByte%204%20(0xFF)%20%E2%80%94%20Features%20Set%200%3A%3CBR%20%2F%3E-%20Customer%20ID%20(CID)%20%E2%80%94%20Supported%3CBR%20%2F%3E-%20EAS%20IR%20(extended%20inventory)%20%E2%80%94%20Supported%3CBR%20%2F%3E-%20Inventory%20Read%20Extended%20Mode%20%E2%80%94%20Supported%3CBR%20%2F%3E-%20AFI%20Protection%20%E2%80%94%20Supported%3CBR%20%2F%3E-%20EAS%20Protection%20%E2%80%94%20Supported%3CBR%20%2F%3E-%20EAS%20ID%20%E2%80%94%20Supported%3CBR%20%2F%3E-%20NFC%20Counter%20%E2%80%94%20Supported%3CBR%20%2F%3E-%20User%20Memory%20Protection%20%E2%80%94%20Supported%3C%2FP%3E%3CP%3EByte%205%20(0xF1)%20%E2%80%94%20Features%20Set%201%3A%3CBR%20%2F%3E-%20High%20Bitrates%20%E2%80%94%20Supported%3CBR%20%2F%3E-%20Write%20CID%20%E2%80%94%20Supported%3CBR%20%2F%3E-%20DESTROY%20Feature%20%E2%80%94%20Supported%3CBR%20%2F%3E-%20NFC%20Privacy%20Mode%20%E2%80%94%20Supported%3CBR%20%2F%3E-%20Persistent%20Quiet%20%E2%80%94%20Not%20supported%3CBR%20%2F%3E-%20Originality%20Signature%20%E2%80%94%20Supported%3C%2FP%3E%3CP%3EByte%206%20(0x07)%20%E2%80%94%20Features%20Set%202%3A%3CBR%20%2F%3E-%20Key%20Privileges%20%E2%80%94%20Supported%3CBR%20%2F%3E-%20Mutual%20Authentication%20(MAM)%20%E2%80%94%20Supported%3CBR%20%2F%3E-%20Tag%20Authentication%20(TAM)%20%E2%80%94%20Supported%3C%2FP%3E%3CP%3EByte%207%20(0x64)%20%E2%80%94%20Features%20Set%203%3A%3CBR%20%2F%3E-%20Extended%20Flags%20%E2%80%94%20None%3CBR%20%2F%3E-%20Interface%20%E2%80%94%20GPIO%20and%20I2C%20(11b)%3CBR%20%2F%3E-%20Number%20of%20Keys%20%E2%80%94%204%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2318055%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20NTAG%205%20Link%20AUTHENTICATE%20command%20only%20errors%200F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2318055%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EA%20little%20more%20progress...%20I%20have%20switched%20to%20using%20the%20HID%20OmniKey%205022%20CL%20reader%20since%20transparent%20transceive%20commands%20are%20a%20little%20more%20straightforward%20using%20it.%20I%20was%20able%20to%20use%20the%20AUTHENTICATE%20command%20to%20send%20a%20TAM1%20challenge%20and%20receive%20a%20response.%20The%20MAM1%20still%20returns%20error%200F%20however.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ESadly%20MAM1%20still%20fails%20with%200F%20response.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EResponse%3A%3CBR%20%2F%3E0000010F9000%3C%2FP%3E%3C%2FLINGO-BODY%3E