Just Cryptography

Learn Cryptography and Information Security

# Category: Keys

• ## 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…

Read more: What is a cryptographically secure random number generator?
• ## 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,…

Read more: Primality tests: The Miller-Rabin test
• ## 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…

Read more: What is the Diffie-Hellman Key Exchange?
• ## 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…

Read more: How to generate Elliptic Curve Cryptography (ECC) key pairs
• ## 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) =…

Read more: How to generate RSA key pairs
• ## 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…

Read more: How to create secure keys for symmetric encryption?
• ## 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…

Read more: What is key length in cryptography and why is important?
• ## What is a Key Distribution Center (KDC)?

A Key Distribution Center is the way to automatically distribute keys to support arbitrary connections between pairs of users. The users can be a computer, a process or applications. Each user shares a unique key with the KDC, known as the master key. To understand the use of a KDC we need to understand what…

Read more: What is a Key Distribution Center (KDC)?