Coder Social home page Coder Social logo

amarula / sdm-backend Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nfc-developer/sdm-backend

0.0 0.0 0.0 124 KB

Backend server for Secure Dynamic Messaging (SDM). Supports decryption of PICCData, SDMENCFileData, and validation of SDMMAC. Compatible with NTAG 424 DNA (both variants). Written in Python 3 Flask. Pull requests welcome.

License: MIT License

Python 87.75% HTML 11.94% Dockerfile 0.32%

sdm-backend's Introduction

Backend server for decoding Secure Unique NFC Message (SUN)

An example of Flask application which can decrypt data contained in NDEF "mirrors" and validate their AES-CMAC cryptographic signature. Implemented according to AN12196 "NTAG 424 DNA and NTAG 424 DNA TagTamper features and hints".

Pull requests welcome.

Note: NTAG — is a trademark of NXP B.V.

Note: This GitHub project is not affiliated with NXP B.V. in any way. Product names are mentioned here in order to inform about compatibility.

Demo

Check out the demo at sdm.nfcdeveloper.com. This server is using blank authentication keys (all-zeros, factory default). You can use this server for testing and should work fine until you change the default factory keys on your tags.

How to configure the tags?

We suggest using NFC Developer App for Android/iOS in order to configure the tags. This application will do most things "under the hood" and your tags will work out-of-the-box with this project.

Contact

Feel free to reach me at [email protected] if you have any questions concerning this topic.

How to test?

Manual installation

  1. Clone the repository
    apt install -y git
    git clone https://github.com/icedevml/sdm-backend.git
    cd sdm-backend
    
  2. Setup the virtualenv
    apt install -y python3 python3-pip python3-venv
    python3 -m venv venv
    source venv/bin/activate
    
  3. Install the required dependencies and copy example config:
    pip3 install -r requirements.txt
    cp config.dist.py config.py
    
  4. Run Flask development server:
    python3 app.py --host 0.0.0.0 --port 5000
    
  5. Visit localhost:5000 and check out the examples.

Using Docker

  1. Launch sdm-backend on port 5000:
    docker run \
        -p 5000:80 \
        -e SDM_MASTER_KEY=00000000000000000000000000000000 \
        icedevml/sdm-backend:build20220822-v2
    
  2. Visit localhost:5000 and check out the examples.

Note: If you are running production instance, the SDM_MASTER_KEY should be an unique 16 byte value (hex encoded). However, all-zeros key is perfectly fine for testing.

Authors

Feel free to contact if you have any questions.

sdm-backend's People

Contributors

icedevml avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.