New Project: Hardware Wallet
https://godoc.org/github.com/skycoin/skycoin/src/cipher
- Create a new folder called hardware-wallet for the project files
- Use the trezor cryptography implementation
- Create a readme.md explaining installation and how to run
Port the following functions
- func GenerateDeterministicKeyPairs(seed []byte, n int) []SecKey
- func ECDH(pub PubKey, sec SecKey) []byte
- PubKey, PubKeyFromSecKey(seckey SecKey) PubKey
- AddressFromPubKey(pubKey PubKey) Address
- func VerifySignature(pubkey PubKey, sig Sig, hash SHA256) error
- func ChkSig(address Address, hash SHA256, sig Sig) error
There must be tests
- take list of 10 values /seeds and the private keys they should generate. Verify that the golang and trezor outputs the same values for the 10 inputs. Automated testing.
- do the same for SHA256
- do the same for ECDH
Then do test scripts that generate an input/output pair in golang at random and tests what the hardware outputs for the input pair.
- log all outputs that differ to an error file (including the function tested, the input and the output and what it should be)
working on this
Talked with Brandon in wechat and clarified that other developers are working in hardware wallet so I should take another task
Pull request #43
- func GenerateDeterministicKeyPairs(seed []byte, n int) []SecKey
- func ECDH(pub PubKey, sec SecKey) []byte
- PubKey, PubKeyFromSecKey(seckey SecKey) PubKey
- AddressFromPubKey(pubKey PubKey) Address
@skycoin-manager this issue asks to make a code to "VerifySignature" but do not ask me to do signature: do you confirm we don't need it ?
Second question: for address generation do you want the generation for both bitcoin and skycoin or only skycoin
pushed code to generate bitcoin public and private address
Quoting wechat conversation precising what's in scope
- address generation: bitcoin + skycoin
- Sign verification: skycoin only
- Signature: out of scope (but can do if have time)