This video does a good job of explaining it. Disclaimer: I am not a cryptographer and any such cryptography advice or implementations should be accepted secp256k1 bitcoin wallet academic experimentation and not crypto best practices.
Random Number Generation I’d be remiss if I didn’t mention anything about random number generation. Random number generation is the basis of most cryptography and Bitcoin. Your Bitcoin addresses are only as secure as your random number generator. This article shows how you can use the up and coming window.
What tests can I do to ensure my PRNG is working correctly? Bitcoin Talk: Bad Signatures leading to 55. Getting Started You’re going to want to use the latest BitcoinJS client lib. There are some more recent forks: 1, 2, and the one that I will eventually maintain. I have included the library on this page. Just open up your Chrome Console or Firefox Console and start typing along. So why did the designer of Bitcoin, Satoshi Nakamoto, decide to use ECC over the prevalent RSA crypto scheme?
The primary benefit is the key size. The Elliptical Curve Cryptography spec 2. The entire Elliptic curve domain is a sextuple, spec 3. The precise details are out of scope for this article, read the spec for more info. I mainly presented this material for academic purposes.
Private Keys Private keys are what allows you to spend your coins. A private key, d is any random number between 1 and n – 1. You’ll notice that we generate 32 random values. However, in practice, you really don’t have to worry about it. Bitcoin and Crypto methods don’t like Uint8Array for input. But wait, this doesn’t look like the private keys that you see in your Bitcoin clients. Public Keys Now that we have our private key, we can generate a public key.