A Layman’s Guide to Cryptography in Decentralized Systems

ARPA Official
8 min readDec 26, 2023

--

Everyone talks about “crypto” when discussing blockchain, cryptocurrencies, or DeFi- but what does “crypto” mean? Why is it being used here? Most importantly, what does that mean for how all of these things work?

The word “crypto” comes from Greek. It means “hidden” or “concealed.” The use of the word in blockchain-based applications comes to us from the word “cryptography,” which is the practice of secure communication. The goal of cryptography is to take a message and make it “hidden” or “concealed” in such a way that it cannot be viewed by anyone not authorized to see it but can be made legible again for the intended audience without too much trouble. Cryptography has been around for millennia and is always evolving.

Cryptography can be fairly simple. At the most basic level, it requires turning a readable message, called “plaintext,” into something that makes no sense to anyone but the intended reader, called “ciphertext, ” and back again. This can be something as easy as the Caesar cipher. This code replaces each letter in a message with the letter three spots after it in the alphabet. Anyone who knows that replacement rule can easily decode the message, while anyone who does not will only see gibberish.

Some of the most famous examples of cryptography are centralized. For much of history, this was necessary, as the codes needed to encode and decode text had to be physically exchanged between individuals each time the system changed or new parties were brought on board. In many use cases, this is fine. However, centralization can have problems. For example, if a large number of people are all using the exact same system to encode or decode messages -like if they all use the same standardized codebook- then all of their messages will all be easy to crack if an outsider acquires the codebook.

Looking at history, we see that many extremely difficult-to-crack codes were solved by the code breakers getting their hands on the answers. Because one player in the centralized system made an error, the entire system was compromised. Some of the major breakthroughs in deciphering the Enigma code were made this way.

However, as blockchain technology demonstrates, there is almost always a decentralized alternative to large, centralized systems. It turns out you don’t need a central authority to exchange accurate, secure, encrypted information between people. In this article, we will look at how cryptography is used in decentralized systems to make blockchain and cryptocurrency applications work. First, let’s look at how Bitcoin uses cryptography in a decentralized manner. The Bitcoin protocol uses “Asymmetric” or “public-key” cryptography1. This model, invented in the 1970s, allows for large groups of people to interact and share data securely with minimal oversight within an established infrastructure.

In this system, every participant is issued two cryptographic keys. The first is a “public key.” This allows for people to encrypt a message for a specific recipient. This key can be shared far and wide.

The second key a participant has is called the “private key.” It differs from the first and is very difficult to guess. This key is what allows for messages encrypted by the public key to be decrypted.

To use an example from cryptocurrency and blockchain, the public key allows you to send tokens to your friend’s wallet. The private key allows them to access the wallet and use the tokens. Anyone can encrypt a message to send them tokens; only they can decrypt the message and get the tokens.

Systems like this, not every blockchain operation relies on the same model, can run with minimal oversight once they are set up. It allows for all the benefits of a secure cryptographic system and the benefits of decentralization. This makes the advances we’ve seen in blockchain technology possible.

In addition to letting you send and receive encoded messages, cryptography has many other uses in decentralized systems.

Perhaps most importantly, they allow for secure communications between two parties. These systems allow for digital signatures and other authentication methods, allowing users to know they are talking with the right person, even while maintaining a degree of anonymity. They allow for data to be confirmed and for the integrity of transactions to be verified. They permit consensus algorithms to operate. By ensuring all participants have a consistent version of the transaction history, these algorithms maintain the integrity and security of decentralized blockchains.

Of course, theory and practice are two different things. Let’s take a look at how decentralized cryptography works in a number of applications that are used every day.

Digital Wallets

Suppose that your friend to whom you sent tokens before wants to spend them on something. He’ll use his wallet to order a transaction from him to the vendor. When the action is phrased like that, it almost sounds like there are coins in his computer that your friend can take out and spend like dollar bills at a gas station. However, this isn’t the most accurate picture. If we look deeper, we can see how decentralized cryptography makes this action possible.

First and foremost, the public key works like your address in this situation. By knowing their public key, you can send them tokens but can’t use them in the same way that you might know their physical address but can’t claim to own their house. Meanwhile, the private key allows them to access their wallet and confirm they own the tokens. It works like the key to their house- anyone can mail them something, but only the person with the key to the front door can go in.

The tokens your friend wants to spend don’t exist in the wallet; they exist as records on the blockchain. When he wants to send his tokens out, he uses his private key to confirm that he owns his tokens and then does with them as he wishes. This is why it is so important to keep your private keys secret- anyone who has a private key to a wallet has full control over the funds.

