RSA - Rivest–Shamir–Adleman ============================== .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What is RSA?** RSA stands for Rivest–Shamir–Adleman, the surnames of its inventors. It is an asymmetric encryption algorithm that uses a pair of keys: a **public key** for encryption and a **private key** for decryption. RSA is widely used for secure data transmission, digital signatures, and key exchange. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Why is RSA useful?** * Enables secure communication over untrusted networks * No need to share a secret key in advance * Supports digital signatures for authenticity and data integrity * Common in hybrid encryption—RSA secures symmetric keys (e.g., AES) * Critical for internet security protocols (SSL/TLS, HTTPS) .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **How it works** * **Key generation** – Two large prime numbers are selected to generate public/private key pairs * **Encryption** – The sender encrypts data using the recipient’s public key * **Transmission/Storage** – The encrypted data (ciphertext) is securely transferred or stored * **Decryption** – The receiver uses their private key to decrypt the ciphertext into plaintext .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Where is RSA used?** * **SSL/TLS (HTTPS)** – Secures web traffic and certificate-based authentication * **Email encryption** – Used in PGP, S/MIME * **Digital signatures** – Validates authenticity of documents, messages, and software * **VPNs and tunnels** – For secure key exchange * **Cryptocurrencies** – Used in wallets and signing blockchain transactions .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which OSI layer does this protocol belong to?** * RSA operates at the **Presentation Layer (Layer 6)** * Handles encryption, decryption, and digital signature functions * Ensures secure formatting and representation of data before it reaches the application layer .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Topics in this section, * :ref:`Learnings in this section ` * :ref:`Terminology ` * :ref:`Version Info ` * :ref:`RSA Version&RFC Details ` * :ref:`RSA Basic Setup on Ubuntu using IPv4 ` * :ref:`RSA Basic Setup on Ubuntu using IPv6 ` * :ref:`RSA Protocol Packet Details ` * :ref:`RSA Usecases ` * :ref:`RSA Basic Features ` * :ref:`RSA Feature : Asymmetric Key Algorithm ` * :ref:`RSA Feature : Key Pair Generation ` * :ref:`RSA Feature : Public Key Distributuion ` * :ref:`RSA Feature : Digital Signatures ` * :ref:`RSA Feature : Encryption & Decryption ` * :ref:`RSA Feature : Key sizes ` * :ref:`RSA Feature : Slower than Symmetric Ciphers ` * :ref:`RSA Feature : Widely Used in Protocols ` * :ref:`RSA Feature : Standardized ` * :ref:`Reference links ` .. _RSA_step1: .. tab-set:: .. tab-item:: Learnings in this section * In this section, you are going to learn .. _RSA_step2: .. tab-set:: .. tab-item:: Terminology * Terminology .. _RSA_step3: .. tab-set:: .. tab-item:: Version Info * Version Info .. _RSA_step5: .. tab-set:: .. tab-item:: RSA Version&RFC Details .. csv-table:: :file: ./RSA/rsa_rfc_details.csv :widths: 10,10,10,30 :header-rows: 1 .. _RSA_step19: .. tab-set:: .. tab-item:: RSA Basic Setup on Ubuntu using IPv4 * Setup .. _RSA_step20: .. tab-set:: .. tab-item:: RSA Basic Setup on Ubuntu using IPv6 * Setup .. _RSA_step6: .. tab-set:: .. tab-item:: RSA Protocol Packet Details **RSA Key Generation Packet** .. csv-table:: :file: ./RSA/rsa_packet1_details.csv :widths: 10,20,30,10 :header-rows: 1 **RSA Encryption Packet** .. csv-table:: :file: ./RSA/rsa_packet2_details.csv :widths: 10,20,30,10 :header-rows: 1 **RSA Decryption Packet** .. csv-table:: :file: ./RSA/rsa_packet3_details.csv :widths: 10,20,30,10 :header-rows: 1 .. _RSA_step7: .. tab-set:: .. tab-item:: RSA Usecases .. csv-table:: :file: ./RSA/rsa_usecases.csv :widths: 10,20,30 :header-rows: 1 .. _RSA_step8: .. tab-set:: .. tab-item:: RSA Basic Features .. csv-table:: :file: ./RSA/rsa_features.csv :widths: 10,10,30 :header-rows: 1 .. _RSA_step9: .. tab-set:: .. tab-item:: RSA Feature : Asymmetric Key Algorithm **Asymmetric Key Algorithm - Testcases** .. csv-table:: :file: ./RSA/rsa_feature1_test_cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _RSA_step10: .. tab-set:: .. tab-item:: RSA Feature : Key Pair Generation **Key Pair Generation - Testcases** .. csv-table:: :file: ./RSA/rsa_feature2_test_cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _RSA_step11: .. tab-set:: .. tab-item:: RSA Feature : Public Key Distribution **Public Key Distribution - Testcases** .. csv-table:: :file: ./RSA/rsa_feature3_test_cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _RSA_step12: .. tab-set:: .. tab-item:: RSA Feature : Digital Signatures **Digital Signatures - Testcases** .. csv-table:: :file: ./RSA/rsa_feature4_test_cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _RSA_step13: .. tab-set:: .. tab-item:: RSA Feature : Encryption & Decryption **Encryption & Decryption - Testcases** .. csv-table:: :file: ./RSA/rsa_feature5_test_cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _RSA_step14: .. tab-set:: .. tab-item:: RSA Feature : Key Sizes **Key Sizes - Testcases** .. csv-table:: :file: ./RSA/rsa_feature6_test_cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _RSA_step15: .. tab-set:: .. tab-item:: RSA Feature : Slower than Symmetric Ciphers **Slower than Symmetric Ciphers - Testcases** .. csv-table:: :file: ./RSA/rsa_feature7_test_cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _RSA_step16: .. tab-set:: .. tab-item:: RSA Feature : Widely Used in Protocols **Widely Used in Protocols - Testcases** .. csv-table:: :file: ./RSA/rsa_feature8_test_cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _RSA_step17: .. tab-set:: .. tab-item:: RSA Feature : Standardized **Standardized - Testcases** .. csv-table:: :file: ./RSA/rsa_feature9_test_cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _RSA_step18: .. tab-set:: .. tab-item:: Reference links * Reference links