×
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

Is the encryption function in the RSA cipher an exponential function modulo n and the decryption function an exponential function with a different exponent?

by Theresa Sittel / Friday, 16 May 2025 / Published in Cybersecurity, EITC/IS/CCF Classical Cryptography Fundamentals, Introduction to public-key cryptography, The RSA cryptosystem and efficient exponentiation

The RSA cryptosystem is a foundational public-key cryptographic scheme based on number-theoretic principles, specifically relying on the mathematical hardness of factoring large composite numbers. When examining the encryption and decryption functions in RSA, it is both accurate and instructive to characterize these operations as modular exponentiations, each employing a distinct exponent.

Key Generation in RSA

The RSA algorithm begins with the generation of two large prime numbers, denoted as p and q, which are kept secret. Their product n = pq forms the modulus for both the public and private keys. The totient (Euler’s phi function) of n is computed as \varphi(n) = (p-1)(q-1). The public exponent e is chosen such that 1 < e < \varphi(n) and \gcd(e, \varphi(n)) = 1, ensuring that e is invertible modulo \varphi(n). The private exponent d is then computed as the modular multiplicative inverse of e modulo \varphi(n), satisfying ed \equiv 1 \pmod{\varphi(n)}.

– Public key: (n, e)
– Private key: (n, d)

Encryption Function

Given a plaintext message m, where 0 \leq m < n, the encryption operation transforms m into ciphertext c using the recipient's public key:

    \[ c = E(m) = m^e \bmod n \]

This is unequivocally an exponential function, where the base is the message m and the exponent is the public key exponent e, all computed modulo n. The operation is performed in the mathematical group of integers modulo n, denoted as \mathbb{Z}_n.

Decryption Function

To recover the original message m from the ciphertext c, the recipient uses the private key exponent d:

    \[ m = D(c) = c^d \bmod n \]

Again, the decryption function is an exponential function modulo n, this time with the ciphertext c as the base and the private exponent d as the exponent. The operation takes advantage of the modular arithmetic properties and the mathematical relationship between e and d.

Why Modular Exponentiation?

The use of modular exponentiation is no accident. The core of RSA's security and correctness is rooted in Euler’s theorem, which states that for any integer a coprime to n:

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

Since ed \equiv 1 \pmod{\varphi(n)}, there exists an integer k such that ed = 1 + k\varphi(n). Therefore, decryption undoes encryption, as shown below:

    \[ D(E(m)) = (m^e)^d \bmod n = m^{ed} \bmod n = m^{1 + k\varphi(n)} \bmod n = m \cdot (m^{\varphi(n)})^k \bmod n \]

Since m^{\varphi(n)} \equiv 1 \pmod{n}, this simplifies to m.

Didactic Example

Let us consider a concrete example using small primes for clarity (note: in practice, primes must be hundreds of digits for security):

1. Choose primes: p = 61, q = 53.
2. Compute n = pq = 3233.
3. Compute \varphi(n) = (p-1)(q-1) = 60 \times 52 = 3120.
4. Choose e = 17 (commonly used, coprime to 3120).
5. Compute d such that ed \equiv 1 \pmod{3120}. Here, d = 2753.

Suppose Alice wishes to encrypt m = 65 for Bob:

– Encryption:

    \[   c = 65^{17} \bmod 3233 = 2790   \]

– Decryption:

    \[   m = 2790^{2753} \bmod 3233 = 65   \]

Both operations are modular exponentiations; encryption uses exponent 17, decryption uses exponent 2753, both modulo 3233.

Efficient Exponentiation

In practical implementations, computing m^e \bmod n or c^d \bmod n directly by performing exponentiation then reducing modulo n would be computationally infeasible for large exponents. Instead, algorithms such as "square-and-multiply" (also known as binary exponentiation) are used. These algorithms break down the exponentiation into a sequence of squarings and multiplications, each followed by a modular reduction, which enables efficient computation even for very large exponents and moduli.

Mathematical Properties Ensuring Correctness

The correctness of RSA depends on the following properties:

– The mapping m \mapsto m^e \bmod n is injective (one-to-one) on the set of valid messages, provided m is coprime to n.
– The inverse mapping c \mapsto c^d \bmod n recovers the original message m, owing to the relationship ed \equiv 1 \pmod{\varphi(n)}.
– The security of RSA is predicated on the difficulty of deducing d from e and n, or equivalently, factoring n to find p and q, which then enables computation of \varphi(n).

Theoretical Underpinnings

The algebraic structure underlying RSA is the multiplicative group of integers modulo n, denoted as \mathbb{Z}_n^*. For messages that are not coprime to n, certain technical adjustments are made, but in typical circumstances, messages are required or padded to ensure coprimality.

