InfoSec Write-ups

A collection of write-ups from the best hackers in the world on topics ranging from bug bounties and CTFs to vulnhub machines, hardware challenges and real life encounters. Subscribe to our weekly newsletter for the coolest infosec updates: https://weekly.infosecwriteups.com/

Follow publication

Understanding RSA Encryption: The Rivest-Shamir-Adleman Algorithm

Key Generation, Encryption Process, Decryption Process, Advantages, Disadvantages, and Applications | Karthikeyan Nagaraj

Karthikeyan Nagaraj
InfoSec Write-ups
Published in
4 min readFeb 23, 2023

--

Introduction:

RSA (Rivest–Shamir–Adleman) is a public-key encryption algorithm that was developed in 1977 by Ron Rivest, Adi Shamir, and Leonard Adleman.

RSA is widely used for secure communication, digital signatures, and encryption of sensitive data RSA encryption is based on the difficulty of factoring large integers, which makes it very difficult to crack.

Public Key Cryptography

Public key cryptography, also known as asymmetric cryptography, is a cryptographic system that uses two keys: a public key and a private key. The public key is used for encryption, and anyone can use it to encrypt data that can only be decrypted using the private key. The private key is kept secret and is used for decryption.

Key Generation

  • RSA key generation involves generating two large prime numbers, p, and q.
  • The product of p and q is called the modulus, n.
  • The modulus, n, is made public, while the prime factors, p, and q, are kept secret.
  • The private key consists of the pair of prime numbers, p, and q, while the public key consists of the modulus, n, and a number, e, known as the public exponent.
  • The public exponent is usually chosen to be a small prime number, such as 65537.

Encryption Process

The encryption process in RSA involves the following steps:

  1. The message is converted into a number using a standardized encoding scheme, such as ASCII or Unicode.
  2. The message is raised to the power of the public exponent, e, modulo the modulus, n. This generates the ciphertext, which is the encrypted message.
  3. The ciphertext is sent to the recipient.

Decryption Process

The decryption process in RSA involves the following steps:

--

--

Published in InfoSec Write-ups

A collection of write-ups from the best hackers in the world on topics ranging from bug bounties and CTFs to vulnhub machines, hardware challenges and real life encounters. Subscribe to our weekly newsletter for the coolest infosec updates: https://weekly.infosecwriteups.com/

Written by Karthikeyan Nagaraj

Entrepreneur | Writer | Cyber Security Consultant | AI Researcher TopMate - https://topmate.io/cyberw1ng

No responses yet

Write a response