Just as it’s impossible to both participate in and do any digging into cryptocurrency without the topic of ‘blockchain’ being brought up in one way or another, so too is it impossible to discuss transactions of any kind without mentioning ‘addresses.’ Blockchain addresses are a concept that many of you have probably come across in your travels, however, it is not out of the ordinary to be unfamiliar with the details behind them.
“What are they exactly?” you might ask. “And how are they generated? Are they all the same?”
It is among one of the more intricate concepts in cryptocurrency by just the very nature of their construction and just how many methods of address production there are depending on the currency. Much like how various cryptosystems function differently from each other, blockchain addresses are created and mobilized in diverse ways as well. This article will shine some light on the subject and aims to clear up any confusion one might have about the complexity of this structure.
An Overview (or Review) of Blockchain
Before blockchain addresses can be embellished, the definition of blockchain and the process of how they operate should be explained as well. This will provide context for what is to come, refresh the memories of those familiar with them, and also educate those who maybe are not as familiar with them.
Blockchain is a digital chain of blocks in which information (the ‘block’) is stored into a public database (the ‘chain’). The digital pieces of information that make up the blocks consist of three parts:
- Blocks store the data concerning the transactions, specifically the date, the time, and the dollar amount of the most recent purchase.
- Blocks store information about who is actively participating in the transactions. A block centered around your purchase will record your name along with the name of the site you shopped at. However, instead of using your actual name, your purchase is recorded without any sort of identifying information, using something called a “digital signature” (i.e. a username).
- Blocks store information that sets them apart from other blocks. In each block, there resides a unique code called a ‘hash’ (a converted input of numbers and letters that is created using an algorithm and is significant in blockchain management), which allows us to differentiate it from every other block.
One single block in a blockchain can store up to 1 MB of data and depending on the size of the transactions, a single block can also obtain up to a few thousand transactions.
In order for a block to join a blockchain, the following four things must happen in order for this to be carried out:
- A transaction must take place.
- The transaction must then be verified. This means that a network of computers will confirm the details of the transaction, which includes the time of the purchase, the dollar amount, and the participants.
- The transaction’s data must be stored inside a block. Once the purchase has been verified, it is greenlit and the transaction’s dollar amount, your digital signature, and the digital signature of the site the purchase took place on are all stored in the block, where it will join many others like it.
- The block must then be given a hash. In addition, the block is given the hash of the most recent block that was added to the blockchain. Once it has officially been hashed, the block can finally be added to the chain.
The block becomes publicly available for anyone to see once it has been added to the blockchain. On Bitcoin’s blockchain, you have access to information about when (‘Time’), where (‘Height’), and by who (‘Relayed by’) the block was linked to the chain.
Introduction to Addresses
Blockchain addresses are a vital component when it comes to blockchain technology and cryptocurrency as a whole.
Back when Bitcoin was first developed, it incorporated the ability to send Bitcoin payments directly to the IP addresses. This particular feature was included in the system to make it much more convenient for the average person to be able to send Bitcoins without having to deal with public keys and needlessly long addresses. With that said, the developers at Bitcoin soon realized that this could mean that the system would be vulnerable to middlemen attacks, so they eventually omitted this ability and to this day, it has never been restored for use.
On the surface, this may not sound like it has much to do with blockchain, let alone blockchain addresses, but there is actually more to it than that. An address can be used to describe the URL of a website, but of course, an address can also be a bank account number or a SWIFT code (an international bank code, also known as a ‘Bank Identifier Code’ [BIC], that identifies any specific bank worldwide).
The format of an address does not matter; what does matter is that it properly serves its purpose of tracking down a specific location, be it physical or virtual. When it comes to the transactions of the financial variety, the address needs to ensure that the payments reach the correct destination. As Unblock.net once tweeted:
“Blockchain addresses differ from the traditional account numbers and SWIFT codes used by banks for several reasons.”
Unlike the addresses that are used by banks, blockchain addresses are not centralized and every possible blockchain address already exists. They came to be the very moment the blockchain was created because these diverse addresses are the result of mathematical operations and solutions.
This concise recount of the history of Bitcoin is partly included for historical context, however, it also illustrates what exactly an address is: it is not something that is necessarily set in stone, but it is a placeholder to accept and to send blockchain transactions.
Blockchain Address Generation
After the abandonment of the “Pay to the IP” idea, the Bitcoin developers switched to the “Pay to Public Key Hash” (P2PKH) format that is widely recognized as the current addressing system. A customary P2PKH will have 34 alphanumeric symbols that all begin with the number 1. The fundamental and primary idea is that when paying with Bitcoin, you are now paying to the hash of some public key.
The very first thing that must be understood about a P2PKH address is that every ‘wallet’ (the software or hardware in cryptocurrency used to store the private keys) is capable of creating them – or technically discovering – as many as you need or want. All of this happens in the background as basic cryptographic operations.
The whole address process commences with your wallet “collecting entropy” and then proceeding to use that in order to generate an ECDSA (Elliptic Curve Digital Signature Algorithm) private key. This is the key design that is chiefly used for Bitcoin addresses. It is categorized as an ‘asymmetric signature algorithm’, which is defined as a type of system that allows transactions to be signed with the private key and the verification of the signature is carried out using the public key. The entire algorithm’s main purpose is to prove that you are the actual creator of a transaction by signing it digitally.
Following the conception of the private key, or the discovery, the wallet then uses a mathematical calculation to acquire the public key. While it is conceivable to go directly from a private key to a public key, there has currently not been an established method to obtain the private key based solely on the public key.
Now the public key is permitted to be used to both send and receive payments.
After a period of time, the community later found that these public keys were actually quite cumbersome, as they consisted of an extensive 65 characters. This led to the recurring instances of typing multiple errors and this means that they are further susceptible to the exposure of the private key if there was ever a computing system to be developed that could break the ECDSA. This worrying situation would eventually lead to the development of a method used to create an address from the public key.
Creating an Address
When it comes to the inevitable creation of an address, the wallet will once again use cryptographic algorithms. The wallet will begin by hashing the public key with SHA-256 and then it will take the resulting product and hashes with RIPEMD-160. The bytes 00 are consequently included to the string as a prefix, which is why all P2PKH addresses begin with the number 1 and it likewise adds four ‘checksum’ (a digit that represents the sum of the correct digits in a piece of digital data that has been stored or transmitted) bytes at the end of the string.
The wallet will finally modify the whole thing into a base58 string and the result that comes out is the Bitcoin address. Overall, the important thing to factor in is that the address is actually just a representation of a public key with an additional checksum included to avoid any and all typing errors. The individual who is the current holder of a private key for an address is the only person who is permitted to sign a transaction for this address, and anyone with knowledge of the address can validate the signature from the private key. This is all done without ever actually uncovering the private key.
Note that the simple act of the signing and the verification of a transaction is basically what a cryptocurrency transaction really is.
The discussion of blockchain addresses does not stop there. As it turns out, Bitcoin has other address types, some of them being more advanced. Such address types include P2SH (Pays to Script Hash) addresses that are able to facilitate things such as ‘multi-sig transactions.’
Other Cryptocurrencies and Addresses
Bitcoin is not the only cryptocurrency platform that utilizes the extensively explained outlined method to construct addresses. Other coins, in fact, use the exact same ECDSA, SHA-256, and RIPEMD-160 in order to generate countless addresses. Some of the more notable examples include the likes of Dash, Litecoin, and Dogecoin.
The only crucial difference with these currencies is that the RIPEMD-160 hash culminates in differing prefixes. The addresses on Dogechain begin with the letter D, Litecoin addresses begin with the letter L, and the addresses on Dash begin with the letter X.
Unblock writer, Steve Walters, states an interesting fact about these varying systems:
“An interesting fact that comes from this, and most people are unaware of, is that since these coins are using the same method of address creation, they can also use the same public and private keys. You can even partially store them on the same addresses. In the case of P2SH addresses, both Litecoin and Bitcoin use a 05 prefix, meaning you could store both at the same address.”
Contrary to what one may believe, there are actually other methods that are used to produce addresses. Monero, for example, bases its operation on the Cryptonote algorithm and it harnesses the use of a different cryptographic signature algorithm that is known as EdDSA (Edwards-curve Digital Signature Algorithm) to spawn a public key. To provide its privacy, it uses what is commonly referred to as a ‘ring signature.’
A ring signature is a mechanism that is used to protect the privacy of the individual who sends a message or transaction on a cryptocurrency network. They do not allow others to see which key was used to sign a transaction. All this means that Cryptonote addresses each have a pair of public keys: one spend key and one view key. Cryptonote adds a byte prefix and hashes the final product for a checksum, however, it employs Keccak-256 rather than the standard SHA-256. The outcome is converted to base58 and churns out a much longer address when compared to the addresses on Bitcoin.
Walters also writes that, “…it is important to note that the method used to create an address can have implications on usability, privacy and security. For example, the checksum makes Bitcoin more usable since it avoids issues related to mistyping an address, while Monero’s view key is partially why it is as private as it is.”
To continue the topic of other cryptocurrencies utilizing and generating addresses, Ethereum should also be mentioned and looked into.
The address creation on Ethereum is about as unique as the system itself, with the addresses being lengthy hexadecimal strings beginning with zero (0) and the letter X. The address generation is technically similar to Bitcoin’s, but not wholly. The procedure begins with a private key and the usage of ECDSA to generate a public key of 64 bytes. The public key is then hashed using Keccak-256, which makes a 32-byte string. Ethereum discards the first 12 bytes and the leftover 20 bytes yield a 40 character hexadecimal address, which has a 0x added to its starting point.
Another prominent difference with Ethereum’s address production is that it does not contain any checksum, therefore the users are highly encouraged to always copy/paste addresses as opposed to manually typing them out. If we choose to judge this address generation by its surface content, then we would think of it as unfinished and practically lazy considering the high-quality cryptocurrency platform it comes from. Not to mention reckless because of the lack of protection there is if a user were to type one character wrong and lose all their funds.
The reason for this seemingly unfinished design is that it is exactly that: unfinished.
Walters explains that, “When Ethereum was first released, no one really cared if the addresses were unfinished. And there were plans to change the address system, so what we use today is not the final iteration. Ethereum’s developers still plan on creating a name register based on smart contracts. Once this is completed, it will bring cryptocurrencies back to Satoshi’s vision, where payment addresses are far easier to use and remember. And perhaps Ethereum hasn’t chosen to use crafted addresses like Bitcoin simply because the Ethereum developers think they can improve on the method. Remember, an address is just a way to direct others to the correct location, so it only needs the proper information to allow funds to be assigned to a private key. This can be done in many ways, some of which are more complex and/or sophisticated than the method currently used by Bitcoin.
“In fact, Ethereum developers are somewhat partial to the ICAP format, which is base58 and uses checksums just like Bitcoin and other cryptocurrencies. The really potentially attractive feature of the ICAP format though is that it is compatible with another existing format – the International Bank Account Number (IBAN) system. This means all the existing banking software and systems can understand and interact with these ICAP Ethereum addresses.”
The support in favor of ICAP from many clients has been growing in recent years. As for Ethereum, they too have been developing their operation, as there has been a checksum added in the form of capital letters, so any address that contains a capital letter is automatically checksum protected from any spelling errors.
There is one cryptocurrency that has already figured out a way to implement addresses that are readable by everybody. That crypto-service is called STEEM and with it, your username also functions as your wallet address.
STEEM was initially built upon a concept similar to BitShares and was linked to the social media platform, Steemit. Since then, it has grown to be conjoined to other platforms that have differing focuses. STEEM equips the use of a protocol called ‘proof of brain’, which is a combination of ‘proof of work’ (POW) and ‘proof of stake’ (POS), and allows users to generate coins simply by posting original material that is approved (or “upvoted”) by other users. It is a complex system that includes three different forms of tokens that are used in various ways to avoid inflation, supply support, and stability, and motivates users to not cash out of the system.
While STEEM has been heavily criticized for being a system that is deemed ‘too centralized’, its address generation is nevertheless a well-regarded component and it has also been accomplishing what Ethereum still aspires to do with smart contracts registrars.
Each STEEM user receives a private key that is used to sign transactions, though addresses are not taken from these private keys and are really usernames selected during the creation of the account on Steemit. The usernames are also connected to public keys that are on the STEEM blockchain, allowing for the validations of the signatures and transactions. The way this happens is that since the public key/address connection is not based on the algorithm, it is instead based on the reliability to the Steemit platform.
The invention of a username based address structure grants those who use it an ideal sense of usability. Evidently, the downside to STEEM is that its system lacks the element of transparency and decentralization, as well as the fact that most other blockchains favor a math-central solution instead of just placing their trust solely on platform reliance.
Address generation is a system that exists in multiple cryptocurrencies, but what is most interesting is that each of these currencies has their own way of producing them. The most basic components are almost identical, but there is a twist added that makes one more preferable to another. Much like how the foundation of these cryptocurrencies are built upon the legacy that Bitcoin created and takes influence from them (and others that followed), their services involving creating addresses are similar in that same vein.
As previously stated, each concept is intricate and given how long it takes to even crack the surface of one single generation, this is a system that has gone through enough development to the point where it is a trustworthy and competently functional service. As it has been highlighted in the section diving into STEEM, not all of these address procedures are perfect; if anything, they have flaws that are also conspicuous in the currencies they are attached to. However, regardless of how much further they have to go in growth, the popularity in these blockchain addresses goes to show how much we as a culture have embraced this kind of technology.