SlideShare a Scribd company logo
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 10 Issue: 04 | Apr 2023 www.irjet.net p-ISSN: 2395-0072
Quantum Implementation of RSA Crypto-algorithm using IBM-QISKIT
Pallavi Verma1, Dr. Palla Penchalaiah 2
1Student, VIII Semester, B.Tech(ECE), VIT University, Vellore, Tamil Nadu, India
(E-mail: pallavi.verma2019@vitstudent.ac.in)
2Associate Professor, Dept. of Micro & Nano Electronics, VIT University, Vellore, Tamil Nadu, India
---------------------------------------------------------------------***---------------------------------------------------------------------
Abstract - Quantum computers have the potential to break
classical RSA encryption, which could lead to the loss of
sensitive information, financial data, and other confidential
information. To address this issue, a new generation of
cryptography called quantum cryptography has emerged.
Quantum cryptography exploits the principles of quantum
mechanics for encryption & decryption, making it impossible
for hackers to break. However, the implementation of
quantum cryptography is still in its early stages. The
motivation behind this project is to explore the feasibility of
using quantum computing to enhance the security of
traditional cryptographic techniques. The project aims to
implement the RSA encryption algorithm on a quantum
computer such as IBM-QISKIT platform. This will evince the
potential of quantum computing in the field of cryptography.
Specifically, the aim is to investigate and compare the
efficiency, accuracy, and security of potential different
methods forquantumimplementationofRSA:(1)Montgomery
multiplication, (2) Chinese remainder theorem, (3) Shor’s
Algorithm.
Key Words: Quantum Computing, IBM-QISKIT, RSA,
Chinese Remainder Theorem, Montgomery
Multiplication, Shor’s Algorithm
1. INTRODUCTION
Quantum computing is a game-changing technology that
promises to revolutionize the world of computing as we
know it. Traditional computers work with binary digits,
known as bits, which can be either 0 or1.However, quantum
computers use quantum bits, or qubits, which can exist in
multiple states simultaneously. This property of qubits
allows quantum computers to perform certain calculations
exponentially faster than classical computers, making them
ideal for solving complex problems in fields such as
cryptography, drug discovery, and artificial intelligence. The
RSA algorithm is a widely used and trusted encryption
method that relies on the difficulty of factoring large
composite numbers. However, the security of RSA can be
compromised by quantum computers, which can efficiently
factor such numbers using Shor's algorithm. Tocounterthis,
there has been growing interest in implementing RSA using
quantum computing techniques, which can provide an
additional layer of security against quantum attacks.
In this context, the quantum implementation of RSA using
Qiskit(IBM) has emerged as a promising approach. By
leveraging the power of quantum mechanics, Qiskit can
provide efficient solutions for the complex mathematical
operations required by RSA. This quantum implementation
of RSA using Qiskit has the potential to enhance the security
of data transmission and storage, and pave the way for the
development of next-generation cryptography.[1]
1.1 What is a QUBIT?
In quantum computing, a qubit or quantum bit is a basic unit
of quantum information—the quantum version of theclassic
binary bit physically realizedwith atwo-statedevice. Aqubit
isatwo-state(ortwo-level)quantum-mechanicalsystem,one
of the simplest quantumsystemsdisplayingthepeculiarityof
quantum mechanics. Examples include the spin of the
electron in which the two levels can be taken as spin up and
spin down; or the polarization of a single photoninwhichthe
two states can be taken to be the vertical polarizationandthe
horizontal polarization.[2]
In a classical system, a bit would have to be in onestateorthe
other. However, quantum mechanicsallowsthequbittobein
a coherent superposition of both states simultaneously, a
property that is fundamental to quantum mechanics and
quantum computing. Inaddition to superposition,qubitscan
also exhibit a phenomenon called entanglement. This means
that the state of one qubit is directly related to the state of
another qubit, even if they are separated by large distances.
1.2 The BLOCH Sphere
The Bloch sphere is like a map of all the possible statesthata
single qubit can be in. Imagine a sphere, like a beach ball,
where each point on the surface represents a different state
of the qubit. The north pole of the sphere represents a qubit
that is definitely in the state "0", and the south pole
represents a qubit that is definitely in the state "1". All other
points on the sphere representa superpositionofthe"0"and
"1" states. The Bloch sphere is important because it helps us
to visualize and understand how qubits work. By looking at
the Bloch sphere, we can see how different quantum gates
(like the X, Y, and Z gates) affect the state of a qubit. We can
also see how measurements collapse the state of a qubit to
either "0" or "1".[3]
© 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page 1282
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 10 Issue: 04 | Apr 2023 www.irjet.net p-ISSN: 2395-0072
2. The Quantum Phenomena
One of the most well-known quantum phenomena is
superposition, which means thata quantumobject,suchasan
atom or photon, can exist in multiplestatesorlocationsatthe
same time. This is different from classicalobjects,whichexist
in a single state or location at any given time. (This means
that an atom can be in two different states at the same time.)
Another quantum phenomenon is entanglement, which
occurs when two quantum objects become connected in a
way that their properties are correlated, even when they are
far apart from each other. This means that measuring the
property of one object will instantaneously affect the
property of the other object,even if they arelightyearsapart.
(Atoms can also become "entangled" with each other. This
means that what happens to one atom can affect what
happens to another atom, no matter how far apart they are.)
Another phenomenon is quantum tunneling, which is the
ability of a quantum object to pass through a potential
barrier, even if it does not have enough energy to overcome
the barrier according to classical physics. (When atoms are
in superposition, they can sometimes do things that seem
impossible. For example, theycanpassthroughsolidobjects,
like walls, without breakingthem.Thisiscalled"tunnelling")
Quantum mechanics also involves, which is describedbythe
Heisenberg uncertainty principle. This principle states that
the more precisely the position of a particle is known, the
less precisely its momentum can be known, and vice versa.
(It is impossible to simultaneously know the exact position
and the momentum of the particle.)[4]
3. The RSA Algorithm
RSA (Rivest-Shamir-Adleman) is a public-key cryptosystem
used for secure data transmission over the internet. It is one
of the most widely used encryption algorithms,andisusedto
encrypt sensitive information such as credit card numbers
and passwords. The RSA algorithm uses two prime numbers
to generate a public and private key pair. The security of the
algorithm relies on the difficulty of factoring large numbers
into their prime factors. Public Key encryption algorithm is
alsocalledtheAsymmetricalgorithm.Asymmetricalgorithms
are those algorithms in which sender and receiver use
different keys for encryption and decryption. Each sender is
assigned a pair of keys: Public Key & Private Key. The Public
key is used for encryption, and the Private Key is used for
decryption. Decryption cannot be done using a public key.
The two keys are linked, but the private key cannot be
derived from the public key. The public key is well known,
but the private key is secret and it is known only to the user
who owns the key. It means that everybody can send a
message to the user using user's public key. But only theuser
can decrypt the message using his private key
Choose two prime numbers p and q. These are kept secret
and are used to generate the public and private key pairs.
Compute n = p * q. This is the modulus and is part of the
public key. Euler's totient function phi(n) = (p-1)*(q-1).
Choose an integer e such that 1 < e <phi(n)andgcd(e,phi(n))
= 1. This is the public key. Compute d such that d*e = 1 mod
phi(n). This is the private key. To encrypt a message, the
sender converts the message into a number m less than n,
and raises it to the power of e mod n. To decryptthemessage,
the receiver raises the encrypted message to the power of d
mod n.[5]
4. The IBM-QISKIT
IBM Qiskit is a powerful open-source software development
kit for building quantum computing applications. It is one of
the most popular and widely used platforms for creating,
simulating, and executing quantum programs. With Qiskit,
users can write quantum algorithms and execute them on
real quantum devices provided by IBM or on simulators that
emulate the behavior of quantum systems. Qiskit also
includes a variety of powerful tools for visualizing quantum
circuits and analyzing the results of quantum computations.
Whether you are a seasoned quantum computing expert or
just starting out, Qiskit provides a robust set of tools and
resources to help you explore the exciting world of quantum
computing. Qiskit consists of four main components: Terra,
Aer, Ignis, and Aqua.[6]
6. Implementation of Quantum RSA methods
Modular exponentiation: The most straightforward way to
implement RSA is by using modular exponentiation. The key
generation algorithm generates two large prime numbers, p
and q, and calculates their product, N = p * q.Itthenchoosesa
number e such that 1 < e < (p-1)(q-1)andgcd(e,(p-1)(q-1))=
1. The public key is (N, e), and the private key is d, where d is
the modular inverse of e modulo (p-1)*(q-1). To encrypt a
message, m, the sender calculates c = m^e mod N, and to
decrypt it, the receiver calculates m = c^d mod N.
Chinese remaindertheorem:AnotherwaytoimplementRSAis
by using the Chinese remainder theorem. This method is
faster than modular exponentiation, especially when the
numbers involved are very large. The key generation
algorithm is the sameas in the previousmethod.Toencrypta
message, m, the sender first calculates m1 = m mod p and m2
= m mod q. The sender then calculates c1 = m1^e mod p and
c2 = m2^e mod q. The sender then uses the Chinese
remainder theorem to calculate c such that c ≡ c1 (mod p)
and c ≡ c2 (mod q). To decrypt the message, the receiver
calculates d1 = d mod (p-1) and d2 = d mod (q-1). The
receiver then calculates m1 = c^d1 mod p and m2 = c^d2
mod q. The receiver then uses the Chinese remainder
theorem to calculate m such that m ≡ m1 (mod p) and m ≡
m2 (mod q).
© 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page 1283
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 10 Issue: 04 | Apr 2023 www.irjet.net p-ISSN: 2395-0072
Montgomery multiplication: Montgomery multiplication is a
technique used to speed up modular multiplication. It is
based on the observation that if we use the Montgomery
reduction algorithm to reduce the result of a multiplication,
then the result is already in Montgomery form, and we can
skip the final step of the algorithm. This saves time and
reduces the number of modular reductions that need to be
performed. This method is used in hardware
implementations of RSA, as it is faster than other methods.
5. The IBM-QISKIT Code
5.1 Chinese Remainder Theorem
Let's consider a system of two linear congruences:
x ≡ a mod p x ≡ b mod q, where p and q are distinct prime
numbers. The CRT tells us that there is a uniquesolutionforx
modulo pq, which can be obtained using the following steps:
1. Compute the product N = pq.
2. Find the modular inverses y and z of p and q, respectively,
such that y ≡ 1 mod p and z ≡ 1 mod q. This can be done
using the extended Euclidean algorithm.
3. Compute the values u and v, where u ≡ ay mod p and v ≡
bx mod q.
4. The solution for x is given by x ≡ (uqz + vp y) mod N.
In general, the CRT can be extended to solvesystemsoflinear
congruences withanynumberofequations,providedthatthe
moduli are pairwise coprime (i.e., they have no common
factors other than 1).[7]
Fig -1: CRT Code Snippet_1
Fig -2: CRT Code Snippet_2
Result:
The input integers are [2, 3, 4, 5]
The corresponding constants are [3, 5, 7, 11]
The moduli are [5, 7, 9, 11]
The solutions are:
x = 12640 mod 3465
5.2 Montgomery Multiplication
Generate two large prime numbers, p and q, and calculate
their product N = pq. This is the modulus for RSA encryption.
Choose an integer e such that 1 < e < (p-1)(q-1) and e is
coprime with (p-1)(q-1). This is the public key. Calculate the
modular inverse d of e modulo (p-1)(q-1). This is the private
key. Choose a random message m that is less than N. Convert
the message m to its Montgomery representation, which
involves multiplying it by a certainfactorandthenreducingit
modulo N. Encrypt the Montgomery representation of the
message m using the public key e, which involves raisingitto
the power e and reducing the result modulo N. Decrypt the
encrypted Montgomery representation of the message using
the private key d, which involves raising it tothepowerdand
reducing the result modulo N. Convert the decrypted
Montgomery representation of the message back to its
original representation.[8]
© 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page 1284
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 10 Issue: 04 | Apr 2023 www.irjet.net p-ISSN: 2395-0072
Fig -3: Montgomery Multiplication Code Snippet_1
Fig -4: Montgomery Multiplication Code Snippet_2
Result:
The first line of the output shows the result of Montgomery
multiplication of 123456 and 654321 modulo 1000000007.
The result is 128054480.
The second line of the output shows the result of
Montgomery exponentiation of 123456 to the power of
123456789 modulo 1000000007. The result is 406267049.
5.3 Shor’s Algorithm
In quantum computing, a qubit or quantum bit is a basic unit
of quantum information—the quantum version of theclassic
binary bit physically realizedwith a two-statedevice. Aqubit
isatwo-state(ortwo-level)quantum-mechanicalsystem,one
of the simplest quantumsystemsdisplayingthepeculiarityof
quantum mechanics. Examples include the spin of the
electron in which the two levels can be taken as spin up and
spin down; or the polarization of a single photoninwhichthe
two states can be taken to be the vertical polarizationandthe
horizontal polarization.[9][10][11]
Fig -5: Shor’s Algorithm Code Snippet_1
Fig -6: Shor’s Algorithm Code Snippet_2
Fig -7: Shor’s Algorithm Code Snippet_3
© 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page 1285
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 10 Issue: 04 | Apr 2023 www.irjet.net p-ISSN: 2395-0072
Result:
ATTEMPT 1:
Register Reading: 11000000
Corresponding Phase: 0.75
Result: r = 4
Guessed Factors: 3 and 5
*** Non-trivial factor found: {guess} ***
*** Non-trivial factor found: {guess} ***
6. CONCLUSIONS
The cryptography fieldisextensivelyresearcheduponin this
project. The potential of classical and quantum computer
and their phenomena was compared and observed. The
observation leads to the belief that quantumcryptographyis
much powerful than the traditional cryptography. This is
possible due to the fact of various potential quantum
phenomenon such superposition, entanglement, tunneling
etc.
The IBM Quantum Dashboard was accessed in order to
achieve the desired results in the project. The project was
initialized with the study of basic quantum gates and then
the same was coded in the IBM-QISKIT shell (refer to the
attached images). The histogram plots clearly explain the
presence of superposition in some case and entanglement
such as the Hadamard gate implementation & also the other
phenomena. The result might have some noise due the
quantum servers but effects are to the minimum.
The work was successful in demystifying and introducing
readers to classical and quantumcryptographyaswell asthe
fundamental concepts behind encryption. The significant
pertinent studies in the various branches of classical and
quantum cryptography were examined.
The goal of the project is to inspire to learn more about
quantum research and to serve as a solid starting point for
those just entering the subject of quantum cryptography.
Moreover, while completing theproject,itwasobservedthat
quantum cryptography for sure is a level betterthatclassical
cryptography; but the amount of development needed in
order to realize it in the practical world is still under-
developed. Be it the software or the hardware perspective
both needs their own share of development and progress.
REFERENCES
[1] Aumasson, Jean-Philippe(2017).Theimpactofquantum
computing on cryptography. Computer Fraud &
Security, 2017(6), 8–11. doi:10.1016/S1361-
3723(17)30051-9.
[2] Mavroeidis, V., Vishi, K., Zych, M. D., & Jøsang, A. (2018).
The impact of quantum computing on present
cryptography. arXiv preprint arXiv:1804.00200.
[3] Everitt, H. O. (Ed.). (2005). Experimental aspects of
quantum computing. Springer Science+Business Media.
[4] V. Padamvathi, B. V. Vardhan and A. V. N. Krishna,
"Quantum Cryptography and QuantumKeyDistribution
Protocols: A Survey," 2016 IEEE 6th International
Conference on Advanced Computing (IACC),
Bhimavaram, India, 2016, pp. 556-562, doi:
10.1109/IACC.2016.109.
[5] I.B. Djordjevic. “Conventional Cryptography
Fundamentals.” In: Physical-Layer Security and
Quantum Key Distribution.Springer,Cham.2019,pp65-
91.
[6] IBM Quantum, https://learn.qiskit.org/course.
[7] Salifu, Abdul-Mumin. (2018). Rivest Shamir Adleman
Encryption Scheme Based on the Chinese Remainder
Theorem. Advances in Networks. 6. 40.
10.11648/j.net.20180601.14.
[8] Jang, K., Song, G. J., Kim, H., Kwon, H., Lee, W. K., Hu, Z., &
Seo, H. (2021). Binary field montgomery multiplication
on quantum computers. Cryptology ePrint Archive.
[9] Chouhan, N., Saini, H. K., & Jain, S. C. (2017, February). A
novel technique to modify the SHOR'S algorithm—
Scaling the encryption scheme. In 2017 Second
International Conference on Electrical, Computer and
Communication Technologies (ICECCT) (pp. 1-4)..
[10] Experimental demonstration of Shor’s algorithm with
quantum entanglement B. P. Lanyon,T.J. Weinhold,N.K.
Langford, M. Barbieri, D. F. V. James∗ , A. Gilchrist, andA.
G. White Centre for Quantum Computer Technology
Department of Physics University of Queensland,
Brisbane QLD 4072, Australia ∗Department of Physics
Center for Quantum Information and Control University
of Toronto, Toronto ON M5S1A7, Canada.
[11] Gerjuoy, E. (2005). Shor’s factoring algorithm and
modern cryptography. An illustration of the capabilities
inherent in quantum computers. American journal of
physics, 73(6), 521-540.
© 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page 1286

