Blockchain
Algorand vs. Aptos
Choosing the right blockchain is easy when you are informed and up-to-date. Read the technical overview of Algorand and Aptos blockchains.
Cryptography is essential for the security of our digital world. Blockchain technology uses a wide range of cryptographic techniques. To be able to understand it, you need to understand the basics of it and this article will try to help with that.
Cryptography is about protecting data with the use of code in order to prevent third parties or the public from reading private messages. It has numerous aspects in information security such as data confidentiality, data integrity or authentication.
There are many use cases of hashing. One of them is storing passwords in web applications. Imagine that someone broke into a database with users login and password. An attacker can then log in as any user and take control of the user's account. An easy way to solve this problem is to store checksums of the password and not the password itself. When a user logs in we hash their password and compare it to the hash in the database; if it’s the same, we let them in. An attacker is left with a database with checksum values that themselves won’t allow him to login to the system.
In the blockchain, blocks are hashed and each block contains a checksum of a previous block down to the genesis block. If anyone would like to tamper with one block, they would need to be able to generate the same hash or change hashes of all blocks following it.
Signing messages similar to physical signing, is a method to prove that we are the author of the message and that nobody has tampered with it. When signing, you use a private key to generate a signature of the message and a public key can then be used to verify it. This means that only you (the owner of private key) can sign and anybody else can verify the signature.
To be more precise, in this scenario private key acts as public key and public key acts as private key. The signature is a hash of the message that is then encrypted with your private key. This way a public key can be used to decrypt and verify that only you could encrypt the hash of the message.
In blockchain, signing is the most important operation, this is the way one proves that they are the owner of coins that he wishes to spend.
Cryptography is an interesting topic and in this article, we just scratched the surface. Blockchain is full of cryptographic algorithms and applications. If you feel that you would like to learn more, check things like Shamir's Secret Sharing - how to split private key into parts so that you can reconstruct it having only some of the parts, or zkSNARK (Non-interactive zero-knowledge proof) - how to verify that you know something without revealing that knowledge or Verifiable Random Function - how to randomly choose a committee so that only the member that has been chosen knows that and can prove it.