Re:A peek under Bitcoin’s hood: Writing a client that can cr...
by ecesena on Monday June 05, 2017 @12:57PM
(#14489145)
FWIW, I was looking at eth code in the weekend and it's pretty accessible (I was looking at go -- I've read that eth python should be even more readable).
The address part is very similar, even simpler, than bitcoin. It's the same elliptic curve, same way to build private/public keys.
For the address, it uses a different hash function, Keccak256, and then it's just serialized in hex. Code here [1]. Pointers to key generation [2, 3].
[1] https://github.com/ethereum/go-ethereum/blob/release/1.6/cry...
[2] https://github.com/ethereum/go-ethereum/blob/release/1.6/acc...
[3] https://github.com/ethereum/go-ethereum/blob/release/1.6/acc...
Re:A peek under Bitcoin’s hood: Writing a client that can cr...
by tuxxy on Monday June 05, 2017 @01:13PM
(#14489299)
Keccak256? Isn't that just SHA3 with a digest of 256 bits?
Re:A peek under Bitcoin’s hood: Writing a client that can cr...
by ryan-c on Monday June 05, 2017 @04:22PM
(#14491477)
No, it's slightly different from SHA3-256. There was a tweak for standardization.
Re:A peek under Bitcoin’s hood: Writing a client that can cr...
by ecesena on Monday June 05, 2017 @02:25PM
(#14489982)
I'm unsure. I think this came before sha3 was defined so some parameters may have changed. But the core is essentially that.
Re:A peek under Bitcoin’s hood: Writing a client that can cr...
by tylersmith on Monday June 05, 2017 @05:07PM
(#14492064)
There are minor padding differences but that's it.
If you're reading the comments, can you do this treatment but for Ethereum and the smart contracts built on top of it?
I find that your article gives a good explanation especially for beginner to understand from the code perspective.