More Related Content

PPTX
Quantum Internet Explained
Ahmed Banafa
 
PPTX
Cryptography & Quantum Computing.pptx
RohanTakke
 
PDF
Why Should You Pay Attention To Quantum Computing?
Milos Dunjic
 
PDF
Introduction to Quantum Cryptography
Andrew Manoske
 
PPTX
Quantum Computing and Blockchain: Facts and Myths
Ahmed Banafa
 
PDF
Quantum communication and quantum computing
IOSR Journals
 
PDF
Report.pdf
Minahilnuman1
 
PDF
177
vivatechijri
 
Quantum Internet Explained
Ahmed Banafa
 
Cryptography & Quantum Computing.pptx
RohanTakke
 
Why Should You Pay Attention To Quantum Computing?
Milos Dunjic
 
Introduction to Quantum Cryptography
Andrew Manoske
 
Quantum Computing and Blockchain: Facts and Myths
Ahmed Banafa
 
Quantum communication and quantum computing
IOSR Journals
 
Report.pdf
Minahilnuman1
 

Similar to Quantum Implementation of RSA Crypto-algorithm using IBM-QISKIT (20)

PDF
Navigating Post-Quantum Blockchain: Resilient Cryptography in Quantum Threats
anupriti
 
DOCX
Running head QUANTUM COMPUTINGQUANTUM COMPUTING .docx
charisellington63520
 
