Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thank you - this is NOT an issue #5

Open
MichaelsPlayground opened this issue Aug 14, 2023 · 0 comments
Open

Thank you - this is NOT an issue #5

MichaelsPlayground opened this issue Aug 14, 2023 · 0 comments

Comments

@MichaelsPlayground
Copy link

Dear Anthony, this is just a short "thank you" message on your PHP-Crypt library, especially the "CMAC" part.

I'm developing an Android app that works with NFC tags that are enabled for "Secure Dynamic Messaging" (SDM) [another naming is "SUN Secure Unique NFC"]. These NFC tags like "Mifare DESFire EV3" or "NTAG 424 DNA" can dynamically generate a link to a backend server that can decrypt the AES encrypted data on the tag.

This feature enables the tag holder to work with any IOS or Android devices that are NFC enabled and have an active internet connection (so nearly all today's devices) to get a "result" without having a dedicated app installed on the device.

You can test this feature by using a link to a test backend server (it's not mine): https://sdm.nfcdeveloper.com/

If you are using a testing URL like: https://sdm.nfcdeveloper.com/tag?picc_data=FD91EC264309878BE6345CBE53BADF40&enc=CEE9A53E3E463EF1F459635736738962&cmac=ECC1E7F6C6C73BF6 the backend server can work with the encrypted data.

There is just one part missing - the decryption on backend server side is working using AES/CBC/NoPading mode that is available with PHP/OpenSSL but the necessary key is derived by a AES128-CMAC based function and nowhere in the Internet I could find a source code that is running on PHP - except your code.

I extracted just some parts of the CMAC.PHP code and used it together with OpenSSL and it is working successfully, so THANK YOU FOR THE CODE.

Greetings from Germany to fabulous New York
Michael

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant