schnorr/schnorr.py and schnorr/schonnr_d.py contain the code simulating the signing and verifying schnorr, BN(Bellare-Neven) & MuSig scheme. The code is based on Elliptic Curve Cryptography implementation (ecc.py) from the course material of Programming Blockchain seminar given by Jimmy Song. The original Programming Blockchain(PB) codebase can be found in https://github.com/jimmysong/pb-exercises.
The implementation is based on
- Jimmy Song's presentation Schnorr Signatures and
- his youtube on this topic What is Schnorr, BN, Musig?
I also found this blog helpful - Key Aggregation for Schnorr Signatures
schnorr/dlc.py to simulate DLC execution using ecc.py
Based on Discreet Log Contracts paper by Tadge Dryja.
wtx.py contains extension for Segwit to the original tx.py from the PB codebase.
Currently (April 8 2018),
- parsing and serializing Segwit transaction
- sign and verification for P2WPK transaction test_p2wpkh.py
are implemented. More to come as my learning about bitcoin progresses!
keychain.py contains an initial implementation of the key derivation scheme specified in [BIP-0032] (https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki). It is based on Elliptic Curve Cryptography implementation (ecc.py) from the course material of Programming Blockchain seminar given by Jimmy Song. The original Programming Blockchain(PB) codebase can be found in https://github.com/jimmysong/pb-exercises.
All codes are based on PB codebase (https://github.com/jimmysong/pb-exercises) except segwit_addr.py which is from https://github.com/sipa/bech32.