1

I understand that the private key is generated with a random number

Specifically, any 256-bit number from 0x1 to 0xFFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFE BAAE DCE6 AF48 A03B BFD2 5E8C D036 4140 is a valid private key

I would like to know if this number is stored somewhere. If it is stored, we will be able to regenerate the private key, and the pubic key. Is that right ?

  • 1
    The "number" (256bits) is the private key. If its not stored somewhere, your private key is lost. – Jonas Schnelli Jul 8 '16 at 9:48
  • @JonasSchnelli: I think that's more of an answer than a comment. :) – Murch Jul 8 '16 at 10:00
  • I thought that its hashed version is stored. And the number itself as well? – XR SC Jul 8 '16 at 10:15
6

The private key IS a number, and is remembered as such. It may be generated thought various means (like HD wallets, deterministic generation, from a BIP39 seed, or randomly). It is usually stored as 32-byte array.

The private key is then converted to a public key. This requires a complex mathematical operation, and results in a coordinate pair on an elliptic curve. This is usually stored as a 33-byte or 65-byte array.

That public key is then hashed, a checksum is appended to it, and converted to base58. The result is what is called an address, and is what you give out to others to get paid by them.

The private key never leaves your computer/wallet/app. The address is public.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.