Professional Documents
Culture Documents
BOAZ TAMIRE
SUBMITTED BY
APPROVED BY
I am deeply grateful to Dr. Natea Hunde, my esteemed advisor, for their invaluable guidance,
unwavering support, and expertise throughout my research on "Mathematical Cryptography and
its Applications: Exploring the RSA Algorithm through Number Theory." Dr. Natea’s
dedication, insightful feedback, and rigorous standards have shaped the direction of this study. I
extend my thanks to the academic community, my family, friends, and the institution for their
support, which has contributed to the quality and depth of this work.
I
ABSTRACT
Mathematical cryptography plays a vital role in securing digital communication and protecting
sensitive information in the digital era. This research paper delves into the fundamental principles
of mathematical cryptography, with a primary focus on the application of number theory in the
widely used RSA algorithm.
The study begins with a comprehensive overview of the underlying principles of number theory,
emphasizing key concepts such as prime numbers, modular arithmetic, and the Euler's totient
function. These concepts serve as the building blocks for understanding the RSA algorithm and its
security guarantees.
Next, the research delves into the mathematical foundation of the RSA algorithm, which relies on
the difficulty of factoring large composite numbers into their prime factors. The process of key
generation, encryption, and decryption are thoroughly explained, highlighting the mathematical
operations involved and their implications for security.
RSA: Rivest-Shamir-Adleman
ACKNOWLEDGEMENT .................................................................................................... I
ABSTRACT ....................................................................................................................... II
1.1BACKGROUND ..................................................................................................... 3
CONCLUSION ................................................................................................................. 15
REFERENCES .................................................................................................................. 16
CHAPTER ONE : INTRODUCTION
Cryptography, the science of secure communication, has been an integral part of human
civilization since ancient times. Its fundamental purpose is to transform information into an
unintelligible form, known as ciphertext, using various mathematical techniques. With the rapid
advancement of technology and the found everywhere presence of digital communication, the need
for robust cryptographic systems has become more critical than ever.
Mathematics plays a pivotal role in the field of cryptography, providing the theoretical foundations
and tools necessary to develop secure algorithms. Number theory, in particular, serves as the
backbone of modern cryptographic systems. The inherent properties of prime numbers, modular
arithmetic, and mathematical functions form the basis of many encryption and decryption
processes.
1.1BACKGROUND
The most general term of this concept is cryptology. cryptology encompasses both cryptography
and cryptanalysis. It is the broader field that encompasses the study of both the design and analysis
of cryptographic systems. Cryptologists strive to develop new and robust encryption algorithms
while simultaneously analyzing existing ones to identify weaknesses and improve security.
The word cryptography came from two Greek words Krypto meaning hidden and graphene
meaning writing where in general cryptography is hidden writing. Cryptography is the science of
keeping secrets secret. Cryptography is the science of secret writing with the goal of hiding the
meaning of a message.
Cryptanalysis involves the study and analysis of cryptographic systems with the goal of breaking
or circumventing their security measures. It focuses on identifying vulnerabilities in encryption
algorithms and developing techniques to exploit them. Cryptanalysts employ various mathematical
and computational methods, such as statistical analysis, algebraic attacks, and brute-force
algorithms, to decipher ciphertext and gain unauthorized access to protected information.
Symmetric ciphers refer to cryptographic algorithms that use the same key for both encryption
and decryption of data. These ciphers are efficient and fast, making them suitable for bulk data
encryption. Examples of symmetric ciphers include the Advanced Encryption Standard (AES)
and the Data Encryption Standard (DES).
Asymmetric ciphers, also known as public-key ciphers, employ a pair of keys: a public key for
encryption and a private key for decryption. This approach allows for secure communication
without the need to exchange secret keys. Popular asymmetric ciphers include the RSA (Rivest-
Shamir-Adleman) algorithm and the Elliptic Curve Cryptography (ECC).
Cryptography protocols are sets of rules and procedures that govern secure communication over
networks. They combine cryptographic algorithms with additional mechanisms such as
authentication, key exchange, and data integrity checks. Protocols like Transport Layer Security
(TLS) and Secure Shell (SSH) ensure secure communication in various applications, including
web browsing, email, and remote access.
In summary, symmetric ciphers use the same key for encryption and decryption, while
asymmetric ciphers rely on a pair of keys. Cryptography protocols incorporate these ciphers
along with additional mechanisms to enable secure communication in various networked
environments.
In the field of cryptography, Bob, Alice, and Eve (sometimes referred to as Oscar) are commonly used
fictional characters to represent different entities and their roles in cryptographic scenarios. These
characters help illustrate various concepts and scenarios in secure communication.
Bob and Alice typically represent two legitimate parties who want to communicate securely. They are the
intended recipients of the message and are interested in ensuring the confidentiality, integrity, and
authenticity of their communication. Bob and Alice may engage in activities such as encryption, decryption,
and key exchange to achieve secure communication.
Eve, also known as the eavesdropper, is an adversary or a third party who attempts to intercept and gain
unauthorized access to the communication between Bob and Alice. Eve's goal is to extract sensitive
information or compromise the security of the communication. Eve may employ various techniques, such
as eavesdropping, cryptanalysis, or exploiting vulnerabilities in the cryptographic system, to achieve her
objectives.
The presence of Eve highlights the importance of strong cryptographic algorithms, secure key exchange
protocols, and proper implementation practices to protect communication against potential adversaries. The
goal of cryptography is to ensure that the communication between Bob and Alice remains secure, even in
the presence of an active and capable eavesdropper like Eve.
By using these fictional characters, cryptography scenarios become more relatable and easier to understand.
Bob, Alice, and Eve help demonstrate the challenges and solutions in achieving secure communication, and
they serve as a basis for analyzing and designing cryptographic systems that can withstand potential attacks.
1.2 STATEMENT OF THE PROBLEM
➢ What Makes RSA cryptosystem secured?
1.3 OBJECTIVES
The general objective of this research is to investigate and demonstrate the application of number theory
in mathematical cryptography, with a particular focus on the RSA algorithm. The research aims to
showcase the role of number theory principles in the design, analysis, and enhancement of cryptographic
systems, thereby highlighting the significance of this mathematical discipline in securing digital
communication.
➢ To examine the foundational principles of number theory, including prime numbers, modular
arithmetic, and the Euler's totient function, and their relevance to mathematical
cryptography.
The introduction of public-key encryption revolutionized the field by addressing the challenges
of key distribution in symmetric-key systems. Public-key encryption involves the use of a pair of
keys - a public key for encryption and a private key for decryption. This allows for secure
communication without the need for both parties to share a secret key in advance. The public key
can be freely shared, while the private key remains securely held by the intended recipient.
In 1976, Whitfield Diffie and Martin Hellman proposed a revolutionary key distribution
methodology based on the idea that what was previously the master key, k, in a symmetric-key
cryptosystem could be split into two parts. The first part, known as the Public Key (denoted as
KPUB), is used to encrypt information and the second part, known as the Private Key (denoted as
KPR), is used to decrypt information. This idea transformed the symmetric-key cryptosystem
locked cabinet analogy to the public-key cryptosystem analogy of a post office mailbox; anyone
can deposit information into the mailbox, but only one party can unlock the mailbox and withdraw
the information. Information deposits occur using the public key and information withdrawals
occur using the private key.
Numerous studies have focused on the mathematical principles underlying RSA. The concept of
modular arithmetic plays a pivotal role, allowing for efficient computations in the RSA
algorithm. Modular exponentiation, specifically the exponentiation by squaring technique,
enables the fast computation of large modular powers, which is crucial for encryption and
decryption processes.
Furthermore, prime numbers are at the core of RSA's security. Research has extensively
examined the generation, testing, and properties of prime numbers in the context of RSA.
Primality testing algorithms, such as the Miller-Rabin test and the AKS primality test, have been
investigated to ensure the accuracy and efficiency of prime number selection in RSA.
Euler's totient function (phi function) is another essential concept in number theory that is
directly relevant to RSA. The phi function enables the calculation of the Euler's totient value,
which is crucial for generating the public and private keys in RSA. Various studies have
explored the properties and applications of Euler's totient function in RSA, including its role in
key generation and cryptographic strength analysis.
2.2 ESSENTIAL NUMBER THEORY FOR PUBLIC-KEY ALGORITHMS
SOLUTION
by the division algorithm, 120 = 4 · 28 + 8, so, by Theorem I, (120,28) = (28,8). But (28,8) = 4.
Therefore, (120,28) = 4.
SOLUTION
Apply the division algorithm with 2076 (the larger of the two numbers) as the dividend and 1776
as the divisor:
Apply the division algorithm with 1776 as the dividend and 300 as the divisor:
300 = 1 · 276 + 24
276 = 11 · 24 + 12
24 = 2 · 12 + 1
= (276,24) = (24,12)
= 12
We now look at another tool that is useful for public-key cryptosystems, especially
for RSA. We consider the ring Zm, i.e., the set of integers {0, 1,..., m−1}. We are interested in the
(at the moment seemingly odd) problem of knowing how many numbers in this set are relatively
prime to m. This quantity is given by Euler’s phi function, which is defined as follows:
We first look at some examples and calculate Euler’s phi function by actually
gcd(0,6) = 6
gcd(1,6) = 1 ⋆
gcd(2,6) = 2
gcd(3,6) = 3
gcd(4,6) = 2
gcd(5,6) = 1 ⋆
Since there are two numbers in the set which are relatively prime to 6, namely 1 and
5, the phi function takes the value 2, i.e., Φ(6) = 2.
THEOREM: Let m have the following canonical factorization
Since the value of n, i.e., the number of distinct prime factors, is always quite small
even for large numbers m, evaluating the product symbol ∏ is computationally easy.
Let’s look at an example where we calculate Euler’s phi function using the relation:
Example
m = 240 = 16·15 = 24 ·3·5 = p1e1 . p2e2. P3e3 There are three distinct prime factors, i.e., n = 3.
That means that 64 integers in the range {0,1,...,239} are coprime to m = 240.
The alternative method, which would have required to evaluate the gcd 240 times,
would have been much slower even for this small number.
CHAPTER THREE : METHODOLOGY
2. Compute n = p · q.
3. Compute Φ ( n ) = ( p − 1 ) ( q − 1 ).
RSA encryption and decryption is done in the integer ring Zn and modular computations play a
central role so RSA encryption and decryption is presented in detail
➢ RSA Encryption Given the public key (n,e) = kpub and the plain text x the encryption function
is:
where x, y ∈ Zn
➢ RSA Decryption Given the private key d = kpr and the cipher text y, the decryption function
is:
where x, y ∈ Zn.
Example 1. Alice intends to transmit an encrypted message to Bob. To initiate the process, Bob
calculates his RSA parameters. Following that, he shares his public key with Alice. Subsequently,
Alice encrypts the message (x = 4) using Bob's public key and transmits the resulting ciphertext,
denoted as y, to Bob. Finally, Bob employs his private key to decrypt the ciphertext y and reveal
the original message.
Step 2: Compute n = p * q
n = 3 * 11 = 33
φ(n) = 2 * 10 = 20
Step 4: Choose an integer e such that 1 < e < φ(n) and e is coprime to φ(n)
To find d, we need to solve the equation 7d ≡ 1 (mod 20). We can use the extended Euclidean
algorithm to find that d = 3.
So, Bob's public key is (n, e) = (33, 7) and his private key is d = 3.
Step 7: Bob decrypts the cipher text using his private key
Therefore, Alice successfully encrypted and sent the message to Bob using RSA encryption with
primes 3 and 11.
CONCLUSION
In conclusion, the field of mathematical cryptography and its applications, particularly in the
context of exploring the RSA algorithm through number theory research, plays a vital role in
ensuring secure communication and data protection. The RSA algorithm, developed by Rivest,
Shamir, and Adleman, has proven to be a cornerstone of modern public key cryptography.
By delving into number theory concepts such as prime numbers, modular arithmetic, and Euler's
totient function, researchers have gained a deeper understanding of the underlying mathematical
foundations of RSA. This knowledge has enabled the development of efficient encryption and
decryption techniques that form the basis of secure communication protocols and data protection
systems.
Through extensive research and exploration, experts have expanded the boundaries of RSA's
applicability and strengthened its security. They have also explored related topics such as elliptic
curve cryptography, advanced encryption standards, and discrete logarithm problems,
contributing to the broader field of mathematical cryptography.
.
REFERENCES
Stallings, W. (2010). Cryptography and Network Security: Principles and Practice (6th ed.).
Pearson.
Delfs, H., & Knebl, H. (2015). Introduction to Cryptography: Principles and Applications.
Publisher.
Paar, C., & Pelzl, J. (2014). Understanding Cryptography: A Textbook for Students and
Practitioners. Publisher.