Seek possibility of porting nostr-signing-device (NSD) to other SoC (not ESP32), emulate NSD on OpenBSD and Linux (arc4random() supported glibc is required).
$ git clone --recursive https://github.com/jg1uaa/nsdemu
$ cd nsdemu
$ mkdir build
$ cd build
$ cmake ..
$ make
$ git clone --recursive https://github.com/jg1uaa/nsdemu
$ cd nsdemu
$ git clone --recursive https://github.com/raspberrypi/pico-sdk
$ mkdir build
$ cd build
$ cmake -DPLATFORM=rp2040 -DKEYSTR=nsec1-your-secret-key ..
$ make
$ cp nsdemu.uf2 /path/to/rp2boot-device
$ sync
$ nsdemu -l [serial device] -k [secret key]
Secret key accepts both bech32 format (nsec1...) and 64digit-hex format.
Only /ping
, /public-key
, /sign-message
and /shared-secret
is implemented. Enough to work with horse.
For test purpose only, argument of nsdemu is shown by ps command.
MIT License
Currently nsdemu uses secp256k1 library, it contains precomputed table. The smallest size of the table is 32k bytes, replacing more small library is required to fit in small-storage MCU.
cmake -DSECURE_LIBRARY=ubitcoin
uses uBitcoin library instead of secp256k1 and it makes smaller object. But performance is poor, 5x slower than secp256k1 on RP2040.