By Sipho Hlatswayo
Cryptocurrencies need cryptography for two main reasons: Secure transactions and to verify these transfers.
Generally, encryption is a basic and easy method of protecting stored, processed, and transmitted electronic data. Since the word "Crypto" means "Secret" in Greek, cryptography technology ensures anonymity in blockchain and guarantees the security of the transaction and the ability to operate out of central authority.
Keep reading and learn a thing or two about all key aspects of cryptography and blockchain.
Before we dive in, let's clear this right away:
Cryptography is the method of sending and storing data in a particular way so that only those to whom the information is intended can read and process it.
A sender uses keys to encrypt plaintext into ciphertext, and the receiver will use keys to decrypt ciphertext into plaintext.
It is also known as the art of writing and solving codes. It is believed that the first attempt at encryption was letter substitution in the kingdom of Egypt around 2000 years before Christ, and the aim behind it was perhaps not to conceal the message but to change its form to make it appear dignified.
In modern days cryptography is aimed at making messages unreadable to unauthorized readers. It is also meant for digital signing, verification to protect data privacy, and confidential communications like emails and credit card transactions.
Cryptocurrency is defined as an encrypted digital asset that can be used as an online medium of exchange. In 2008, Satoshi Nakamoto someone and a group of people published a white paper on a cryptography mailing list at Metzdowd.com.
The white paper proposed a solution to prevent double-spending and eliminate the risk of trusting a third party.
The most crucial feature of cryptography is the encryption key, and it is a random string of bits used in combination with an algorithm ( 'a cipher') to transform plain text to cipher text or vice versa.
Blockchain makes use of two types of encryption keys: Asymmetric key and Hash function, let’s examine each key.
This type of encryption method uses a pair of mathematically related keys, public and private keys.
For example, the public key, like my Bitcoin wallet address, can be shared freely with anyone, and there is no danger of me emailing my wallet address to a client to receive payments.
Private keys like username and password are the mechanism of proving ownership of cryptocurrency and do not share your private keys with anyone except someone you trust.
Any plain text can be put through a hashing algorithm and converted into a unique string of text. For example, you can use SHA1 (Secure Hashing Algorithm 1) to turn the word LOVE
into s4552g7c9ccs014
Blockchain is a digital ledger formed by linking individual blocks of transaction data.
All transactions on a blockchain must be validated and must be immutable to prevent fraudulent transactions and the issue of double-spending.
In a blockchain, transactions are taken as input and run through a hashing algorithm SHA 256 (Secure Hashing Algorithm 256), which gives an output of a fixed length.
To solve a hash, it starts by solving a complex mathematical problem using available data in the block header, such as:
If a new hash is less or equal to the target hash, it will be accepted as a solution, the block will be added to the blockchain, and the miner will be rewarded.
But before miners commence with the process, they will need to conduct a trial-and-error method to determine which string of numbers to use as a nonce. Once a nonce is identified, the miner will focus on the nonce related to hashed contents of a previous block.
Cryptography is an essential key to the security of blockchain technology, as its features make it possible for the transactions to be recorded on a blockchain network, and blocks get securely linked by other blocks using encrypted data. Each user can safely buy and sell cryptocurrencies using their public and private keys.