Generating And Encrypting Bitcoin Addresses And Keys On Arduino

 admin

I am using an Arduino to read a keypad and open an electric strike upon keypad PIN entry. For this sketch I wanted to use some sort of lightweight encryption to store the PINs in EEProm. Does anyone know of such a library? I have heard it may be possible using TwoFish. Crypto Miner. Crypto Miner is a companion system that runs alongside your cryptocurrency mining rig. The system allows you to monitor the temperatures of your hardware, hashing rate and also gives you the ability to reset the power supply on the rig. I think at best Ardino would be best used to co-ordinate work chunks for the pipelining problem of SHA256 hash calculations (mining) to a series of boxes or racks.

Generating And Encrypting Bitcoin Addresses And Keys On Arduino

Addressgen is a utility to generate private keys and their corresponding addresses for cryptocurrencies based on secp256k1. Currently, only Bitcoin, Dogecoin, and Litecoin are supported, but in the future I will add support for more. Bitcoin uses point multiplication on the Elliptic Curve secp256k1 to generate a public key from a private key. Basically, this curve has a defined Generator point G, and a method for 'adding' two points together in a way to get a new point (EC Point Addition).Your private key is just a number, aka a Scalar, so to get your public key you just add the generator point to itself privkey number of.

Generating and encrypting bitcoin addresses and keys on arduino code

Generate Bitcoin Addresses Using Arduino

Setup

  1. Download all necesary files
  2. Run Setup.sh if on Mac or linux or Setup.bat for Windows(not tested)
  3. Copy the folder Entropy to your Arduino Libraries folder or in the Arduino IDE click sketch>import library>add library and find the Entropy folder

Usage

  1. Connect your Arduino
  2. Open the file Random_Address.ino inside of the Random_Address folder in the download
  3. Make note of where the Arduino IDE says your Arduino is connected (bottom right-hand corner)
  4. Upload the sketch to your Arduino
  5. In terminal run 'cd ~/[PATH_TO_DOWNLOAD]' and then 'python generate.py'
  6. When it asks what port arduino is connected to, type in the info from step 3
  7. Choose whether you want to generate a new address (CANNOT BE UNDONE) or read out an existing address
  8. If you chose to generate a new one, wait for it to generate, then you can readout either the Public Address or the Private key in WIF
  9. It will show in the command line whichever one you chose and also make a QR code of it in the folder you are running it from

Generating And Encrypting Bitcoin Addresses And Keys On Arduino Code

Security

This is a way to generate a Bitcoin private key which can then be used to send and recieve bitcoin. This way is not entirely secure. I would recomend using a computer that has never touched the internet or a raspberry pi that has never touched the internet. If anyone gets your private key they also get full control of your bitcoins.

Disclaimer

This is my first bitcoin code and I am new to python.

Generating And Encrypting Bitcoin Addresses And Keys On Arduino Code

Update

Generating And Encrypting Bitcoin Addresses And Keys On Arduino Free

Now using the Entropy library on Arduinos that support it (i.e. Arduino Uno and newer Arduino Megas). This library is tested to be random. It is useful in cryptographic situations, such as this one.

Private keys are now written to the EEPROM on the arduino. Using the sketch Read_EEPROM.ino will readout the key that is stored on the arduino. You can see this in the arduino serial monitor in hex, or you can run it with generate.py to re-generate a compressed private key or a public address. IT ONLY STORES ONE PRIVATE KEY AT A TIME. EVERYTIME YOU RE-RUN THE RANDOM ADDRESS CODE, YOUR PRIVATE KEY WRITTEN ON THE ARDUINO IS OVERWRITTEN.Everything is compressed into one arduino sketch and one python script.

Generating And Encrypting Bitcoin Addresses And Keys On Arduino Computer

If you have any questions or suggestions, please feel free to leave them in the github, or email me at jujugoboom@gmail.com. Thanks for trying this out. I hope you find it as fun and interesting as I.