In order to receive money in a peer-to-peer transfer some sort of public information needs to be provided to the sending party to know where to send the money to. A bitcoin address can be thought of as a bank account number that corresponds to your bank. Someone can take that address and send bitcoin to you.
The address actually consists of two parts, a private key and a public key. The public key is derived from a private key by some simple math and can be sent to anyone in the world with the knowledge that giving someone the public key will still keep your funds safe. Every bitcoin wallet software protects you from exposing the private key, but if you need it normally there are commands to display it but this is not advised. It should be noted that anyone can see the balance and history of your transactions if they have the public key.
An example of a bitcoin address public key isĀ 12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX and it normally starts with either a 1 or a 3. More secure and advanced wallets will generate new keys for you after every transaction, and is advised since reusing an old address is not best practice for anonymity. The bitcoins that are sent to this address are not actually on the address itself. Rather, the ledger (or blockchain) states that your address contains X bitcoin, and until you move it, that address will always have that value. You can actually memorize a private key (or “seed words” that generate all of your private keys) and cross borders with millions of dollars in your head and no one would know. Once you get to another secure computer, you can jot down your memory and the advanced wallet will populate all of your keys again and your money is right there for you.
Anyone with the corresponding public key can combine a message, a putative digital signature on it, and the known public key to verify whether the signature was valid, i.e. made by the owner of the corresponding private key.
The concept of a public and private key goes way back into the 1970s but was officially named in 1997. In Bitcoin, to transfer funds from your bitcoin address to someone else’s, your wallet software will generate a signed message using your private key and their public key. The message contains pertinent information including the amount to send, and other parameters not covered here. When the wallet software broadcasts the transaction to the network and is mined, the signature is validated using your public key. Only someone with a corresponding private key will be able to create valid signatures. If it’s valid we can assume that it was you that sent the money. If a hacker has access to your machine and is able to send money the system doesn’t know that it wasn’t you, and you’re out of luck. The coins are gone forever and the transaction is irreversible.
The fact the transaction is irreversible might make some people uneasy, but it’s this very nature that gives Bitcoin it’s greatest strength: it is an immutable and censorship-resistant asset where you can not be told who you can and can not send money to. There are no blacklists in bitcoin. Bitcoin does not care about trade embargoes or FATF blacklists. It is a truly open currency that is 100% inclusive to everyone in the world.