Private key, public key and address
Wallets use asymmetric cryptography: a pair of keys that are mathematically linked. The private key signs a transaction; the public key lets anyone check that the signature is real without learning the private key. Going from private to public is easy, going back is practically impossible.
You rarely see the private key itself. Wallet apps derive it from the seed phrase and keep it encrypted on the device. The phrase is the backup you write down; the key is what the wallet actually uses.
The wallet address is what you share with others. On most blockchains it is computed from the public key. Sharing the address or the public key is safe; sharing the private key or the phrase hands over the wallet.
Private keys on TON
TON wallets use Ed25519 key pairs. A TON wallet is not just a key, though: it is a smart contract that stores your public key and accepts only messages signed by the matching private key. The contract checks the signature and a sequence number, so an old signed message cannot be replayed.
Because the address comes from the contract's code and initial data, not from the key alone, one private key can control several addresses: one per wallet version (v4R2, W5) or sub-wallet. Looking at an address, you cannot tell which key stands behind it.
Keys also stand behind tokens. A jetton's admin, the address that can mint new tokens and change the name and logo, is in the end someone's key. On a token page DYOR shows the owner address in the Contract block while the token has a live admin, and the Admin rights row of Token check says who holds it when DYOR can tell: one wallet key, a multisig that needs several signatures, or a contract that acts by its own code. A single key is the weakest of the three: whoever steals or sells it gets the power to mint. Once the admin is revoked, a standard jetton's supply and settings are fixed for good.
Your own key never touches DYOR: on DYOR Swap the site builds the transaction and your wallet signs it.
Who holds the key
Holding the key is what separates the two kinds of wallets:
- in a non-custodial wallet the key is on your device, so you alone control the funds and you alone are responsible for the backup;
- in a custodial wallet (an exchange account, for example) the company holds the keys and you hold a login: convenient, but the funds are only as safe as the company.
Hence the old saying "not your keys, not your coins".
How private keys leak
- Typing the key or the phrase into a "wallet validation" site or a fake support chat (Phishing).
- Malware that reads the clipboard, screenshots or files with keys on a computer.
- Keys stored in plain text: cloud notes, email drafts, messenger chats with yourself.
A Wallet drainer does not need the key at all: it tricks you into signing a transfer with it. Read every request your wallet shows before you confirm.