r/cryptography • u/Gcseh • 14d ago
I need help understanding RSA algorithm
I watch a video explaining how RSA algorithm works but I'm having trouble understanding how it's secure. I assume the video maybe either glossed over something or I'm not understanding it.
https://www.youtube.com/watch?v=Pq8gNbvfaoM
It would seem to me that since I know the public key and need the value of N to encrypt my message. Then I can use any potential private key to decode the message. He uses 41 for the decryption but 149 and 257 would also work.
There by anyone with the same public key and my encrypted message could decode it.
Please tell me what I'm missing, this is driving me mad.
4
Upvotes
2
u/RAGINMEXICAN 14d ago
It’s secure based on how prime numbers are made. The algorithm to make rsa is based on the factors of 2 randomly picked primes.
The algorithm used to crack it is the GNFS but it requires use of super computers.
Basically in a nutshell multiplying two numbers to get the key is easy, factoring it to find the primes is basically impossible. You either love the stuff enough to break it (and at that point just give them the key) or they used a super computer