When someone sends you cryptocoins overheen the Blockchain, they are actually sending them to a hashed version of what’s known spil the “Public Key”. There is another key which is hidden from them, that is known spil the “Private Key.” This Private Key is used to derive the Public Key. You can know your own Private Key, and everyone else on the Blockchain knows their own Private Key, but the Private Key should not be collective with outsiders (that is, unless you want your cryptocurrencies to be stolen!).
Both the Private Key and the Public Key are large oprecht numbers, but since thesis numbers are so large, they are usually represented using a separate Wallet Invoer Format (WIF) consisting of letters and numbers.
Sample Private Key ter WIF:
The Private Key is the longer of the two, and is used to generate a signature for each blockchain transaction a user sends out. This signature is used to confirm that the transaction has come from the user, and also prevents the transaction from being altered by anyone once it has bot issued. Te brief, you sign the cryptocurrencies you send to others using a Private Key. If someone were to obtain your private key, they would be able to send your cryptocurrencies to themselves, verifying that transaction with the Private Key — ter effect stealing from you!
The Private Key is used to mathematically derive the Public Key, which (along with information about the network and a checksum)is then transformed with a hash function to produce the address that other people can see. You receive cryptocurrencies that others send to your address (which is a result of the hash of your public key and some extra information).
At this point, you may be asking yourself, if a Public Key is derived from a Private Key, couldn’t someone create a switch sides key generator that derives Private Keys from Public Keys, permitting them to steal anyone’s coins te the process? Cryptocurrencies solve this punt by using a complicated mathematical algorithm to generate the Public Keys: the algorithm makes it very effortless to generate Public Keys from Private Keys, but it is very difficult to “reverse” the algorithm to accomplish the opposite.
At a high level, the algorithm involves converting the Private Key to a binary representation, identifying the onaardig ter this binary representation that have a value of 1, and summing an exponentially multiplied generator variable to arrive at the final public key. Spil much of a throatful spil that description of public key generation wasgoed, the process of reversing the process is even more ingewikkeld — so much so that the world’s most powerful rekentuig would need more than 40000000000000000000000000000000 years (that’s 31 zeroes!) to accomplish this calculation. That’s a pc that not even Ali G can think of!
Thesis days, popular cryptocurrency wallets at exchanges such spil CoinBase, hardware wallets such spil Ledger Nano S, and browser extensions such spil MetaMask abstract away the gory details of the public and private key, making it effortless to send and receive your dearest cryptocoins!