PPTX
Quantum-Cryptography-The-Next-Gen-Encryption-Revolution.pptx
SubhasishKabi2
 
PDF
Quantum Computing Seminar Presenatation(Simple format)
HarshKSatheesh
 
PDF
quantumcomputingbysandy-170310190433.pdf
AjayRaj912848
 
PPTX
Quantum Computing
Deepankar Sandhibigraha
 
PPTX
Quantum Computing and its security implications
InnoTech
 
PDF
ITNW 2164 ResearchPaper
Manuel Garza
 
PPTX
QUANTUM_NETWORKING.pptx a ppt on quantum networking
dhruvbajpai8
 
PPTX
bhanu.pptx
aswinichenemalla
 
PPTX
Presentation on quantum computers
Nancy Mann
 
PDF
Quantum Computation: An Overview
IRJET Journal
 
PPTX
The convergence of IoT and Quantum Computing
Ahmed Banafa
 
PDF
Comprehensive Study of BB84, A Quantum Key Distribution Protocol
IRJET Journal
 
PPTX
Seminar
Ritikesh Bhaskarwar
 
PDF
Exploring Quantum Cryptography: Next-Generation Security Protocols
GrapesTech Solutions
 
PPTX
Quantum Computing preserntation tamplete.pptx
MikeMyers715572
 
