An open API service indexing awesome lists of open source software.

https://github.com/smaranjitghose/quantum_burglary

Demonstration of the use of Quantum Computing to leverage Shor's Algorithm for cracking RSA encryption
https://github.com/smaranjitghose/quantum_burglary

cryptography python quantum-computing rsa-algorithm shor-algorithm

Last synced: 5 months ago
JSON representation

Demonstration of the use of Quantum Computing to leverage Shor's Algorithm for cracking RSA encryption

Awesome Lists containing this project

README

          

# Quantum Burglary

In today's world, our lives are majorly driven by the internet and the data we consume and produce.

![Data](https://media.giphy.com/media/4FQMuOKR6zQRO/giphy.gif)

Hence, data protection and privacy is a critical thing that needs to be ensured.

![Security](https://media.giphy.com/media/81xwEHX23zhvy/giphy.gif)

None of us would like if those people hiding behind a mask in a dark room get to accesss our pictures,messages or any other form of data that we share. Not only is it displeasing but also harmful for our private and professional lives.

![Hacker](https://media.giphy.com/media/115BJle6N2Av0A/giphy.gif)

So what is to be done? We put our trust in various companies and service providers that have a bench smarty geeks using complex mathematical algorithms to encrypt our data while being tranferred over the internet

![lock](https://media.giphy.com/media/g9FBfdFszxcGY/giphy.gif)

A branch lying at the intersection of computer science and mathematics called cryptography is responsible for this. Mostly, we employ public cryptography methods.

![secret](https://media.giphy.com/media/wDGCA2dv9VJxC/giphy.gif)

RSA algorithm is a popular public key encryption technique devised back in 1978 by Rivest, Shamir and Adleman and is still used for a number of applications.

![legend](https://media.giphy.com/media/LqfTaNPDBs8GiKy2am/giphy.gif)

However, an algorithm called [Shor's algorithm](https://en.wikipedia.org/wiki/Shor%27s_algorithm) was already existant from 1994 that could crack this. But it depended on the use of a quantam computer for execution. This was very unlikely until recent times when IBM released its open source quantum computing development environment called [Qiskit](https://qiskit.org/) and access to their actual quantum computers using [IBMQ](https://www.ibm.com/quantum-computing/learn/what-is-ibm-q/)

![what](https://media.giphy.com/media/91fEJqgdsnu4E/giphy.gif)

Python 🐍 has our back on this with a simple walkthrough given in this repository!

# Wanna have a look?:

![give it](https://media.giphy.com/media/KamhkkcTtvOJ0FCjnB/giphy.gif)

#### Using Google Colab
- Click on the [Quantum Buglary Jupyter notebook](https://github.com/smaranjitghose/quantum_burglary/blob/master/quantum_burglary.ipynb)
- Click on ```Open in Colab```

#### Running locally:

- Make sure you have the lastest version of [Anaconda](https://www.anaconda.com/distribution/) installed on your system and its set to path

- Clone this repository ⏬
- Move inside πŸ‘‰ the repo
- Open the Terminal πŸ‘©β€πŸ’»
- and type ```cd quantum_burglary```
- Now make sure you have all the dependencies🧱
- type in the terminal
```pip install -r requirements.txt```
- Now load open the ```quantum_burglary.ipynb```
- Open the Terminal πŸ‘©β€πŸ’»
- and type ```jupyter notebook quantum_burglary.ipynb```
- Give it a few seconds to load (Depends on your system specifications)

- [Optional] If you are familiar with Number Theory, try going through both the algorithms's implementations
- Else just enter your message, encrypt it using RSA and watch Shor's algorithm carrying out the mystic arts

![mystery](https://media.giphy.com/media/fvwUrBaKytLtfiMeSK/giphy.gif)

# Futher work: πŸ—

![Coming soon](https://media.giphy.com/media/kyLptBNdyMHftuqoNy/giphy.gif)

- Addition of scripts to modularize this and run from the terminal
- Creating a GUI for this
- Explanation of Cryptography in general and Public Key Cryptography
- Explanation of RSA algorithm with number theory basics
- Explanation of Shor's algorithm with qiskit basics

## Always grateful πŸ™ to [NumberPhile's YouTube Channel](https://www.youtube.com/user/numberphile) for their smooth explanations on various mathematical/algorithmic concepts and the beautifully maintained [Qiskit Text Book by IBM](https://qiskit.org/textbook/preface.html) for making Quantum Computing simpler

![Thank You](https://media.giphy.com/media/AeWoyE3ZT90YM/giphy.gif)

# License πŸ“œ

[MIT License](https://github.com/smaranjitghose/quantum_burglary/blob/master/LICENSE)

# **Crafted with ❀ by Smaranjit Ghose**