Giter Site home page Giter Site logo

midi-password's Introduction

♪ Midi Password Generator ♪

The script uses a key derivation function to extract a cryptographic key from an array of MIDI notes, fetched in real-time.

Dependencies

The script uses the python-rtmidi library that requires (on Linux) the following libraries

  • build-essential
  • libasound2-dev (For ALSA support)
  • libjack-jackd2-dev (For Jack support)

To install them execute

sudo apt-get install build-essential
sudo apt-get install libasound2-dev #Just for ALSA
sudo apt-get install libjack-jackd2-dev #Just for Jack

After that you need to install the following python dependencies

sudo pip install hashlib progress argparse python-rtmidi 

Tested only on Ubuntu 18.04, for other OS support read the rtmidi installation page

Usage

Batch parameter

usage: main.py [-h] [-p PORT] [-m MIN_NOTE] [-s SALT] [-f FUNC] [-r ROUND]

Generate password through MIDI

optional arguments:
  -h, --help            show this help message and exit
  -p PORT, --port PORT  Midi port
  -m MIN_NOTE, --min-note MIN_NOTE
                        Minimun notes to play
  -s SALT, --salt SALT  Salt used in the key derivation function
  -f FUNC, --func FUNC  Key derivation function. Possible values : "pbkdf2",
                        "scrypt"
  -r ROUND, --round ROUND
                        Round to use in the key derivation function (Only in
                        pbkdf2 mode)

In case no argument is passed, the script asks for input interactively.

How does it work

The script simply fetches MIDI events in real time, and store every note ("note on" event in particular) in a buffer, that in the end is passed through the PBKDF2 key derivation function along with a used defined salt.

midi-password's People

Contributors

gr3yc4t avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.