Skip to content

Instantly share code, notes, and snippets.

@greenaddress
greenaddress / encrypt_mnemonic_scrypt.py
Created December 16, 2019 15:03
converts a 24 words mnemonic into a 27 word mnemonic with password
import libwallycore
mnemonic = input("Insert mnemonic: ")
buf = bytearray(libwallycore.BIP39_ENTROPY_LEN_256)
assert libwallycore.bip39_mnemonic_to_bytes(None, mnemonic, buf) == libwallycore.BIP39_ENTROPY_LEN_256
hashed_buf = bytearray(32)
libwallycore.sha256d(buf, hashed_buf)
pwd = input("Insert desired password: ")
COMPONENT_OWNBUILDTARGET := true
COMPONENT_OWNCLEANTARGET := true
build:
>-------cd $(COMPONENT_PATH) && \
export CFLAGS="-fno-stack-protector ${CFLAGS}" && ./tools/autogen.sh && \
./configure --enable-tests=no --enable-static=no --enable-shared=no --with-asm=no --enable-lto=no --disable-swig-java --disable-js-wrappers --disable-swig-python --disable-dependency-tracking --host=xtensa-esp32-elf && \
$(MAKE) -o configure && \
$(AR) cru $(COMPONENT_BUILD_DIR)/$(COMPONENT_LIBRARY) src/secp256k1/src/libsecp256k1_la-secp256k1.o src/*.o src/ccan/ccan/crypto/sha256/libwallycore_la-sha256.o src/ccan/ccan/crypto/
@greenaddress
greenaddress / keybase.md
Last active August 29, 2015 14:05
keybase.md

Keybase proof

I hereby claim:

  • I am greenaddress on github.
  • I am lawrence (https://keybase.io/lawrence) on keybase.
  • I have a public key whose fingerprint is B375 497B 219D 7B16 EE8E BF2C 17AB 8BC3 20B1 51D8

To claim this, I am signing this object: