Code Monkey home page Code Monkey logo

moko_signer's Introduction

moko_signer

This is a POC to generate a valid DFU package to be flashed for the https://github.com/acalatrava/openhaystack_moko project. This POC uses fixed values for the initPacket. So if the original firmware binary changes the initPacket won't be valid. This should be addressed by using protobuf to generate a valid initPacket.

Generate a valid DFU ZIP file (sign)

First you need to copy the private key from the accessory in OpenHaystack by right-click on it and selecting Copy private key B64.

The parameters needed are the DFU private.key, the original firmware.bin and the accessory base64 private key.

❯ npm run signer -- --mode sign --privateKey ../private.key --firmwarePath ../firmware.bin --base64Key vedQnEUGLzEkVfSfqLaxobA+RihvVbFsrgQjzQ==
DFU Package generated successfully to ./dfu.zip

The generated dfu.zip file should be a valid package to be flashed. (NOT TESTED)

Validate a DFU ZIP file (verify)

You can verify if a ZIP file is valid by issuing the following command:

❯ npm run signer -- --mode verify --privateKey ../private.key --dfuPackage dfu.zip
[OK] Firmware Hash verified
[OK] Signature verified

moko_signer's People

Contributors

acalatrava avatar

Watchers

 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.