How to Encrypt with RSA (but easy)

preview_player
Показать описание
A simple explanation of the RSA encryption algorithm. Includes a demonstration of encrypting and decrypting with the popular algorithm.
Enjoy :)
Рекомендации по теме
Комментарии
Автор

I usually never comment on videos but you’re an absolute legend mate, you exactly know how a student thinks and you know exactly what to teach, please upload more videos, i would love to learn coding from you, cheers

Iba-jn
Автор

The constraints for e is just {2 < e < r; gcd(e, r) = 1}, and it has to follow those constraints so that the encryption is one-to-one rather than many-to-one, where in the latter case it would not be reversible. More recent versions of RSA use the Carmichael's function, in this case λ(n), (which simplifies to lcm(p - 1, q - 1)) in those constraints rather than r (which is just the Eurler's totient function of n). It achieves the same results but has the benefit of faster decryption.

amihart
Автор

Why doesn't this have more views??? Thank you so much !!

linamoussadek
Автор

Thank you so much for this tutorial! I could not wrap my head around turning the concepts behind encryption into code before this.

Moocow
Автор

How does D = 7? I don't understand that part. Is 7 just a random number that you are using as the message to send?

michaiahf
Автор

this dude just saved my finals, awesome video thank lord i found it

pedropago
Автор

Holy shit this was actually huge for an assignment, made it so much easier and less stressful

thegreatpugtato
Автор

Bro you have only one video and a great one.

rudraprasad
Автор

I don't get it; how does 3^(-1) % 20 equal 7 and not 0.33..

SirArghPirate
Автор

Simple AF, come back with more stuff dude!

Its_Me_Butters
Автор

Really nice video....definitely simple and yet makes a lot of sense!

zachahmad
Автор

the whole modulo stuff is not possible, because when calculating d, the first mod value is always smaller than the second, which gives a syntax error

bumpsy
Автор

I love it! I'm looking forward to learn programming with python with your video.

lucinali
Автор

Thank you so much! The best explanation!!!

Листочек-чк
Автор

I don't understand how we find d=7 ??

cagnozkut
Автор

*patiently waits for the python program implementation*

ReikiMaulana
Автор

Hey I dont think there's a gaurentee that e can always be 3. If totient n is 72 then 3 is not relatively prime and does not fit the. requirements

daddyhollow
Автор

Awesome!! well-explained thank you so much

khadijahalhayder
Автор

At the end of both encryption and decryption we're doing mod n making it within the range of n

Meaning our initial messsage CANT be higher than n?

FriedMonkey
Автор

your d formula is different to what i have in my course material. what i have is d = e^-1 mod( λ(n) )

now λ(n) = lcm(p-1, q-1)
the way you do the d also gets the right answer but answer must be divided by 1 but in your example i get 3 not 7.

i think the right d formula is d = 1 / e^-1 mod(r)


ok so i found out a shortcut. to find d just try this formula first because if numbers are small enough you can just get the d directly. e * d ≡ 1 mod(r)

so here e = 3 and r = 20
so 3 * d ≡ 1 mod(20)
if you know how to mod words we can see by putting d=7 we get 21 ≡ 1 mod(20)
if you dont know how mod words then it just means 21 remove as many 20 as you can until you have remaining 1. ya when i first learned mod the notation was going above my head but trick is not to look at is a equality. its triple bar not equal sign. so 21 ≡ 1 mod(20) this expression would be same even if i wrote it as 41 ≡ 1 mod(20) because that just means if i did 41 - 20 - 20 i would have 1 remaining.

r = (p-1)(q-1)

Kwatch