ECC - Elliptic Curve Cryptography ================================== .. 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 ECC?** ECC (Elliptic Curve Cryptography) is an **asymmetric encryption** method based on elliptic curve mathematics over finite fields. It offers **strong security with much smaller key sizes** compared to RSA, making it efficient for mobile and embedded systems. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Why is ECC useful?** * Strong security with small keys – A 256-bit ECC key ≈ 3072-bit RSA key * Fast encryption/decryption – Less computation needed * Efficient storage/bandwidth – Smaller keys and digital signatures * Ideal for constrained devices – Used in mobile, IoT, and embedded systems .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **How it works** * **Key generation** – Private key is randomly chosen; public key is derived using elliptic curve point multiplication * **Encryption** – Sender uses the recipient’s public key and an ephemeral key to encrypt the message * **Decryption** – Recipient uses private key to decrypt the ciphertext * **Common usages**: * **ECDSA** – For digital signatures * **ECDH** – For secure key exchange .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Where is ECC used?** * **SSL/TLS (HTTPS)** – ECC-based digital certificates * **Digital signatures** – ECDSA in blockchain, software signing * **Cryptocurrencies** – Wallets and transaction signing * **Mobile apps & IoT** – Lightweight and energy-efficient security * **VPNs & tunnels** – ECC used in protocols like IKEv2/IPsec .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which OSI layer does this protocol belong to?** * ECC operates at the **Presentation Layer (Layer 6)** * Handles encryption, decryption, and digital signatures * Ensures confidentiality, integrity, and secure formatting of data before reaching the application .. 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:`ECC Version&RFC Details ` * :ref:`ECC Basic Setup on Ubuntu using IPv4 ` * :ref:`ECC Basic Setup on Ubuntu using IPv6 ` * :ref:`ECC Protocol Packet Details ` * :ref:`ECC Usecases ` * :ref:`ECC Basic Features ` * :ref:`ECC Feature : Asymmetric Key Algorithm ` * :ref:`ECC Feature : Elliptic Curve Mathematics ` * :ref:`ECC Feature : Smaller Key Sizes ` * :ref:`ECC Feature : Efficient Computation ` * :ref:`ECC Feature : Digital Signatures (ECDSA) ` * :ref:`ECC Feature : Key Exchange (ECDH) ` * :ref:`ECC Feature : Low Bandwidth & Storage ` * :ref:`ECC Feature : Ideal for Mobile & IoT ` * :ref:`ECC Feature : Widely Standardized ` * :ref:`ECC Feature : Used in Modern Protocols ` * :ref:`Reference links ` .. _ECC_step1: .. tab-set:: .. tab-item:: Learnings in this section * In this section, you are going to learn .. _ECC_step2: .. tab-set:: .. tab-item:: Terminology * Terminology .. _ECC_step3: .. tab-set:: .. tab-item:: Version Info * Version Info .. _ECC_step5: .. tab-set:: .. tab-item:: ECC Version&RFC Details .. csv-table:: :file: ./ECC/ecc_rfc_details.csv :widths: 10,10,10,30 :header-rows: 1 .. _ECC_step20: .. tab-set:: .. tab-item:: ECC Basic Setup on Ubuntu using IPv4 * Setup .. _ECC_step21: .. tab-set:: .. tab-item:: ECC Basic Setup on Ubuntu using IPv6 * Setup .. _ECC_step6: .. tab-set:: .. tab-item:: ECC Protocol Packet Details **ECC key Generation Packet** .. csv-table:: :file: ./ECC/ecc_packet1_details.csv :widths: 10,20,30,10 :header-rows: 1 **ECC Encryption Packet (ECIES)** .. csv-table:: :file: ./ECC/ecc_packet2_details.csv :widths: 10,20,30,10 :header-rows: 1 **ECC Signture Packet (ECDSA)** .. csv-table:: :file: ./ECC/ecc_packet3_details.csv :widths: 10,20,30,10 :header-rows: 1 .. _ECC_step7: .. tab-set:: .. tab-item:: ECC Usecases .. csv-table:: :file: ./ECC/ecc_usecases.csv :widths: 10,20,30 :header-rows: 1 .. _ECC_step8: .. tab-set:: .. tab-item:: ECC Basic Features .. csv-table:: :file: ./ECC/ecc_features.csv :widths: 10,10,30 :header-rows: 1 .. _ECC_step9: .. tab-set:: .. tab-item:: ECC Feature : Asymmetric Key Algorithm **Asymmetric Key Algorithm - Testcases** .. csv-table:: :file: ./ECC/ecc_feature1_test_cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _ECC_step10: .. tab-set:: .. tab-item:: ECC Feature : Elliptic Curve Mathematics **Elliptic Curve Mathematics - Testcases** .. csv-table:: :file: ./ECC/ecc_feature2_test_cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _ECC_step11: .. tab-set:: .. tab-item:: ECC Feature : Smaller Key Sizes **Smaller Key Sizes - Testcases** .. csv-table:: :file: ./ECC/ecc_feature3_test_cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _ECC_step12: .. tab-set:: .. tab-item:: ECC Feature : Efficient Computation **Efficient Computation - Testcases** .. csv-table:: :file: ./ECC/ecc_feature4_test_cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _ECC_step13: .. tab-set:: .. tab-item:: ECC Feature : Digital Signatures (ECDSA) **Digital Signatures (ECDSA) - Testcases** .. csv-table:: :file: ./ECC/ecc_feature5_test_cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _ECC_step14: .. tab-set:: .. tab-item:: ECC Feature : Key Exchange (ECDH) **Key Exchange (ECDH) - Testcases** .. csv-table:: :file: ./ECC/ecc_feature6_test_cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _ECC_step15: .. tab-set:: .. tab-item:: ECC Feature : Low Bandwidth & Storage **Low Bandwidth & Storage - Testcases** .. csv-table:: :file: ./ECC/ecc_feature7_test_cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _ECC_step16: .. tab-set:: .. tab-item:: ECC Feature : Ideal for Mobile & IoT **Ideal for Mobile & IoT - Testcases** .. csv-table:: :file: ./ECC/ecc_feature8_test_cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _ECC_step17: .. tab-set:: .. tab-item:: ECC Feature : Widely Standardized **Widely Standardized - Testcases** .. csv-table:: :file: ./ECC/ecc_feature9_test_cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _ECC_step18: .. tab-set:: .. tab-item:: ECC Feature : Used in Modern Protocols **Used in Modern Protocols - Testcases** .. csv-table:: :file: ./ECC/ecc_feature10_test_cases.csv :widths: 10,10,30,20 :header-rows: 1 .. _ECC_step19: .. tab-set:: .. tab-item:: Reference links * Reference links