Break RSA Encryption in 10 Lines of Python Code | #Shorts Quantum Computing with Shor's Algorithm

preview_player
Показать описание
Want to break RSA and ECC cryptography in just 10 lines of python code?
Let me show you how with a quantum computer!

Trying to figure out how to use quantum computing in your business or need to secure against the quantum threat?

Universal gate quantum computers can run Shor's algorithm to break modern forms of modern cryptography. It was discovered in 1994!

Using Qiskit Aqua library, you can factor numbers (the basis of RSA cryptography) using Shor's algorithm with 10 lines of code!

Let's import Shor, QuantumInstance, and Aer, a quantum simulator.

You can also change the backend to a real quantum chip. This example uses the qasm_simulator, but you can change the backend to a real quantum chip!

We setup the quantum instance and the number of shots, or runs, of this algorithm

Of course, right now we can only factor small numbers, but this demonstrates how far we've come with quantum computing!

You can get access to the IBM Quantum Experience and Qiskit documentation here:

#Shorts #quantumcomputing #pythoncoding
Рекомендации по теме
Комментарии
Автор

Hey! IBM has updated Qiskit so this code no longer works. There's no more Shor built-in algorithm, you have to use a Factorizer. And the docs are now only on the IBM Quantum platform!

Anastasia-Marchenkova
Автор

I can do it with fewer lines using a while loop and 300 trillion yrs

elchupacabra
Автор

This is cool and all but watching a programming TikTok is so surreal lmao.

jongxina
Автор

Me: so where's the catch here
Key: 21
Me: ah yes. seCuRiTy.

Raleighthrbub
Автор

Factoring 21 with Shor's algorithm in a quantum computer is just like using a tactical laser beam to kill a mosquito.

mmtf
Автор

This is a lot, lot more interesting than an air hostess closing an airplane door

sijiharold
Автор

4096 bit key next please. Need to drain the federal reserve

Truth_In_Victory
Автор

I'm like "hol up" no way some one on tick tock just broke 4096 RSA encryption over python and is alive to speak about it.

cccc
Автор

Now that my friends, is how all TikToks should be! 👏🏽

emftechEE
Автор

Me: what's going on under the hood

Python programer: how tf I know, ask the person who build it.

Me: 🙄 OK

pushpajitbiswas
Автор

Everyone else: *highly intellectual discussion*
Me: "...wtf does that say simulate 'gasm by getting the backend"

flatbat
Автор

Open the modules to discover there aren't only 10 lines.

hectorgomez
Автор

This doesn’t make sense. Quantum computing relies on actual quantum hardware, thus - a quantum computer. A quantum simulator plugin? If it’s still running on your binary computer it cannot perform simultaneous computations. This demonstrates the concept of breaking RSA algorithms but you can already just explain that conceptually a lot easier than downloading some libraries to put into python. It’d be more digestible for viewers. But claiming this plugin breaks RSA encryption is incorrect because (like shown) you are only demonstrating a binary computation of a factorial of 21. The reason quantum shines is because it can do it to astronomical prime factorials, which this code could never do while running on a bit based computer. So no, this doesn’t break RSA, this shows the process of breaking RSA using a binary computation device.

ktn
Автор

Your shorts are all I want on my feed lol! Genius!! Plz keep it up! This world needs people like you! 🤙🤙

Nashcaster
Автор

_"Do you wanna use someone else's code with just 10 lines of Python code?"_
There, I fixed it for you.

hevad
Автор

Greetings from Montreal Canada Just discovered your channel, wow, I didn't know what I was missing!

XM
Автор

*Ransomware:* All of your files have been encrypted.
*Me:* **laughs in 10 lines of python code**

sounak
Автор

Python makes it easy but writing rsa and other encryption code from scratch is the real deal

battlefist
Автор

This is a specific case of: “How to do something? … Don’t. Call a library to do it.”

Ash-vuvo
Автор

for a second i was like "damn you full of shit" until she said "using a quantum computer" lmao

kanjiNaem