Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Alfred724 on October 29, 2021, 12:16:31 PM



Title: implementing small wallet for embeded systems
Post by: Alfred724 on October 29, 2021, 12:16:31 PM
Dear friends

I am new in this way, I want to implement or develop a minimal and light wallet for embedded systems like IoT devices with ARM  processors based microcontrollers  for example (stm32f4XX )

- my toolchain is  ARM-None-eabi-GCC as my compiler which is a cross-platform compiler.

- I used C language to develop


I would be so thankful if you can give me a hand

1- can you suggest to me some libraries and source code in c  which are designed for an embedded system?

2- do you know any topic related to this idea or GitHub ?

thank you in advance


Title: Re: implementing small wallet for embeded systems
Post by: NotATether on October 29, 2021, 12:33:46 PM
First of all you'll definitely need a secp256k1 library to do any kind of cryptography related to addresses, seeds and private keys.

You *might* be able to reuse the libsecp256k1 code that's bundled with bitcoin core, but I'm not sure if it has x86 assembly instructions in it (I don't think so, because Core also has ARM builds).


Title: Re: implementing small wallet for embeded systems
Post by: j2002ba2 on October 29, 2021, 10:26:58 PM
1- can you suggest to me some libraries and source code in c  which are designed for an embedded system?

2- do you know any topic related to this idea or GitHub ?

You could take a look at Trezor source code: https://github.com/trezor/trezor-firmware



Title: Re: implementing small wallet for embeded systems
Post by: HCP on October 30, 2021, 03:46:01 AM
This website has a link to a few "DIY" hardware wallets based on microcontrollers: https://diybitcoinhardware.com/

They also have links to some libraries that might be of use to you like a version of secp256k1 for embedded systems (https://github.com/diybitcoinhardware/secp256k1-embedded). Perhaps a "hardware wallet" is not exactly what you were after, but there should be some crossover between the wallet functionality these devices try to provide and what it appears you are trying to.