Developing a DIY Bitcoin Offline Address Generator – uBitAddr2 Code Companion

I recently developed a revamped version of a fun Bitcoin project – a DIY offline address generator for Adafruit M4 microcontrollers using pure CircuitPython! It’s open source and uses off-the-shelf hardware.

This project is designed to generate simple address, private keypairs completely offline and show them on a screen (or over serial to a regular PC). The code uses a pure-Python library I developed that calls Python cryptography libraries ported to the device. The original version of this project I developed a few years ago used a combination of CircuitPython and C code that I developed, calling the Trezor cryptography libraries. I actually had the privilege of giving a talk about the original version remotely for the DEFCON Blockchain Village.

Some of the biggest challenges in developing this type of software is finding libraries for the cryptographic primitives on small devices, then of course the fun of writing cryptographic code!

Please note, this is designed to be educational and encourage others to tinker with coding, cryptography, and the Bitcoin protocol. Although I make a best-effort to write secure code (such as using crypto-secure random number generation), it’s not designed with production-level security in mind. There’s risks with DIY crypto code, and also with pure-Python crypto (like side-channel attacks)

Hope this is interesting to some folks here! Happy to answer any questions about developing this kind of thing, and how Bitcoin/cryptocurrency address generation works in general!

Video on the development process Code repository Photo of the project

submitted by /u/pgh_ski
[link] [comments]

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *