Overview
The NTAG 424 DNA tag was designed by NXP to be a cost effective solution for product authentication. The 424s have a unique feature called SUN (Secure Unique NDEF). This means that every time you tap your phone to one of these tags, you will get a different URL. This is because on every read, the tag will encrypt new information and add this encrypted information to the URL, along with some other cryptographic data.How authenticity is verified (SUN)
We use 4 parameters in the URL to verify a tag’s authenticity.- Tag ID - The ETRNL assigned ID of the tag
- E-Code - A KDF input parameter used for key decryption on the server
- Encrypted Message - An encrypted message containing the UID, counter, and nonce
- CMAC - A mesasge authentication code that is used to verify the integrity of the encrypted data
963352074FC3F2A3B94880BCA905FEF3
Expiring URLs
As mentioned above, the encrypted counter tells us how many times the tag has been tapped after it was programmed, and cannot be tampered with by the end user. If we store the highest counter on our database, we can compare it with the counter that a user is trying to authenticate with. So if ETRNL knows that a tag has been tapped 5 times, and a user is trying to authenticate with an encrypted counter value of 4, we can see that the user is trying to use an old URL. If we look at the table below, we can see that the visit at 3PM is inauthentic because we know the tag has been tapped 3 times, so a URL that has a counter value of 2 is behind.Time | Counter | Authentic |
---|---|---|
1PM | 2 | Yes |
2PM | 3 | Yes |
3PM | 2 | No |
4PM | 4 | Yes |