From group theory, the modular exponentiation function is a group automorphism when restricted to \mathbb{Z}_n^*. This automorphism is invertible, with the inverse map given by exponentiation to the power d.

Summary of the Functions

– Encryption function: Exponential function modulo n with exponent e: E(m) = m^e \bmod n.
– Decryption function: Exponential function modulo n with exponent d: D(c) = c^d \bmod n.

Both processes are mathematically equivalent to raising the input to a power (either e or d) and reducing the result modulo n.

Potential Pitfalls and Security Considerations

It is important to note that textbook RSA (as described above) is deterministic and malleable; that is, encrypting the same message twice yields identical ciphertexts, and certain algebraic manipulations on ciphertexts translate into predictable changes in the plaintext. For these reasons, practical deployments use padding schemes (such as PKCS#1 v1.5 or OAEP), which randomize the plaintext before encryption, thus greatly enhancing security.

Additionally, if improper values are chosen for e or if the primes p and q are too small or poorly generated, the RSA system can be compromised. The exponents must be large enough to prevent certain attacks but small enough to allow efficient computation.

The encryption and decryption functions in RSA are both modular exponentiation operations, differing solely in the exponent used—public exponent e for encryption, private exponent d for decryption. The mathematical symmetry and invertibility of these functions are central to the operation and security of the RSA cryptosystem.

Other recent questions and answers regarding The RSA cryptosystem and efficient exponentiation:

  • Was public-key cryptography introduced for use in encryption?
  • In RSA cipher, does Alice need Bob’s public key to encrypt a message to Bob?
  • How many part does a public and private key has in RSA cipher
  • What is the exponentiation function in the RSA cipher?
  • Are public keys transferred secretly in RSA?
  • How many keys are used by the RSA cryptosystem?
  • In the context of public-key cryptography, how do the roles of the public key and private key differ in the RSA cryptosystem, and why is it important that the private key remains confidential?
  • Why is the security of the RSA cryptosystem dependent on the difficulty of factoring large composite numbers, and how does this influence the recommended key sizes?
  • How does the method of "Exponentiation by Squaring" optimize the process of modular exponentiation in RSA, and what are the key steps of this algorithm?
  • What are the steps involved in the key generation process of the RSA cryptosystem, and why is the selection of large prime numbers crucial?

View more questions and answers in The RSA cryptosystem and efficient exponentiation

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: The RSA cryptosystem and efficient exponentiation (go to related topic)
Tagged under: Cryptography, Cybersecurity, Modular Exponentiation, Number Theory, Public Key Cryptography, RSA
Home » Cybersecurity » EITC/IS/CCF Classical Cryptography Fundamentals » Introduction to public-key cryptography » The RSA cryptosystem and efficient exponentiation » » Is the encryption function in the RSA cipher an exponential function modulo n and the decryption function an exponential function with a different exponent?

Certification Center

USER MENU

  • My Account

CERTIFICATE CATEGORY

  • EITC Certification (117)
  • 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 90% EITCI DSJC Subsidy support
90% of EITCA Academy fees subsidized in enrolment

    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-2026  European IT Certification Institute
    Brussels, Belgium, European Union

    TOP

    We care about your privacy

    EITCI uses cookies and similar technologies to keep this site secure, remember your choices, provide personalized experience, measure the traffic, serve more relevant content and certification programmes. You can accept all cookies or customize your preferences. Cookies are variables used to store website specific information on your device to facilitate processing of data for personalized website visit, such as login to your account, accessing the programmes, placing enrolment orders in chosen programmes and improving your EITC certification journey. You can change or withdraw your consent at any time by clicking the Consent Preferences button at the left-bottom of your screen. We respect your choices and are committed to providing you with a transparent and secure browsing experience, which may be limited when cookies aren't accepted. For more details refer to the Privacy Policy
    Customize Consent Preferences
    We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.
    The cookies categorized as Necessary are stored on your browser as they are essential for enabling the basic functionalities of the site.
    To learn more about how Google processes personal information, visit: Google privacy policy

    Necessary

    Always Active

    Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

    Functional

    Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

    Preferences

    Stores personalization choices such as interface preferences.

    External media and social features

    Allows embedded video, social, chat, and external interactive services that may set their own cookies. Keep off until the user chooses these features.

    Analytics

    Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

    Marketing and conversions

    Advertisement cookies are used to provide visitors with customized advertisements based on the pages you visited previously and to analyze the effectiveness of the ad campaigns.

    CHAT WITH SUPPORT
    Do you have any questions?
    Attach files with the paperclip or paste screenshots into the message box (Ctrl+V). Max 5 file(s), 10 MB each.
    We will reply here and by email. Your conversation is tracked with a support token.