• How Cryptography is applied to Off-Chain Assets

    Contributed by Michael Shuufeni. In this article, you will learn what are off-chain assets and how cryptography is applied to them. What are Off-Chain Assets? The current architecture of the blockchain has four layers. 1- the hardware layer is concerned with distributed trusted hardware 2-Layer 0 is concerned with the network of the blockchains. 3-…

  • Extended Euclidean Algorithm and its applications in cryptography

    The Extended Euclidean Algorithm has several applications. In this post, I’ll show you a python implementation as well as some of its applications. It is used to calculate the greatest common divisor (GCD) of two numbers and also calculates two numbers x and y such that ax + by = gcd(a,b). In this post, I’ll…

  • Applications of cryptography in network security

    In this post, I’ll show you some applications of cryptography in network security. Current cryptographic algorithms are hard to understand, some of them use complex mathematics as their basic building blocks. Sometimes, this fact makes it difficult for us to see how we can apply these algorithms to provide security in a network. So, let’s…

  • What is Secure Shell (SSH) and how does it work?

    Secure Shell (SSH) is a network protocol used to securely communicate in an unsecured network. SSH is the protocol that most people choose to use for remote login and tunneling. There are many client applications available in different operating systems, such as: PuTTY for windows. Bitvise  SSH client for windows. OpenSSH for windows. PuTTY for…

  • How to implement the Vigenère cipher in python

    Another substitution cipher is the Vigenère cipher. In this post, I give you an explanation of the cipher and a python implementation. The Vigenère cipher is categorized under polyalphabetic substitution ciphers. This type of cipher works as follows[1]: The Vigenère cipher This cipher is quite easy to understand. We apply the Caesar cipher to each…

  • How to implement the Hill Cipher in Python?

    The Hill cipher is a multi-letter cipher. It is based on Linear Algebra operations, specifically matrix operations. It was created in 1929 by the mathematician Lester Hill. Some concepts you might want to revisit are matrix multiplication and inversion. The Hill cipher To encrypt a text with the Hill cipher, we have to encrypt three…

  • MD5 length extension attack in Python

    The length extension attack exploits the fact that the hash value created with the Merkle-Damgård construction represents the internal state of the Initial Vector at the end of the execution. This means that you can use the hash value to set up the internal state (the modified values of the Initial Vector) and keep processing…

  • What is the Merkle-Damgård construction?

    The Merkle-Damgård construction is a scheme to design collision-resistant cryptographic hash functions. The scheme uses one-way compression functions that are collision-resistant. The original message is extended so it has a size of a specific multiple (i.e. 512 or 1024). The message is then divided into blocks (512 bits or 1024 bits). Then, we apply the…

  • What is the birthday paradox and how we can use it in cryptography?

    The birthday paradox is the result of solving the birthday problem. The birthday problem is as follows: What is the probability that in a random set of n people, two people share the same birthday? Another way we can state this problem is: What is the minimum k number of people such that the probability…

  • Secure Hash Algorithm 2 (SHA-2)

    SHA-2 is a family of cryptographic hash algorithms used to create message digest to verify the integrity of information (usually files). They are the current standard in cryptographic hash functions and have several applications, included digital signatures. Introduction SHA-2 is based on the Merkle-Damgård construction. Find below an illustration of this construction. Notice that the…