Coins need to be stored in a wallet. This is the basic fundamental understanding of cryptocurrency. In order to store you coins in your wallet, your wallet needs to know what coins belong to you as the holder. How does the wallet know that coins are belonging to you as the holder? That’s through private keys. The wallet itself actually does not for lack of better terms “hold” your XEP coins. The wallet stores the private keys in the wallet so they may be accessed on the blockchain. When you move coins between exchanges, wallets, and back and forth between the wallets and exchanges, your private keys are authorizing the amount of coins to be moved to new addresses. Your wallet addresses, really called public keys, are viewable on a blockchain, the public ledger. Your private keys are not to be revealed by anyone and should not be revealed to anyone else. Let me make an example that might help it to be easier understood.
Imagine a home. Homes are meant to be locked when not in use (there are other times they should be locked but just bear with me). Your home is like your wallet. People know you have one, they know it exists and your home holds many things!
Your home also has rooms. So far, let’s think of the home as a wallet, and the rooms as addresses. Your home holds rooms which a wallet hold addresses. To access your wallet or to get insides your home, you need to get past the locks. To get past these locks you need to the code to get in. In cryptocurrency, that is called “Encrypting your wallet”. It’s a simple process that the user enables and can the wallet can be unlocked with a password or passphrase.
Now as I mentioned earlier, your rooms are addresses. Imagine these rooms on the outside walls of the house so they each have a window. As your walking buy a house you do not own, you can see in the room from the outside of the home. You, not the owner, do not have access to inside the room as you do not have access to inside the home. As for wallets, each address in the wallet, or public address, can be seen by anyone on the blockchain. It’s public knowledge just as if you were passing by a window and could see a bed, maybe a dresser, and maybe even a television. Those items think of them as the “coins” in your wallet. Only the owner has access to those items.
But how does one moves these items from room to room or from house to house? That is where private keys come in.
Private keys are for example are the doors to each room. If you own the house you can freely move items from room to room. As with our wallets, we can freely move coins from address to address. Easy right? But how does it work if you send your coins or your house items to a neighbor? Send items is the same concept as if you took your items from a room and are given to your neighbor. When sending coins you are sending your coins from public address to public address. Since you hold the private keys in your wallet, you can authorize the movement of coins from your public address to someone else’s public address. Then only that person will have authorization to move those coins as they have the private keys to that address. In simple terms, each public address has a private address.