PPTX
Quantum computers
Rishabh Jindal
 
PPTX
Tears for quantum fears
Mark Carney
 
PDF
Technological Survey on Quantum Computing
IRJET Journal
 
Navigating Post-Quantum Blockchain: Resilient Cryptography in Quantum Threats
anupriti
 
Running head QUANTUM COMPUTINGQUANTUM COMPUTING .docx
charisellington63520
 
Quantum-Cryptography-The-Next-Gen-Encryption-Revolution.pptx
SubhasishKabi2
 
Quantum Computing Seminar Presenatation(Simple format)
HarshKSatheesh
 
quantumcomputingbysandy-170310190433.pdf
AjayRaj912848
 
Quantum Computing
Deepankar Sandhibigraha
 
Quantum Computing and its security implications
InnoTech
 
ITNW 2164 ResearchPaper
Manuel Garza
 
QUANTUM_NETWORKING.pptx a ppt on quantum networking
dhruvbajpai8
 
bhanu.pptx
aswinichenemalla
 
Presentation on quantum computers
Nancy Mann
 
Quantum Computation: An Overview
IRJET Journal
 
The convergence of IoT and Quantum Computing
Ahmed Banafa
 
Comprehensive Study of BB84, A Quantum Key Distribution Protocol
IRJET Journal
 
Exploring Quantum Cryptography: Next-Generation Security Protocols
GrapesTech Solutions
 
Quantum Computing preserntation tamplete.pptx
MikeMyers715572
 
Quantum computers
Rishabh Jindal
 
Tears for quantum fears
Mark Carney
 
Technological Survey on Quantum Computing
IRJET Journal
 
Ad

More from IRJET Journal (20)

PDF
Enhanced heart disease prediction using SKNDGR ensemble Machine Learning Model
IRJET Journal
 
PDF
Utilizing Biomedical Waste for Sustainable Brick Manufacturing: A Novel Appro...
IRJET Journal
 
PDF
Kiona – A Smart Society Automation Project
IRJET Journal
 
PDF
DESIGN AND DEVELOPMENT OF BATTERY THERMAL MANAGEMENT SYSTEM USING PHASE CHANG...
IRJET Journal
 
PDF
Invest in Innovation: Empowering Ideas through Blockchain Based Crowdfunding
IRJET Journal
 
PDF
SPACE WATCH YOUR REAL-TIME SPACE INFORMATION HUB
IRJET Journal
 
PDF
A Review on Influence of Fluid Viscous Damper on The Behaviour of Multi-store...
IRJET Journal
 
PDF
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
IRJET Journal
 
PDF
Explainable AI(XAI) using LIME and Disease Detection in Mango Leaf by Transfe...
IRJET Journal
 
PDF
BRAIN TUMOUR DETECTION AND CLASSIFICATION
IRJET Journal
 
PDF
The Project Manager as an ambassador of the contract. The case of NEC4 ECC co...
IRJET Journal
 
PDF
"Enhanced Heat Transfer Performance in Shell and Tube Heat Exchangers: A CFD ...
IRJET Journal
 
