×
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

SIGN IN YOUR ACCOUNT TO HAVE ACCESS TO DIFFERENT FEATURES

CREATE AN ACCOUNT FORGOT YOUR PASSWORD?

FORGOT YOUR DETAILS?

AAH, WAIT, I REMEMBER NOW!

CREATE ACCOUNT

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

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

In the realm of cybersecurity, particularly within the scope of classical cryptography fundamentals, the concept of a public key is central to the understanding and implementation of public-key cryptography (PKC). Public-key cryptography, also known as asymmetric cryptography, is a cryptographic system that employs pairs of keys: public keys, which may be disseminated widely, and private keys, which are known only to the owner. This system underpins many of the secure communications protocols used today.

A public key, as the term suggests, is a cryptographic key that can be shared openly without compromising security. It is used in conjunction with a private key within an asymmetric encryption framework. The public key enables anyone to encrypt a message intended for a specific recipient, who can then decrypt the message using their corresponding private key. This separation of keys into public and private components is what differentiates public-key cryptography from symmetric cryptography, where the same key is used for both encryption and decryption.

The mathematical foundation of public-key cryptography relies heavily on number theory, particularly on the computational difficulty of certain mathematical problems. One of the most well-known public-key cryptographic systems is the RSA algorithm, named after its inventors Rivest, Shamir, and Adleman. The security of RSA is based on the difficulty of factoring large composite numbers, a problem for which no efficient solution is currently known.

Mathematical Foundations

Understanding the role of a public key requires delving into the mathematical principles that underpin public-key cryptography. Three key concepts are particularly relevant: 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 in public-key cryptography for ensuring that certain numbers used in key generation are coprime, meaning their GCD is 1.

For example, to find the GCD of two integers, say 56 and 15, the Euclidean Algorithm proceeds as follows:
1. Divide 56 by 15, yielding a quotient of 3 and a remainder of 11 (56 = 15 * 3 + 11).
2. Divide 15 by 11, yielding a quotient of 1 and a remainder of 4 (15 = 11 * 1 + 4).
3. Divide 11 by 4, yielding a quotient of 2 and a remainder of 3 (11 = 4 * 2 + 3).
4. Divide 4 by 3, yielding a quotient of 1 and a remainder of 1 (4 = 3 * 1 + 1).
5. Divide 3 by 1, yielding a quotient of 3 and a remainder of 0 (3 = 1 * 3 + 0).

When the remainder reaches 0, the divisor at that step is the GCD. In this case, the GCD of 56 and 15 is 1, indicating that they are coprime.

Euler’s Phi Function

Euler’s Phi Function (φ), also known as Euler’s Totient Function, is a function that counts the number of integers up to a given integer n that are coprime with n. This function is vital in public-key cryptography, particularly in the RSA algorithm, for determining the totient of a product of two prime numbers.

For a prime number p, φ(p) is simply p-1, since all numbers less than p are coprime with p. For two distinct prime numbers p and q, the totient function of their product n = pq is given by:

    \[ φ(n) = φ(pq) = (p-1)(q-1) \]

This property enables the calculation of the totient of large composite numbers, which is a important step in generating the keys for RSA encryption.

Euler’s Theorem

Euler’s Theorem states that for any integer a and n such that a and n are coprime:

    \[ a^{φ(n)} \equiv 1 \pmod{n} \]

This theorem is fundamental in the RSA algorithm, as it provides the mathematical basis for the encryption and decryption processes. Specifically, it ensures that raising a number to the power of the totient function modulo n results in 1, which is a property exploited in the RSA key generation and encryption/decryption algorithms.

RSA Algorithm and Public Key Generation

The RSA algorithm exemplifies the practical application of these mathematical principles. The process of generating a public key in RSA involves several steps:

1. Key Generation:
– Select two large prime numbers, p and q.
– Compute n = pq. The modulus n is used as part of both the public and private keys.
– Calculate the totient φ(n) = (p-1)(q-1).
– Choose an integer e such that 1 < e < φ(n) and e is coprime with φ(n). The integer e is the public exponent.
– Determine d as the modular multiplicative inverse of e modulo φ(n), i.e., d satisfies ed \equiv 1 \pmod{φ(n)}. The integer d is the private exponent.

