Cryptography 101 – Ledgerlabs-li – Medium
Asymmetric encryption was developed to counteract the disadvantages of the symmetric encryption and represents an important basis from cryptography in the blockchain context. Asymmetric cryptography solves the coordination problem that existed in symmetric encryption when the key was transmitted. Instead of passing the “password” to decrypt a message, a combination of two keys is used — a public key and a private key. This is often referred to as private and public key encryption. The private key is only known by the owner and must be kept safe. The public key, on the other hand, can be passed on to anyone without hesitation. Both keys are cryptographically linked to each other.
The following example shows how a secure message can be transmitted by using the key pairs without having to send the password to the recipient for the decryption.
One application of asymmetric cryptography is the storage and transmission of cryptocurrencies. The public key is the address where the coins are located and can be used to encrypt data. The private key, on the other hand, is equivalent to the password that is needed to decrypt the data again. The private key therefore allows access to your own assets on the blockchain and should therefore be kept safe in any case. In addition to the safekeeping of assets, asymmetric encryption is also used to sign transactions concerning these assets.
Hash functions are cryptographic one-way functions that convert an input (text, documents, etc.) into a length-limited alphanumeric code (hash) as an output. Nowadays, they are used to sign emails or digital documents. In addition they also form the basis for the proof-of-work algorithm for validating transactions on the blockchain. (Voshmgir & Kalinov, 2018)
As shown in the figure, even a slight change in the function input leads to a completely different output. Nevertheless, using the same input and hash function always generates the same output. Hence, it is easy to check whether the hash (output) belongs to a certain data set (input). However, the hash value (output) cannot be traced back to the data set (input). Therefore, it is called a one-way function.
Hash functions like SHA256 (Secure Hash Algorithm) are usually open source. This means that anyone can try to crack the algorithm. Hash algorithms that have been around for a long time and have not yet been successfully cracked, can be considered secure.
TIP: An interactive tool for a better understanding of hash functions is provided by Anders Brownworth on the website https://anders.com/blockchain/hash
Sources
Back, A. (2002). Hashcash — A Denial of Service Counter-Measure. http://www.Hashcash.Org/Papers/Hashcash.Pdf.
Haber, S. & Stornetta, W. S. (1997). Secure names for bit-strings. Proceedings of the ACM Conference on Computer and Communications Security, 28–35.
Merkle, R. C. (2012). Protocols for public key cryptosystems. Proceedings — IEEE Symposium on Security and Privacy. https://doi.org/10.1109/SP.1980.10006
Nakamoto, S. (2008). Bitcoin: A Peer-to-Peer Electronic Cash System [Whitepaper]. Retrieved November 3, 2019 from https://bitcoin.org/bitcoin.pdf
Voshmgir, S., & Kalinov, V. (2018, 11. September). Cryptography & Blockchain Infographic — BlockchainHub. Abgerufen 3. Februar, 2019, von https://blockchainhub.net/blog/infographics/cryptography-blockchain-infographic/
Published at Tue, 14 Jan 2020 06:34:45 +0000
{flickr|100|campaign}