PDF
Advancements in CFD Analysis of Shell and Tube Heat Exchangers with Nanofluid...
IRJET Journal
 
PDF
Breast Cancer Detection using Computer Vision
IRJET Journal
 
PDF
Auto-Charging E-Vehicle with its battery Management.
IRJET Journal
 
PDF
Analysis of high energy charge particle in the Heliosphere
IRJET Journal
 
PDF
A Novel System for Recommending Agricultural Crops Using Machine Learning App...
IRJET Journal
 
PDF
Auto-Charging E-Vehicle with its battery Management.
IRJET Journal
 
PDF
Analysis of high energy charge particle in the Heliosphere
IRJET Journal
 
PDF
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
IRJET Journal
 
Enhanced heart disease prediction using SKNDGR ensemble Machine Learning Model
IRJET Journal
 
Utilizing Biomedical Waste for Sustainable Brick Manufacturing: A Novel Appro...
IRJET Journal
 
Kiona – A Smart Society Automation Project
IRJET Journal
 
DESIGN AND DEVELOPMENT OF BATTERY THERMAL MANAGEMENT SYSTEM USING PHASE CHANG...
IRJET Journal
 
Invest in Innovation: Empowering Ideas through Blockchain Based Crowdfunding
IRJET Journal
 
SPACE WATCH YOUR REAL-TIME SPACE INFORMATION HUB
IRJET Journal
 
A Review on Influence of Fluid Viscous Damper on The Behaviour of Multi-store...
IRJET Journal
 
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
IRJET Journal
 
Explainable AI(XAI) using LIME and Disease Detection in Mango Leaf by Transfe...
IRJET Journal
 
BRAIN TUMOUR DETECTION AND CLASSIFICATION
IRJET Journal
 
The Project Manager as an ambassador of the contract. The case of NEC4 ECC co...
IRJET Journal
 
"Enhanced Heat Transfer Performance in Shell and Tube Heat Exchangers: A CFD ...
IRJET Journal
 
Advancements in CFD Analysis of Shell and Tube Heat Exchangers with Nanofluid...
IRJET Journal
 
Breast Cancer Detection using Computer Vision
IRJET Journal
 
Auto-Charging E-Vehicle with its battery Management.
IRJET Journal
 
Analysis of high energy charge particle in the Heliosphere
IRJET Journal
 
A Novel System for Recommending Agricultural Crops Using Machine Learning App...
IRJET Journal
 
Auto-Charging E-Vehicle with its battery Management.
IRJET Journal
 
Analysis of high energy charge particle in the Heliosphere
IRJET Journal
 
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
IRJET Journal
 
Ad

Recently uploaded (20)

PPTX
Civil Engineering Practices_BY Sh.JP Mishra 23.09.pptx
bineetmishra1990
 
PDF
20ME702-Mechatronics-UNIT-1,UNIT-2,UNIT-3,UNIT-4,UNIT-5, 2025-2026
Mohanumar S
 
PDF
Introduction to Ship Engine Room Systems.pdf
Mahmoud Moghtaderi
 
PDF
flutter Launcher Icons, Splash Screens & Fonts
Ahmed Mohamed
 
PDF
July 2025: Top 10 Read Articles Advanced Information Technology
ijait
 
PPTX
business incubation centre aaaaaaaaaaaaaa
hodeeesite4
 
PDF
FLEX-LNG-Company-Presentation-Nov-2017.pdf
jbloggzs
 
PDF
top-5-use-cases-for-splunk-security-analytics.pdf
yaghutialireza
 
PDF
Traditional Exams vs Continuous Assessment in Boarding Schools.pdf
The Asian School
 
PDF
Cryptography and Information :Security Fundamentals
Dr. Madhuri Jawale
 
PDF
settlement FOR FOUNDATION ENGINEERS.pdf
Endalkazene
 
PDF
The Effect of Artifact Removal from EEG Signals on the Detection of Epileptic...
Partho Prosad
 
PPTX
Chapter_Seven_Construction_Reliability_Elective_III_Msc CM
SubashKumarBhattarai
 
PDF
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
PDF
Advanced LangChain & RAG: Building a Financial AI Assistant with Real-Time Data
Soufiane Sejjari
 
PPTX
FUNDAMENTALS OF ELECTRIC VEHICLES UNIT-1
MikkiliSuresh
 
PPTX
22PCOAM21 Session 1 Data Management.pptx
Guru Nanak Technical Institutions
 
PDF
Biodegradable Plastics: Innovations and Market Potential (www.kiu.ac.ug)
publication11
 
PPTX
easa module 3 funtamental electronics.pptx
tryanothert7
 
PPT
1. SYSTEMS, ROLES, AND DEVELOPMENT METHODOLOGIES.ppt
zilow058
 
Civil Engineering Practices_BY Sh.JP Mishra 23.09.pptx
bineetmishra1990
 
20ME702-Mechatronics-UNIT-1,UNIT-2,UNIT-3,UNIT-4,UNIT-5, 2025-2026
Mohanumar S
 
Introduction to Ship Engine Room Systems.pdf
Mahmoud Moghtaderi
 
flutter Launcher Icons, Splash Screens & Fonts
Ahmed Mohamed
 
July 2025: Top 10 Read Articles Advanced Information Technology
ijait
 
business incubation centre aaaaaaaaaaaaaa
hodeeesite4
 
FLEX-LNG-Company-Presentation-Nov-2017.pdf
jbloggzs
 
top-5-use-cases-for-splunk-security-analytics.pdf
yaghutialireza
 
Traditional Exams vs Continuous Assessment in Boarding Schools.pdf
The Asian School
 
Cryptography and Information :Security Fundamentals
Dr. Madhuri Jawale
 
settlement FOR FOUNDATION ENGINEERS.pdf
Endalkazene
 
The Effect of Artifact Removal from EEG Signals on the Detection of Epileptic...
Partho Prosad
 
