40

Bitcoin seems to have the concept of a wallet and an address. Are they the same thing? If not, how do they differ?

22

Addresses are the public key of an asymmetric key pair

An address represents the public key of an asymmetric key pair.¹ The owner of the key pair can use the private key to sign transactions or messages (for example in order to prove ownership). Only by using the correct private key a valid signature may be created, which then anyone can verify as valid by using the associated address (which, again, represents the public key).

Wallets are an abstract concept, a "keyring"

A wallet is an abstract construct, which contains the set of public and private key pairs randomly generated for the user. In a deterministic wallet, the keys are derived from a passphrase (a specific seed, masterkey or password) instead of a random seed. Essentially, it corresponds to a keyring in the cryptographic sense.

The Bitcoin client software abstracts the wallet for the user such that it checks each of the addresses contained in the wallet, whether there are any balances (transaction outputs) associated in the blockchain with them. It sums the funds up and presents them as a single total balance. Underlying, however, these balances are stored publicly in the blockchain (that's right, the wallet doesn't contain your coins, it just allows you to spend them). They are split up to numerous addresses and transaction outputs:

  • Address #15521² has
    • 3 BTC in transaction output 1
  • Address #23414 has
    • 1.2 BTC in transaction output 1
    • 0.7 BTC in transaction output 2
  • ...

Everyone can see them, however, usually can't determine the identity of the owner.


¹ To be more accurate an address is a Base58-encoded hash of the public key.

² Of course, real addresses actually are alphanumeric strings with up to 34 characters.

  • 3
    Deterministic wallets are not necessarily brainwallet. The latter uses a human-generated (or human-remembered) seed for key generation, but this is not necessary. The seed or master key can also just be stored on a computer sysyem, which still means a deterministic wallet but no brainwallet. – Pieter Wuille Sep 13 '13 at 8:34
  • Thanks, I guess passphrase is somewhat ambiguous, edited for clarification. – Murch Sep 13 '13 at 11:08
  • so an outgoing transfer would give a negative balance under that address? E.g. in the quoted block could you have "-0.5BTC at output 3"? – jiggunjer Sep 21 '17 at 4:47
  • @jiggunjer: No, there are no negative balances in Bitcoin. An outgoing transfer would spend (and remove) one of the balances. Unless the sent amount matches the removed balance it would additionally create a new balance for the sender with the change amount. – Murch Sep 21 '17 at 20:30
  • 1
    @jiggunjer: usually a new one, although reusing is not forbidden. – Murch Sep 22 '17 at 1:59
5

A wallet and an address are not the same thing.

An address is a Bitcoin public key to which transactions can be sent. This concept is present in the Bitcoin protocol itself.

A wallet is a collection of private keys that correspond to addresses. A private key is necessary to spend from an address. The concept of a wallet is present only in Bitcoin clients. The format of the wallet is stereotypically a text file on disk, but may differ between clients and have highly important features such as encryption and address labeling.

Terminology-wise, one sends Bitcoin to or receives it from an address and one encrypts, exports, backs up, and imports their wallet.

  • 4
    "Receiving from an address" is misleading. You can indeed potentially identify the addresses the inputs of a transaction crediting you were previously assigned to, but that's not guaranteed, and will not necessarily result in a single address/value pair. Coins (transaction outputs) are assigned to addresses, and get produced/consumed by transactions. – Pieter Wuille Aug 31 '13 at 23:13
  • Good clarification. – Colin Dean Aug 31 '13 at 23:25
  • 2
    1. It is more accurate to say that an address is a Base58-encoded hash of a public key. While an address represents a public key, they are not the same thing. 2. More generally, an address can represent an arbitrary script, not just a public key. 3. The "wallet" concept is more general than just Bitcoin clients, e.g. brain wallets and paper wallets. – Meni Rosenfeld Sep 13 '13 at 8:29
3

A wallet is a lot (or collection) of addresses.

An address is a place to send (Bitcoin) from and towards.

Like a key (address) and a keyring (wallet/addresses)!

protected by Community Mar 6 '17 at 8:09

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.