A bitcoin address is a string of numbers and letters that can be shared with anyone who wants to give you bitcoins. A bitcoin address generated by a public key (a string also consisting of numbers and letters) starts with the number "1". Here is an example of a bitcoin address:
In a transaction, the bitcoin address usually appears as the payee. If you compare a bitcoin transaction to a check, the bitcoin address is the payee, which is what we'll put in the payee field. The payee of a check can be a bank account, a company, an organization, or even a cash check. Instead of specifying a particular account, a check uses an abstract name as the payee, which makes it a fairly flexible payment instrument. In a similar vein, bitcoin addresses use a similar abstraction, which also makes bitcoin transactions flexible. A bitcoin address can represent the owner of a pair of public and private keys, or it can represent something else. Now, let's look at a simple example of generating a bitcoin address from a public key.
Bitcoin addresses can be obtained from public keys by a one-way cryptographic hashing algorithm. A hash algorithm is a one-way function that takes an input of arbitrary length to produce a fingerprint or hash. Cryptographic hash functions are widely used in Bitcoin: Bitcoin addresses, scripted addresses, and in proof-of-work algorithms in mining. The algorithms used to generate bitcoin addresses from public keys are the Secure Hash Algorithm (SHA) and the RACE Integ rity Primitives Evaluation Message Digest (RIPEMD), specifically SHA256 and RIPEMD160.
Using the public key K as input, calculate its SHA256 hash and use the result to calculate the RIPEMD160 hash to obtain a number of 160 bits (20 bytes) in length.
A = RIPEMD160(SHA256(K))
In the formula, K is the public key and A is the generated bitcoin address.
Hint Bitcoin addresses are different from public keys. Bitcoin addresses are generated by a one-way hash function of the public key.
The Bitcoin addresses that users typically see are encoded with "Base58Check" (see the "Base58 and Base58Check Encoding" section), which uses 58 characters (a Base58 Base58Check encoding is also used elsewhere in Bitcoin, such as in Bitcoin addresses, private keys, encrypted keys, and script hashes, to improve readability and correct entry.