Chapter_Seven_Construction_Reliability_Elective_III_Msc CM
SubashKumarBhattarai
 
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
Advanced LangChain & RAG: Building a Financial AI Assistant with Real-Time Data
Soufiane Sejjari
 
FUNDAMENTALS OF ELECTRIC VEHICLES UNIT-1
MikkiliSuresh
 
22PCOAM21 Session 1 Data Management.pptx
Guru Nanak Technical Institutions
 
Biodegradable Plastics: Innovations and Market Potential (www.kiu.ac.ug)
publication11
 
easa module 3 funtamental electronics.pptx
tryanothert7
 
1. SYSTEMS, ROLES, AND DEVELOPMENT METHODOLOGIES.ppt
zilow058
 

Quantum Implementation of RSA Crypto-algorithm using IBM-QISKIT

  • 1. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 04 | Apr 2023 www.irjet.net p-ISSN: 2395-0072 Quantum Implementation of RSA Crypto-algorithm using IBM-QISKIT Pallavi Verma1, Dr. Palla Penchalaiah 2 1Student, VIII Semester, B.Tech(ECE), VIT University, Vellore, Tamil Nadu, India (E-mail: [email protected]) 2Associate Professor, Dept. of Micro & Nano Electronics, VIT University, Vellore, Tamil Nadu, India ---------------------------------------------------------------------***--------------------------------------------------------------------- Abstract - Quantum computers have the potential to break classical RSA encryption, which could lead to the loss of sensitive information, financial data, and other confidential information. To address this issue, a new generation of cryptography called quantum cryptography has emerged. Quantum cryptography exploits the principles of quantum mechanics for encryption & decryption, making it impossible for hackers to break. However, the implementation of quantum cryptography is still in its early stages. The motivation behind this project is to explore the feasibility of using quantum computing to enhance the security of traditional cryptographic techniques. The project aims to implement the RSA encryption algorithm on a quantum computer such as IBM-QISKIT platform. This will evince the potential of quantum computing in the field of cryptography. Specifically, the aim is to investigate and compare the efficiency, accuracy, and security of potential different methods forquantumimplementationofRSA:(1)Montgomery multiplication, (2) Chinese remainder theorem, (3) Shor’s Algorithm. Key Words: Quantum Computing, IBM-QISKIT, RSA, Chinese Remainder Theorem, Montgomery Multiplication, Shor’s Algorithm 1. INTRODUCTION Quantum computing is a game-changing technology that promises to revolutionize the world of computing as we know it. Traditional computers work with binary digits, known as bits, which can be either 0 or1.However, quantum computers use quantum bits, or qubits, which can exist in multiple states simultaneously. This property of qubits allows quantum computers to perform certain calculations exponentially faster than classical computers, making them ideal for solving complex problems in fields such as cryptography, drug discovery, and artificial intelligence. The RSA algorithm is a widely used and trusted encryption method that relies on the difficulty of factoring large composite numbers. However, the security of RSA can be compromised by quantum computers, which can efficiently factor such numbers using Shor's algorithm. Tocounterthis, there has been growing interest in implementing RSA using quantum computing techniques, which can provide an additional layer of security against quantum attacks. In this context, the quantum implementation of RSA using Qiskit(IBM) has emerged as a promising approach. By leveraging the power of quantum mechanics, Qiskit can provide efficient solutions for the complex mathematical operations required by RSA. This quantum implementation of RSA using Qiskit has the potential to enhance the security of data transmission and storage, and pave the way for the development of next-generation cryptography.[1] 1.1 What is a QUBIT? In quantum computing, a qubit or quantum bit is a basic unit of quantum information—the quantum version of theclassic binary bit physically realizedwith atwo-statedevice. Aqubit isatwo-state(ortwo-level)quantum-mechanicalsystem,one of the simplest quantumsystemsdisplayingthepeculiarityof quantum mechanics. Examples include the spin of the electron in which the two levels can be taken as spin up and spin down; or the polarization of a single photoninwhichthe two states can be taken to be the vertical polarizationandthe horizontal polarization.[2] In a classical system, a bit would have to be in onestateorthe other. However, quantum mechanicsallowsthequbittobein a coherent superposition of both states simultaneously, a property that is fundamental to quantum mechanics and quantum computing. Inaddition to superposition,qubitscan also exhibit a phenomenon called entanglement. This means that the state of one qubit is directly related to the state of another qubit, even if they are separated by large distances. 1.2 The BLOCH Sphere The Bloch sphere is like a map of all the possible statesthata single qubit can be in. Imagine a sphere, like a beach ball, where each point on the surface represents a different state of the qubit. The north pole of the sphere represents a qubit that is definitely in the state "0", and the south pole represents a qubit that is definitely in the state "1". All other points on the sphere representa superpositionofthe"0"and "1" states. The Bloch sphere is important because it helps us to visualize and understand how qubits work. By looking at the Bloch sphere, we can see how different quantum gates (like the X, Y, and Z gates) affect the state of a qubit. We can also see how measurements collapse the state of a qubit to either "0" or "1".[3] © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page 1282
  • 2. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 04 | Apr 2023 www.irjet.net p-ISSN: 2395-0072 2. The Quantum Phenomena One of the most well-known quantum phenomena is superposition, which means thata quantumobject,suchasan atom or photon, can exist in multiplestatesorlocationsatthe same time. This is different from classicalobjects,whichexist in a single state or location at any given time. (This means that an atom can be in two different states at the same time.) Another quantum phenomenon is entanglement, which occurs when two quantum objects become connected in a way that their properties are correlated, even when they are far apart from each other. This means that measuring the property of one object will instantaneously affect the property of the other object,even if they arelightyearsapart. (Atoms can also become "entangled" with each other. This means that what happens to one atom can affect what happens to another atom, no matter how far apart they are.) Another phenomenon is quantum tunneling, which is the ability of a quantum object to pass through a potential barrier, even if it does not have enough energy to overcome the barrier according to classical physics. (When atoms are in superposition, they can sometimes do things that seem impossible. For example, theycanpassthroughsolidobjects, like walls, without breakingthem.Thisiscalled"tunnelling") Quantum mechanics also involves, which is describedbythe Heisenberg uncertainty principle. This principle states that the more precisely the position of a particle is known, the less precisely its momentum can be known, and vice versa. (It is impossible to simultaneously know the exact position and the momentum of the particle.)[4] 3. The RSA Algorithm RSA (Rivest-Shamir-Adleman) is a public-key cryptosystem used for secure data transmission over the internet. It is one of the most widely used encryption algorithms,andisusedto encrypt sensitive information such as credit card numbers and passwords. The RSA algorithm uses two prime numbers to generate a public and private key pair. The security of the algorithm relies on the difficulty of factoring large numbers into their prime factors. Public Key encryption algorithm is alsocalledtheAsymmetricalgorithm.Asymmetricalgorithms are those algorithms in which sender and receiver use different keys for encryption and decryption. Each sender is assigned a pair of keys: Public Key & Private Key. The Public key is used for encryption, and the Private Key is used for decryption. Decryption cannot be done using a public key. The two keys are linked, but the private key cannot be derived from the public key. The public key is well known, but the private key is secret and it is known only to the user who owns the key. It means that everybody can send a message to the user using user's public key. But only theuser can decrypt the message using his private key Choose two prime numbers p and q. These are kept secret and are used to generate the public and private key pairs. Compute n = p * q. This is the modulus and is part of the public key. Euler's totient function phi(n) = (p-1)*(q-1). Choose an integer e such that 1 < e <phi(n)andgcd(e,phi(n)) = 1. This is the public key. Compute d such that d*e = 1 mod phi(n). This is the private key. To encrypt a message, the sender converts the message into a number m less than n, and raises it to the power of e mod n. To decryptthemessage, the receiver raises the encrypted message to the power of d mod n.[5] 4. The IBM-QISKIT IBM Qiskit is a powerful open-source software development kit for building quantum computing applications. It is one of the most popular and widely used platforms for creating, simulating, and executing quantum programs. With Qiskit, users can write quantum algorithms and execute them on real quantum devices provided by IBM or on simulators that emulate the behavior of quantum systems. Qiskit also includes a variety of powerful tools for visualizing quantum circuits and analyzing the results of quantum computations. Whether you are a seasoned quantum computing expert or just starting out, Qiskit provides a robust set of tools and resources to help you explore the exciting world of quantum computing. Qiskit consists of four main components: Terra, Aer, Ignis, and Aqua.[6] 6. Implementation of Quantum RSA methods Modular exponentiation: The most straightforward way to implement RSA is by using modular exponentiation. The key generation algorithm generates two large prime numbers, p and q, and calculates their product, N = p * q.Itthenchoosesa number e such that 1 < e < (p-1)(q-1)andgcd(e,(p-1)(q-1))= 1. The public key is (N, e), and the private key is d, where d is the modular inverse of e modulo (p-1)*(q-1). To encrypt a message, m, the sender calculates c = m^e mod N, and to decrypt it, the receiver calculates m = c^d mod N. Chinese remaindertheorem:AnotherwaytoimplementRSAis by using the Chinese remainder theorem. This method is faster than modular exponentiation, especially when the numbers involved are very large. The key generation algorithm is the sameas in the previousmethod.Toencrypta message, m, the sender first calculates m1 = m mod p and m2 = m mod q. The sender then calculates c1 = m1^e mod p and c2 = m2^e mod q. The sender then uses the Chinese remainder theorem to calculate c such that c ≡ c1 (mod p) and c ≡ c2 (mod q). To decrypt the message, the receiver calculates d1 = d mod (p-1) and d2 = d mod (q-1). The receiver then calculates m1 = c^d1 mod p and m2 = c^d2 mod q. The receiver then uses the Chinese remainder theorem to calculate m such that m ≡ m1 (mod p) and m ≡ m2 (mod q). © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page 1283
  • 3. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 04 | Apr 2023 www.irjet.net p-ISSN: 2395-0072 Montgomery multiplication: Montgomery multiplication is a technique used to speed up modular multiplication. It is based on the observation that if we use the Montgomery reduction algorithm to reduce the result of a multiplication, then the result is already in Montgomery form, and we can skip the final step of the algorithm. This saves time and reduces the number of modular reductions that need to be performed. This method is used in hardware implementations of RSA, as it is faster than other methods. 5. The IBM-QISKIT Code 5.1 Chinese Remainder Theorem Let's consider a system of two linear congruences: x ≡ a mod p x ≡ b mod q, where p and q are distinct prime numbers. The CRT tells us that there is a uniquesolutionforx modulo pq, which can be obtained using the following steps: 1. Compute the product N = pq. 2. Find the modular inverses y and z of p and q, respectively, such that y ≡ 1 mod p and z ≡ 1 mod q. This can be done using the extended Euclidean algorithm. 3. Compute the values u and v, where u ≡ ay mod p and v ≡ bx mod q. 4. The solution for x is given by x ≡ (uqz + vp y) mod N. In general, the CRT can be extended to solvesystemsoflinear congruences withanynumberofequations,providedthatthe moduli are pairwise coprime (i.e., they have no common factors other than 1).[7] Fig -1: CRT Code Snippet_1 Fig -2: CRT Code Snippet_2 Result: The input integers are [2, 3, 4, 5] The corresponding constants are [3, 5, 7, 11] The moduli are [5, 7, 9, 11] The solutions are: x = 12640 mod 3465 5.2 Montgomery Multiplication Generate two large prime numbers, p and q, and calculate their product N = pq. This is the modulus for RSA encryption. Choose an integer e such that 1 < e < (p-1)(q-1) and e is coprime with (p-1)(q-1). This is the public key. Calculate the modular inverse d of e modulo (p-1)(q-1). This is the private key. Choose a random message m that is less than N. Convert the message m to its Montgomery representation, which involves multiplying it by a certainfactorandthenreducingit modulo N. Encrypt the Montgomery representation of the message m using the public key e, which involves raisingitto the power e and reducing the result modulo N. Decrypt the encrypted Montgomery representation of the message using the private key d, which involves raising it tothepowerdand reducing the result modulo N. Convert the decrypted Montgomery representation of the message back to its original representation.[8] © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page 1284
  • 4. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 04 | Apr 2023 www.irjet.net p-ISSN: 2395-0072 Fig -3: Montgomery Multiplication Code Snippet_1 Fig -4: Montgomery Multiplication Code Snippet_2 Result: The first line of the output shows the result of Montgomery multiplication of 123456 and 654321 modulo 1000000007. The result is 128054480. The second line of the output shows the result of Montgomery exponentiation of 123456 to the power of 123456789 modulo 1000000007. The result is 406267049. 5.3 Shor’s Algorithm In quantum computing, a qubit or quantum bit is a basic unit of quantum information—the quantum version of theclassic binary bit physically realizedwith a two-statedevice. Aqubit isatwo-state(ortwo-level)quantum-mechanicalsystem,one of the simplest quantumsystemsdisplayingthepeculiarityof quantum mechanics. Examples include the spin of the electron in which the two levels can be taken as spin up and spin down; or the polarization of a single photoninwhichthe two states can be taken to be the vertical polarizationandthe horizontal polarization.[9][10][11] Fig -5: Shor’s Algorithm Code Snippet_1 Fig -6: Shor’s Algorithm Code Snippet_2 Fig -7: Shor’s Algorithm Code Snippet_3 © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page 1285
  • 5. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 04 | Apr 2023 www.irjet.net p-ISSN: 2395-0072 Result: ATTEMPT 1: Register Reading: 11000000 Corresponding Phase: 0.75 Result: r = 4 Guessed Factors: 3 and 5 *** Non-trivial factor found: {guess} *** *** Non-trivial factor found: {guess} *** 6. CONCLUSIONS The cryptography fieldisextensivelyresearcheduponin this project. The potential of classical and quantum computer and their phenomena was compared and observed. The observation leads to the belief that quantumcryptographyis much powerful than the traditional cryptography. This is possible due to the fact of various potential quantum phenomenon such superposition, entanglement, tunneling etc. The IBM Quantum Dashboard was accessed in order to achieve the desired results in the project. The project was initialized with the study of basic quantum gates and then the same was coded in the IBM-QISKIT shell (refer to the attached images). The histogram plots clearly explain the presence of superposition in some case and entanglement such as the Hadamard gate implementation & also the other phenomena. The result might have some noise due the quantum servers but effects are to the minimum. The work was successful in demystifying and introducing readers to classical and quantumcryptographyaswell asthe fundamental concepts behind encryption. The significant pertinent studies in the various branches of classical and quantum cryptography were examined. The goal of the project is to inspire to learn more about quantum research and to serve as a solid starting point for those just entering the subject of quantum cryptography. Moreover, while completing theproject,itwasobservedthat quantum cryptography for sure is a level betterthatclassical cryptography; but the amount of development needed in order to realize it in the practical world is still under- developed. Be it the software or the hardware perspective both needs their own share of development and progress. REFERENCES [1] Aumasson, Jean-Philippe(2017).Theimpactofquantum computing on cryptography. Computer Fraud & Security, 2017(6), 8–11. doi:10.1016/S1361- 3723(17)30051-9. [2] Mavroeidis, V., Vishi, K., Zych, M. D., & Jøsang, A. (2018). The impact of quantum computing on present cryptography. arXiv preprint arXiv:1804.00200. [3] Everitt, H. O. (Ed.). (2005). Experimental aspects of quantum computing. Springer Science+Business Media. [4] V. Padamvathi, B. V. Vardhan and A. V. N. Krishna, "Quantum Cryptography and QuantumKeyDistribution Protocols: A Survey," 2016 IEEE 6th International Conference on Advanced Computing (IACC), Bhimavaram, India, 2016, pp. 556-562, doi: 10.1109/IACC.2016.109. [5] I.B. Djordjevic. “Conventional Cryptography Fundamentals.” In: Physical-Layer Security and Quantum Key Distribution.Springer,Cham.2019,pp65- 91. [6] IBM Quantum, https://learn.qiskit.org/course. [7] Salifu, Abdul-Mumin. (2018). Rivest Shamir Adleman Encryption Scheme Based on the Chinese Remainder Theorem. Advances in Networks. 6. 40. 10.11648/j.net.20180601.14. [8] Jang, K., Song, G. J., Kim, H., Kwon, H., Lee, W. K., Hu, Z., & Seo, H. (2021). Binary field montgomery multiplication on quantum computers. Cryptology ePrint Archive. [9] Chouhan, N., Saini, H. K., & Jain, S. C. (2017, February). A novel technique to modify the SHOR'S algorithm— Scaling the encryption scheme. In 2017 Second International Conference on Electrical, Computer and Communication Technologies (ICECCT) (pp. 1-4).. [10] Experimental demonstration of Shor’s algorithm with quantum entanglement B. P. Lanyon,T.J. Weinhold,N.K. Langford, M. Barbieri, D. F. V. James∗ , A. Gilchrist, andA. G. White Centre for Quantum Computer Technology Department of Physics University of Queensland, Brisbane QLD 4072, Australia ∗Department of Physics Center for Quantum Information and Control University of Toronto, Toronto ON M5S1A7, Canada. [11] Gerjuoy, E. (2005). Shor’s factoring algorithm and modern cryptography. An illustration of the capabilities inherent in quantum computers. American journal of physics, 73(6), 521-540. © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page 1286