Skip to content

Instantly share code, notes, and snippets.

@btchip
btchip / hidProxy.py
Last active November 10, 2021 18:48
Minimalistic Python implementation of Ledger Live HID proxy
from ledgerblue.comm import getDongle, CommException
import asyncio
import websockets
import json
import binascii
dongle = None
async def hidProxy(websocket, path):
global dongle
@btchip
btchip / recoverSeed.py
Created March 2, 2021 17:33
Recovering a hex HW1 / first generation Nano hardware wallet seed
import wallycore
import binascii
import argparse
def get_public_address(key):
hashed = wallycore.hash160(wallycore.bip32_key_get_pub_key(key))
return wallycore.base58_from_bytes(bytearray([0x00]) + hashed, wallycore.BASE58_FLAG_CHECKSUM)
def test_path(mainKey, path):
testKey = wallycore.bip32_key_from_parent_path(mainKey, path, wallycore.BIP32_FLAG_SKIP_HASH)

Ledger Nano X : Bluetooth Low Energy Communication

1.0

  • Public release

About

@btchip
btchip / publishToJcenter.txt
Last active October 5, 2019 09:58
publish to jcenter
group = publishedGroupId
version = libraryVersion
install {
repositories.mavenInstaller {
pom.project {
packaging 'aar'
groupId publishedGroupId
artifactId artifact
void derive(cx_curve_t curve, unsigned int *path, unsigned int pathLength,
unsigned char *privateKey, unsigned char *chain) {
unsigned char tmpPrivateChain[64];
unsigned int i;
cx_ecfp_private_key_t tmpEcdsaPrivate;
cx_curve_domain_t *domain = cx_ecfp_get_domain(curve);
os_memmove(tmpPrivateChain, privateKey, 32);
os_memmove(tmpPrivateChain + 32, chain, 32);

Keybase proof

I hereby claim:

  • I am btchip on github.
  • I am nicolab (https://keybase.io/nicolab) on keybase.
  • I have a public key whose fingerprint is BAE8 8B19 F6E3 2323 6DEB 1AC7 683D 7938 DF55 15CE

To claim this, I am signing this object: