×
1 Choose EITC/EITCA Certificates
2 Learn and take online exams
3 Get your IT skills certified

Confirm your IT skills and competencies under the European IT Certification framework from anywhere in the world fully online.

EITCA Academy

Digital skills attestation standard by the European IT Certification Institute aiming to support Digital Society development

LOG IN TO YOUR ACCOUNT

CREATE AN ACCOUNT FORGOT YOUR PASSWORD?

FORGOT YOUR PASSWORD?

AAH, WAIT, I REMEMBER NOW!

CREATE AN ACCOUNT

ALREADY HAVE AN ACCOUNT?
EUROPEAN INFORMATION TECHNOLOGIES CERTIFICATION ACADEMY - ATTESTING YOUR PROFESSIONAL DIGITAL SKILLS
  • SIGN UP
  • LOGIN
  • INFO

EITCA Academy

EITCA Academy

The European Information Technologies Certification Institute - EITCI ASBL

Certification Provider

EITCI Institute ASBL

Brussels, European Union

Governing European IT Certification (EITC) framework in support of the IT professionalism and Digital Society

  • CERTIFICATES
    • EITCA ACADEMIES
      • EITCA ACADEMIES CATALOGUE<
      • EITCA/CG COMPUTER GRAPHICS
      • EITCA/IS INFORMATION SECURITY
      • EITCA/BI BUSINESS INFORMATION
      • EITCA/KC KEY COMPETENCIES
      • EITCA/EG E-GOVERNMENT
      • EITCA/WD WEB DEVELOPMENT
      • EITCA/AI ARTIFICIAL INTELLIGENCE
    • EITC CERTIFICATES
      • EITC CERTIFICATES CATALOGUE<
      • COMPUTER GRAPHICS CERTIFICATES
      • WEB DESIGN CERTIFICATES
      • 3D DESIGN CERTIFICATES
      • OFFICE IT CERTIFICATES
      • BITCOIN BLOCKCHAIN CERTIFICATE
      • WORDPRESS CERTIFICATE
      • CLOUD PLATFORM CERTIFICATENEW
    • EITC CERTIFICATES
      • INTERNET CERTIFICATES
      • CRYPTOGRAPHY CERTIFICATES
      • BUSINESS IT CERTIFICATES
      • TELEWORK CERTIFICATES
      • PROGRAMMING CERTIFICATES
      • DIGITAL PORTRAIT CERTIFICATE
      • WEB DEVELOPMENT CERTIFICATES
      • DEEP LEARNING CERTIFICATESNEW
    • CERTIFICATES FOR
      • EU PUBLIC ADMINISTRATION
      • TEACHERS AND EDUCATORS
      • IT SECURITY PROFESSIONALS
      • GRAPHICS DESIGNERS & ARTISTS
      • BUSINESSMEN AND MANAGERS
      • BLOCKCHAIN DEVELOPERS
      • WEB DEVELOPERS
      • CLOUD AI EXPERTSNEW
  • FEATURED
  • SUBSIDY
  • HOW IT WORKS
  •   IT ID
  • ABOUT
  • CONTACT
  • MY ORDER
    Your current order is empty.
EITCIINSTITUTE
CERTIFIED

What is a public key?

by Emmanuel Udofia / Friday, 09 August 2024 / Published in Cybersecurity, EITC/IS/CCF Classical Cryptography Fundamentals, Introduction to public-key cryptography, Number theory for PKC – Euclidean Algorithm, Euler’s Phi Function and Euler’s Theorem

A public key is a fundamental concept in public-key cryptography, which is an essential branch of cybersecurity. Public-key cryptography, also known as asymmetric cryptography, involves the use of two distinct but mathematically related keys: a public key and a private key. These keys are used for encryption and decryption, as well as for digital signatures and verification processes. The public key is intended to be widely distributed and accessible, while the private key remains confidential to the owner.

The public key is used in various cryptographic protocols and algorithms, such as RSA (Rivest-Shamir-Adleman), ECC (Elliptic Curve Cryptography), and DSA (Digital Signature Algorithm). Its primary purpose is to enable secure communication and authentication over insecure channels, such as the internet. The security of public-key cryptography relies on the computational difficulty of certain mathematical problems, such as integer factorization and discrete logarithms.

Mathematical Foundations

To understand public keys, it is essential to consider the mathematical foundations that underpin public-key cryptography. Key concepts include the Euclidean Algorithm, Euler's Phi Function, and Euler's Theorem.

Euclidean Algorithm

The Euclidean Algorithm is a method for finding the greatest common divisor (GCD) of two integers. It is based on the principle that the GCD of two numbers also divides their difference. This algorithm is important for key generation in public-key cryptography, particularly in the RSA algorithm.

For two integers a and b where a > b, the Euclidean Algorithm proceeds as follows:

1. Compute the remainder r of a divided by b (i.e., a = bq + r, where q is the quotient and r is the remainder).
2. Replace a with b and b with r.
3. Repeat the process until r = 0. The non-zero remainder at this stage is the GCD of a and b.

Euler’s Phi Function

Euler's Phi Function, denoted as \phi(n), counts the number of integers up to n that are coprime with n. Two numbers are coprime if their GCD is 1. Euler's Phi Function is fundamental in the RSA algorithm for determining the totient of a product of two prime numbers.

For a prime number p, \phi(p) = p - 1. For two distinct prime numbers p and q, \phi(pq) = (p - 1)(q - 1).

Euler’s Theorem

Euler's Theorem states that for any integer a and n that are coprime, the following congruence holds:

    \[ a^{\phi(n)} \equiv 1 \ (\text{mod} \ n) \]

This theorem is a generalization of Fermat's Little Theorem and is instrumental in the RSA encryption and decryption processes. In RSA, Euler's Theorem is used to ensure that the encryption and decryption functions are inverses of each other.

Public-Key Cryptography Algorithms

RSA Algorithm

The RSA algorithm, named after its inventors Rivest, Shamir, and Adleman, is one of the most widely used public-key cryptosystems. It involves the following steps:

1. Key Generation:
– Choose two large prime numbers p and q.
– Compute n = pq.
– Compute \phi(n) = (p - 1)(q - 1).
– Choose an integer e such that 1 < e < \phi(n) and \text{GCD}(e, \phi(n)) = 1.
– Compute d as the modular multiplicative inverse of e modulo \phi(n), i.e., de \equiv 1 \ (\text{mod} \ \phi(n)).

The public key is (n, e), and the private key is (n, d).

2. Encryption:
– Given a plaintext message M, convert it to an integer m such that 0 \leq m < n.
– Compute the ciphertext c using the public key: c = m^e \ (\text{mod} \ n).

3. Decryption:
– Compute the plaintext message m using the private key: m = c^d \ (\text{mod} \ n).
– Convert the integer m back to the original message M.

Elliptic Curve Cryptography (ECC)

Elliptic Curve Cryptography (ECC) is based on the algebraic structure of elliptic curves over finite fields. ECC offers comparable security to RSA but with smaller key sizes, making it more efficient in terms of computation and storage.

In ECC, the public key is a point on the elliptic curve, and the private key is a randomly chosen integer. The security of ECC relies on the difficulty of the Elliptic Curve Discrete Logarithm Problem (ECDLP).

Digital Signature Algorithm (DSA)

The Digital Signature Algorithm (DSA) is used for digital signatures, ensuring the authenticity and integrity of a message. It involves the following steps:

1. Key Generation:
– Choose a prime number p.
– Choose a prime divisor q of p - 1.
– Choose a generator g of the subgroup of order q in the multiplicative group of integers modulo p.
– Choose a private key x such that 0 < x < q.
– Compute the public key y = g^x \ (\text{mod} \ p).

2. Signature Generation:
– Compute a hash of the message H(M).
– Choose a random integer k such that 0 < k < q.
– Compute r = (g^k \ (\text{mod} \ p)) \ (\text{mod} \ q).
– Compute s = (k^{-1}(H(M) + xr)) \ (\text{mod} \ q).
– The signature is (r, s).

3. Signature Verification:
– Compute w = s^{-1} \ (\text{mod} \ q).
– Compute u_1 = (H(M)w) \ (\text{mod} \ q) and u_2 = (rw) \ (\text{mod} \ q).
– Compute v = ((g^{u_1} y^{u_2}) \ (\text{mod} \ p)) \ (\text{mod} \ q).
– The signature is valid if v = r.

Practical Applications

Public keys are used in various practical applications, including:

1. Secure Communication:
– Public keys enable secure communication over the internet through protocols such as SSL/TLS. In these protocols, public keys are used to establish encrypted connections between clients and servers.

2. Digital Signatures:
– Public keys are used to verify digital signatures, ensuring the authenticity and integrity of electronic documents and messages. This is important in legal, financial, and governmental transactions.

3. Key Exchange:
– Public keys facilitate secure key exchange protocols, such as Diffie-Hellman, allowing parties to securely agree on a shared secret key for symmetric encryption.

4. Cryptographic Authentication:
– Public keys are used in authentication protocols, such as SSH (Secure Shell) and digital certificates, to verify the identity of users and devices.

Example of RSA Key Generation

To illustrate the RSA key generation process, consider the following example:

1. Choose two large prime numbers p = 61 and q = 53.
2. Compute n = pq = 61 \times 53 = 3233.
3. Compute \phi(n) = (p - 1)(q - 1) = 60 \times 52 = 3120.
4. Choose e = 17, which is coprime with 3120.
5. Compute d such that de \equiv 1 \ (\text{mod} \ 3120). Using the Extended Euclidean Algorithm, we find d = 2753.

The public key is (n, e) = (3233, 17), and the private key is (n, d) = (3233, 2753).

Example of RSA Encryption and Decryption

Given the public key (3233, 17) and a plaintext message M = 42:

1. Convert M to an integer m = 42.
2. Compute the ciphertext c = 42^{17} \ (\text{mod} \ 3233) = 2557.

To decrypt the ciphertext c = 2557 using the private key (3233, 2753):

1. Compute the plaintext message m = 2557^{2753} \ (\text{mod} \ 3233) = 42.
2. Convert the integer m = 42 back to the original message M = 42.

This example demonstrates the use of public and private keys in the RSA algorithm for secure communication.

Other recent questions and answers regarding EITC/IS/CCF Classical Cryptography Fundamentals:

  • Was public-key cryptography introduced for use in encryption?
  • Is the set of all possible keys of a particular cryptographic protocol referred to as the keyspace in cryptography?
  • In a shift cipher, are the letters at the end of the alphabet replaced with letters from the beginning of the alphabet according to modular arithmetic?
  • What should a block cipher include according to Shannon?
  • Was the DES protocol introduced to improve the security of AES cryptosystems?
  • Does the security of block ciphers depend on combining confusion and diffusion operations many times?
  • Do the encryption and decryption functions need to be kept secret for the cryptographic protocol to remain secure?
  • Can cryptanalysis be used to communicate securely over an insecure communication channel?
  • Do Internet, GSM, and wireless networks belong to the insecure communication channels?
  • Is an exhaustive key search effective against substitution ciphers?

View more questions and answers in EITC/IS/CCF Classical Cryptography Fundamentals

More questions and answers:

  • Field: Cybersecurity
  • Programme: EITC/IS/CCF Classical Cryptography Fundamentals (go to the certification programme)
  • Lesson: Introduction to public-key cryptography (go to related lesson)
  • Topic: Number theory for PKC – Euclidean Algorithm, Euler’s Phi Function and Euler’s Theorem
Tagged under: Cybersecurity, DSA, ECC, EUCLIDEAN ALGORITHM, Public Key Cryptography, RSA
Home » Cybersecurity » EITC/IS/CCF Classical Cryptography Fundamentals » Introduction to public-key cryptography » Number theory for PKC – Euclidean Algorithm, Euler’s Phi Function and Euler’s Theorem » » What is a public key?

Certification Center

USER MENU

  • My Account

CERTIFICATE CATEGORY

  • EITC Certification (105)
  • EITCA Certification (9)

What are you looking for?

  • Introduction
  • How it works?
  • EITCA Academies
  • EITCI DSJC Subsidy
  • Full EITC catalogue
  • Your order
  • Featured
  •   IT ID
  • EITCA reviews (Medium publ.)
  • About
  • Contact

EITCA Academy is a part of the European IT Certification framework

The European IT Certification framework has been established in 2008 as a Europe based and vendor independent standard in widely accessible online certification of digital skills and competencies in many areas of professional digital specializations. The EITC framework is governed by the European IT Certification Institute (EITCI), a non-profit certification authority supporting information society growth and bridging the digital skills gap in the EU.

Eligibility for EITCA Academy 80% EITCI DSJC Subsidy support

80% of EITCA Academy fees subsidized in enrolment by

    EITCA Academy Secretary Office

    European IT Certification Institute ASBL
    Brussels, Belgium, European Union

    EITC / EITCA Certification Framework Operator
    Governing European IT Certification Standard
    Access contact form or call +32 25887351

    Follow EITCI on X
    Visit EITCA Academy on Facebook
    Engage with EITCA Academy on LinkedIn
    Check out EITCI and EITCA videos on YouTube

    Funded by the European Union

    Funded by the European Regional Development Fund (ERDF) and the European Social Fund (ESF) in series of projects since 2007, currently governed by the European IT Certification Institute (EITCI) since 2008

    Information Security Policy | DSRRM and GDPR Policy | Data Protection Policy | Record of Processing Activities | HSE Policy | Anti-Corruption Policy | Modern Slavery Policy

    Automatically translate to your language

    Terms and Conditions | Privacy Policy
    EITCA Academy
    • EITCA Academy on social media
    EITCA Academy


    © 2008-2025  European IT Certification Institute
    Brussels, Belgium, European Union

    TOP
    CHAT WITH SUPPORT
    Do you have any questions?