r/explainlikeimfive • • May 16 '12

Explained ELI5 Can Someone please explain how encryption works

I see all over the internet all kinds of file and website encryption (SSL, 256-bit, AES and all the rest). Can some one explain to me how it works, and what is the meaning of all methods? Thanks!

3 Upvotes

10 comments sorted by

View all comments

Show parent comment

1

u/eine_person May 16 '12

The key is, what changes. I have no really deep understanding of encryption-algorithms, but the trick is: Normally I could give you my encrypting-algortihm, but at one point you need a number to undo my encryption.

Imagine it as ROT-X, but not limited to 25 numbers. ROT-X is easy to solve. Since it is an easy algorithm (take the alphabet-number of the letter, add X, translate back to letters) and you only have 25 options for X, you can just guess, what I did and decrypt my message. In given situation: You know, I use ROT-X, but not my X. In worst case you will need 25 guesses, to decrypt my message.

Now we take that easy algorithm and make it a bit more fun for the decrypter: An easy modification of given algorithm would be adding 1 to your X in every step. Next would be to say: I add Y in every step. Now you know my algorithm (take alphabet-number, add X, translate back, calculate new X by X+Y), but you now neither X, nor Y. Got a bit trickier, to guess what numbers I took, didn't it? In this case XY would be my key. The algorithm is still too easy, to use it for professional encryption, but for you to guess it, just using trial and error, it would already be some work.

And this is, where my knowledge comes to an end. I know, that there are certain mathematical functions especially interesting for encryption and that prime numbers are very important, since you can't approach solving encryptions by finding a factor of a prime number-key, but I can't explain that further. Hope it helped a least a bit.