Digital Signatures

Now imagine that your friend wants to send you a message. However, it is very important that you know it was from them and not an impostor. This is no problem for you two, as he can send you that message with a digital signature on the bottom. He sends it, and you are able to confirm that it was him.

Digital signatures allow for messages or documents to be verified. The recipient of a message with a digital signature can be certain that it came from a specific sender. They rely on asymmetric systems, like the ones described above, but they work a little differently than most messages sent in those systems. Here, a signature is encoded using a private key and decoded using the public key. This signature is attached to another message.

Just like before, there is only one private key per person, while the public key for that person can be widely shared. In algorithms that allow for digital signatures, such as DSA, ECDSA, or RSA, the public key can be used to determine that the matching private key was used to send the message.

Smart Contracts

Smart contracts are one of the more interesting programs run on blockchains. A contract is written and deployed on the platform, let’s say the Ethereum blockchain, that will interact with people in ways that are predetermined by the code.

Let’s imagine that your friend has decided to start an art business. He writes a smart contract that will send a pre-made digital artwork for download to anyone who sends him enough money. This is stored in the blockchain and can be interacted with by anyone using that chain. You decide to be his first customer. Using the public key of the contract; you send it one coin. The contract, seeing that you sent enough money, grants access to your public key to download your picture. While you do that, the contract then sends your friend the money you paid using his public key. It then goes to his wallet.

Data storage and retrieval

Cryptography makes storing information on blockchains easy. As you probably know, when transactions occur on blockchains, they are recorded on a block and then stored for all time on distributed ledgers. The decentralized nature of this database keeps it honest, as updates to each ledger make any errors one a single one obvious.

When the data is stored, shards of data are copied to prevent loss of data and encrypted with a private key. The copies are sent to many different ledgers for safekeeping, and the record of the copies being sent is recorded in the public ledger. The data is now safely stored, where it cannot be altered, in several different locations. When you want it back, you can use the private key to decode it. While different data storage systems have different advantages, this is an inexpensive way to record data, keep it encoded, and to secure it from a single-point failure.

Cryptography gives blockchain and cryptocurrencies the tools they need to keep communications secret, secure, and stable. Decentralizing cryptography gives users the ability to communicate, securely send money, execute contracts, and store data without the need for an overbearing central authority.

1. As you might guess, “asymmetric” cryptography implies that a “symmetric” one exists. In these, the same key is used to decrypt and encrypt. It can be faster than asymmetric operations but has the problem of having to share the first key securely.

About ARPA

ARPA Network (ARPA) is a decentralized secure computation network built to improve the fairness, security, and privacy of blockchains. ARPA threshold BLS signature network serves as the infrastructure of verifiable Random Number Generator (RNG), secure wallet, cross-chain bridge, and decentralized custody across multiple blockchains.

ARPA was previously known as ARPA Chain, a privacy-preserving Multi-party Computation (MPC) network founded in 2018. ARPA Mainnet has completed over 224,000 computation tasks in the past years. Our experience in MPC and other cryptography laid the foundation for our innovative threshold BLS signature schemes (TSS-BLS) system design and led us to today’s ARPA Network.

Randcast, a verifiable Random Number Generator (RNG), is the first application that leverages ARPA as infrastructure. Randcast offers a cryptographically generated random source with superior security and low cost compared to other solutions. Metaverse, game, lottery, NFT minting and whitelisting, key generation, and blockchain validator task distribution can benefit from Randcast’s tamper-proof randomness.

For more information about ARPA or to join our team, please contact us at contact@arpanetwork.io.

Learn about ARPA’s recent official news:

Twitter: @arpaofficial

Medium: https://medium.com/@arpa

Discord: https://dsc.gg/arpa-network

Telegram (English): https://t.me/arpa_community

Telegram (Turkish): https://t.me/Arpa_Turkey

Telegram (Việt Nam): https://t.me/ARPAVietnam

Telegram (Russian): https://t.me/arpa_community_ru

Telegram (Indonesian): https://t.me/Arpa_Indonesia

Telegram(Sri Lanka):https://t.me/arpa_srilanka

Telegram(Africa):https://t.me/arpaafrica

Reddit: https://www.reddit.com/r/arpachain/

--

--

ARPA Official
ARPA Official

Written by ARPA Official

ARPA is a privacy-preserving blockchain infrastructure enabled by MPC. Learn more at arpachain.io