-
What is a security attack (with examples)?
A security attack is an activity or act made upon a system with the goal to obtain unauthorized access to information or resources. It is usually carried out by evading security policies that are in place in organizations or individual devices. Two definitions provided by RFC 4949 are: An intentional act by which an entity…
-
What is the Man-In-The-Middle attack?
Man-In-The-Middle (MITM) attack is one of many approaches that attackers or hackers use to steal or get unauthorized access to information. The MITM attack is a well-known attack where an attacker intercepts the information transmitted in a communication. At that point, the attacker can just resend the same information or modify it and re-send it.…
-
What is a Replay Attack in Cryptography?
Cryptographic algorithms are susceptible to different attacks. One of such attacks is a Replay Attack. This attack consists in the following: Capture the data that is transmitted. Re-send the data that was captured, no need to modify before resending it. Produce an unauthorized action. From the description above, you can see that the attacker does…
-
What is a cryptographically secure random number generator?
Random number generation is a very important topic in Cryptography. It is the technique that helps us avoid brute force attacks. A brute force attack is when the attacker tries all possible keys to try to decode an encrypted message. If the attacker can predict how the key was generated, then the number of keys…
-
Primality tests: The Miller-Rabin test
Prime numbers are very important in Cryptography. It is for that reason that you will have to study some methods for testing whether a given number is prime or not (a.k.a. primality tests). One of such methods is the Miller-Rabin Test. A number n is prime if and only if it has only two divisors,…
-
What is the Diffie-Hellman Key Exchange?
Diffie-Hellman (DH) Key Exchange is one of the earliest Public Key Cryptosystem. The protocol uses a public key to securely exchange the private key. Although it is a Public Key Cryptosystem, the main goal of this protocol is to exchange a key (a.k.a. shared secret), so the two users can then encrypt the information using…
-
How to generate Elliptic Curve Cryptography (ECC) key pairs
Elliptic Curve Cryptography (ECC) is a modern Public Key Cryptosystem. ECC is difficult to explain because of all the mathematics background you need to understand the algorithms. In this post, I’ll give you a practical approach and I’ll show you how you can generate key pairs using ECC and Python. Example of key pair generation…
-
How to generate RSA key pairs
The Rivest-Shamir-Adleman (RSA) scheme is the most widely accepted approach for public-key cryptography. Here I’ll show you how to generate RSA key pairs. The RSA algorithm to generate the key pairs is as follows: Choose p, q, two prime numbers Calculate n = pq Calculate f(n) = (p-1)(q-1) Chose e such that gcd(f(n), e) =…
-
How to create secure keys for symmetric encryption?
Secure keys creation is a topic of utmost importance in Cryptography and Network Security. The stronger the keys the better, the more secure your data will be. But, how to create strong keys/passwords? In classic cryptography, we were expected to create the keys used for encryption. For instance, Caesar Shift Cipher uses an integer number…
-
What is key length in cryptography and why is important?
In cryptography, we secure a message by encrypting the message with a certain key and then sending it over the network. The security of the encryption usually depends on the key length. In this article, I’ll show why key length is a very important topic in cryptography. Key length (a.k.a. key size) is the number…