2. Public Key:
– The public key is composed of the pair (n, e). This key can be distributed openly and used by anyone to encrypt messages intended for the key owner.

3. Private Key:
– The private key is composed of the pair (n, d). This key is kept secret by the owner and used to decrypt messages encrypted with the corresponding public key.

Example of RSA Encryption and Decryption

To illustrate the use of a public key in RSA encryption and decryption, consider a simple example:

1. Key Generation:
– Choose primes p = 61 and q = 53.
– Compute n = pq = 61 \times 53 = 3233.
– Calculate φ(n) = (61-1)(53-1) = 60 \times 52 = 3120.
– Choose e = 17, which is coprime with 3120.
– Compute d, the modular inverse of 17 modulo 3120. Using the Extended Euclidean Algorithm, we find d = 2753.

2. Public Key:
– The public key is (n, e) = (3233, 17).

3. Private Key:
– The private key is (n, d) = (3233, 2753).

4. Encryption:
– To encrypt a message m, convert m to an integer (e.g., m = 65).
– Compute the ciphertext c using the public key: c = m^e \mod n = 65^{17} \mod 3233 = 2790.

5. Decryption:
– To decrypt the ciphertext c, compute the original message m using the private key: m = c^d \mod n = 2790^{2753} \mod 3233 = 65.

The example demonstrates how the public key (n, e) can be used to encrypt a message, while the private key (n, d) is required to decrypt it. The security of the RSA algorithm relies on the computational difficulty of factoring the large number n into its prime factors p and q.

Applications and Security

Public keys are integral to various cryptographic protocols and applications. They are used in secure communications, digital signatures, and key exchange mechanisms. For instance, in the Secure Sockets Layer (SSL) and its successor, Transport Layer Security (TLS), public keys are used to establish secure connections over the internet. Digital signatures use public keys to verify the authenticity and integrity of messages and documents.

The security of public-key cryptography depends on the difficulty of solving specific mathematical problems. In the case of RSA, the security is based on the difficulty of factoring large composite numbers. Other public-key cryptographic systems, such as Elliptic Curve Cryptography (ECC), rely on the hardness of the elliptic curve discrete logarithm problem.

The concept of a public key is foundational to public-key cryptography. It enables secure communication by allowing anyone to encrypt messages that only the intended recipient can decrypt using their private key. The mathematical principles underlying public-key cryptography, including the Euclidean Algorithm, Euler’s Phi Function, and Euler’s Theorem, provide the necessary framework for key generation and encryption/decryption processes. Public-key cryptography is widely used in various applications to ensure the security and integrity of data in the digital world.

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

  • Is cryptography considered a part of cryptology and cryptanalysis?
  • Will a shift cipher with a key equal to 4 replace the letter d with the letter h in ciphertext?
  • Does the ECB mode breaks large input plaintext into subsequent blocks
  • Do identical plaintext map to identical cipher text of a letter frequency analysis attact against a substitution cipher
  • What is EEA ?
  • Are brute force attack always an exhausive key search?
  • In RSA cipher, does Alice need Bob’s public key to encrypt a message to Bob?
  • Can we use a block cipher to build a hash function or MAC?
  • What are initialization vectors?
  • How many part does a public and private key has in RSA cipher

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, Decryption, Encryption, Number Theory, Public Key, 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 (106)
  • 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 (Reddit publ.)
  • About
  • Contact
  • Cookie Policy (EU)

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.

    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 Twitter
    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), governed by the EITCI Institute 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
    Follow @EITCI
    EITCA Academy

    Your browser doesn't support the HTML5 CANVAS tag.

    • Web Development
    • Cloud Computing
    • Quantum Information
    • Artificial Intelligence
    • Cybersecurity
    • GET SOCIAL
    EITCA Academy


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

    TOP
    CHAT WITH SUPPORT
    Do you have any questions?
    We will reply here and by email. Your conversation is tracked with a support token.