> For the complete documentation index, see [llms.txt](https://docs.leather.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.leather.io/learn/public-private-keys.md).

# Public Key and Private Key: How They Work and Pair Together

A private key signs your transactions; the public key made from it lets others check the signature and send to you. How the pair works in a wallet.

A crypto wallet holds pairs of keys. The **private key** signs transactions and proves you own the funds. The **public key**, calculated from the private key, lets anyone check those signatures. Your addresses are made from your public keys.

## How the pair works

* The private key is a random 256-bit number.
* The public key is calculated from it with elliptic-curve math (secp256k1 on Bitcoin and Stacks). The calculation only works one way: nobody can work out the private key from the public key.
* An address is a shorter, encoded form of the public key or of a script. You share it to receive funds.

## Signatures, not encryption

Bitcoin and Stacks transactions are signed, not encrypted. Everyone can read a transaction. The signature proves that the owner of the private key approved it, and that nobody changed it afterwards.

The same public key cryptography protects other things online, such as HTTPS connections and signed software.

## Public and private compared

|                         | Public key                                  | Private key                               |
| ----------------------- | ------------------------------------------- | ----------------------------------------- |
| Share it?               | Yes, through your address                   | Never                                     |
| Used to                 | Receive funds and check signatures          | Sign transactions                         |
| If someone else gets it | They can see your activity                  | They can spend your funds                 |
| If you lose it          | You can recalculate it from the private key | You lose access, unless you have a backup |

## Keys in Leather

Leather creates all your keys from one Secret Key, the words you back up when you create a wallet. Leather does not store a copy and cannot recover it. Leather shows only the Secret Key, not the private key of each address. See [View Secret Key](/get-started/view-secret-key.md) and [Understanding Wallet Derivation Paths](/wallet-and-security/wallet-derivation-paths.md).

## Keep the Secret Key safe

* Write it on paper or metal and keep it offline, in a place only you can reach.
* Never store it as a screenshot, email or cloud note.
* For larger amounts, keep keys on a hardware wallet. See [Connect Leather with Your Ledger Hardware Wallet](/get-started/connect-ledger.md).

See [Secure Your Secret Key](/wallet-and-security/secure-secret-key.md).
