Skip to content

Instantly share code, notes, and snippets.

@fyookball
fyookball / gist:dbac6d1b0d3501964f8b868f2a48d279
Last active May 7, 2019 20:13
Adding Schnorr to Electron Cash

Thankfully, the hard work has been done by ABC and Calin Culianu, who ported the entire library into Electron Cash. Now the question is how to actually implement?

Adding Schnorr to Electron Cash

Currently, the sign() function in lib/transaction.py creates a signature using ECDSA-related objects like MySigningKey class from bitcoin.py, and sign_digest_deterministic, which I believe operates on a private key object returned from the ecdsa library.

Instead of this, the sign() function should directly call into secp256k1/src/modules/schnorr/secp256k1_schnorr_sign using the message and private key.

@fyookball
fyookball / gist:a6d38317b2a439c38caa6a17c3dd128b
Last active September 8, 2019 10:42
Sharded Input Proofs for Cash Fusion

Sharded Input Proofs for Cash Fusion

Introduction

Cash Shuffle is a powerful tool for cycling a coin through many joined transactions. However, after shuffling a wallet, a user will inevitably wish to consolidate coins, and for this another tool is needed.

We need a method to coordinate coinjoin transactions with multiple inputs per user. This is inherently challenging because we want to hide input linkages while simultaneously attempting to blame/ban users who don't sign all their inputs.

This scheme takes a "sharding" approach whereby each player gives each other player only 1 input to verify.
(Assume we have 10 players using 9 outputs each). If it can be successfully implemented, this would be an improvement over schemes that trust the servers with information about linkages between inputs. In the long run, that trust could create pressure and incentives for bad actors to compromise servers.

STAT: Semi-Trusted Amalgamation Technique

Authors: Jonald Fyookball, Dr. Mark B. Lundeberg, @ProtocolCash

Introduction

CashShuffle works as designed, processing hundreds of transactions a day on Bitcoin Cash. However, users still need to consolidate their coins. (For instance, if you have 2 shuffled coins of ~1 BCH and you want to purchase something > 1 BCH.)