MD5 – Message-Digest Algorithm

The MD5 hashing algorithm is a one-way cryptographic function that accepts a message of any length as input and returns as output a fixed-length encrypted value further used for authentication. As it is hash function so it is irreversible. MD5 hash function is severely compromised, MD5 is not collision-resistant. The weaknesses of MD5 have been exploited in the field, most infamously by the Flame malware … Continue reading MD5 – Message-Digest Algorithm

cryptography

Cryptography – Mixture of Art and science

Being human, we always concern about our privacy. Privacy plays a significant role in our lives, right from starting on the day till the end of the day. As part of privacy, we want our data, message to be secure. A common example is when we send a text message mostly expecting that only intended recipients should receive it. So being intelligent, human started manipulating … Continue reading Cryptography – Mixture of Art and science

Deep Dive in RC4 (RC4 Source Code in C#)

RC4 (Rivest Cipher 4) was designed by Ron Rivest. It is remarkable for its speed and simplicity. It widely used in many applications and protocols. Though, there are multiple Vulnerability has been discovered in RC4.  It is a stream cipher type. It encrypt/decrypt input data one by one. In this way, the encryption or decryption can be implemented on the length of the variable. This algorithm does not … Continue reading Deep Dive in RC4 (RC4 Source Code in C#)

eXtended Tiny Encryption Algorithm (XTEA) – PART II

In this article, we will demonstrate eXtended Tiny Encryption Algorithm (XTEA). Don’t forget to read the Part I of TEA. XTEA (eXtended TEA) is a block cipher designed to fix weaknesses in TEA. Like TEA, XTEA is a 64-bit block Feistel cipher with a 128-bit key and a suggested 64 rounds. As per book “Information Security and Cryptology – ICISC 2003“ TEA is a 64-round … Continue reading eXtended Tiny Encryption Algorithm (XTEA) – PART II

Cryptography - Tiny Encryption Algorithm, TEA

Tiny Encryption Algorithm (TEA)- Part I

 Tiny Encryption Algorithm is a simple, powerful & notably fast encryption algorithm. Although TEA algorithm has a few weaknesses as it suffers from equivalent keys (Which left the room for related-key attacks) – each key is equivalent to three others, which means that the effective key size is only 126. It is Feistel type cipher, the algorithm relies on the alternate use of XOR and ADD … Continue reading Tiny Encryption Algorithm (TEA)- Part I

Symmetric encryption Cryptography

Symmetric Cryptography

This is the simplest kind of Cryptography that involves only one secret key to encrypt and decrypt information. It is also known as “Secret Key Cryptography”.   Both Sender and receiver should know the key to be able to communicate securely.   For Example: if Mahesh & Shalini wants to communicate using symmetric-key cryptography then both would have to devise key and use it for … Continue reading Symmetric Cryptography

asymmetric cryptography

Asymmetric Cryptography (Public Key Cryptography) – Part I

Asymmetric cryptography, also known as public key cryptography, it uses two distinct, yet related keys. One key, the Public Key, is used for encryption and the other, the Private Key, is for decryption. Let say Mahesh wants to send an encrypted message to Shalini, Mahesh will look for Shalini Public key and use it for encrypt the message before sending it. Then Shalini Can decrypt … Continue reading Asymmetric Cryptography (Public Key Cryptography) – Part I

types of cryptography

Basic of Cryptography (Type of Cryptography)- Part II

Cryptography categorized based on number of keys used for encryption and decryption; Below are list of cryptography catgories  Secret Key Cryptography – It is also call symmetric encryption where for both encryption and decryption uses same key. This is mainly used for confidentiality. Public Key Cryptography – It is also called asymmetric encryption; this algorithm uses two key’s one for encryption and one for decryption. … Continue reading Basic of Cryptography (Type of Cryptography)- Part II

Break caesar-cipher with brute force attack

Caesar Cipher (Cracking Caesar Cipher with the Brute-Force Technique) – Part II

In Part I, I have written code to encrypt the plain text for demonstration purpose . In this article we will use Brute Force technique to decrypt the encrypted message. Note: please make sure to read articles Brute force and Caesar Cipher before this article. Here is C# Code snippet for the same Above code produce below  result, the above code took 17 iteration  to get the actual … Continue reading Caesar Cipher (Cracking Caesar Cipher with the Brute-Force Technique) – Part II

Caeser Cipher in source code in C#

Caesar Cipher Source Code – Part I

The Caesar cipher is one of the earliest known and simplest ciphers; Created and used in 44 BC by Julius Caesar. It is a type of substitution cipher in which each letter in the plain text is ‘shifted’ with certain number of places in the alphabet. For example, if we right shift the alphabets by 3 char then we get the below text;     … Continue reading Caesar Cipher Source Code – Part I

Brute Force

Brute Force – Part I

Brute force is a straight forward strategy to solving a problem, it’s also called as ‘Exhaustive Search’ in which you try all possibilities to reach solution of a problem. In Brute force attack, attacker systematically checks all possible passwords and passphrases until the correct one is found. Alternatively, the attacker can attempt to guess the key, which is typically created from the password using a key … Continue reading Brute Force – Part I

SHA-256(Source Code in C# using .Net in-built Cryptography library) – Part II

.Net Framework provides in built support for various hash functions like MD-5, SHA-1, SHA-256 etc…   ComputeHash method Computes the hash value to the specified byte array.   Below are the overloaded methods to Compute Hash using SHA-256 class in System.Security.Cryptography  library     Here is C# source code using .Net In-build library Continue reading SHA-256(Source Code in C# using .Net in-built Cryptography library) – Part II

SHA-256(Source Code in C#) – Part I

SHA-256 (Secure Hash Algorithm), is one of the cryptographic hash function, commonly used in Blockchain. It generates an almost-unique 256-bit (32-byte) signature for a text.  SHA-256 is successor hash functions to SHA-1. it is one of the strongest hash functions available and has not yet been compromised in any way.   Here is source code written in C#. I will try to give more details in next … Continue reading SHA-256(Source Code in C#) – Part I

Cryptography Hashing

What do you mean by Hashing?

Hashing is process of converting any size of data into fix size of data by performing mathematical operations. A message to be hashed is called input; the Algorithm is used to do so is called hash function; the output is called hash value.   There are many algorithm which used to generate hash value like MD5, SHA-1, SHA-256, Tiger etc.    Hash function generates a … Continue reading What do you mean by Hashing?

basic of cryptography

Basic of Cryptography – Part I

Cryptograph means secret writing, in order to make information secret we use cipher, an algorithm that converts plain text to cipher-text. Cipher has been used long before computer existance. In 44 BC Julius Caesar uses the technique now called Caeser Cipher to send message. He used to shfit the letter by 3 character.  Another great example from history, Nazis Enigma Machine used during war to translate message. … Continue reading Basic of Cryptography – Part I