I want to make an encryption program that works like the banks(RSA), there is a public key and a private key to unlock the message after it is encrypted. The problem is that I am not very good at math and can't make sense of the tutorials on this out there. Could someone please explain the process in making the program and show some code samples to make it easier to understand. Please use small numbers to make the process easier to follow. Thank You in advance.
It boils down to finding two huge prime numbers, and doing math on the M (message) you're trying to encrypt, as if it was a number.
Could someone please explain the process in making the program and show some code samples to make it easier to understand.
I have a suggestion: try writing the program yourself, then when you get stuck post in General or Beginners for help. And if you're successful, you should consider publishing your program as an Article.
I downloaded a cryptography for dummies type pdf, I could send you if your interested or you could find it youself on a peer to peer thing havnt read it yet but I had a little fun scrambling code with an algorithm...i effed up at first tho... modulus and other things infinatley obfuscatify of whatever...havn't read it yet :D
Then why reinvent the wheel? There's tons of free libraries out there that implement the RSA algorithm just fine. And not having any understanding of the math behind it is likely going to cause you problems when trying to implement it.
True, copying code often does not allow learning, but studying of that code can provide great insight and understanding. Plus the OP is mostly asking for help understanding the math, not for actual code.
Can someone just explain the RSA algorithm with actual numbers? I don't have much problems with math, but I don't understand what is what, for example I don't know what numbers to choose as my key. Can I use two primes like 5 and 7? 5*7 = 35 simple enough, 35 is my public key, what do I do with the public key after that? Use some simple examples, I just want to understand the logic behind it, the coding won't be that hard when I understand it.
>Want to write encryption program.
>Not good at math.
Can't have both. Modern encryption is quite math intensive, and the people that write such things generally have degrees in math.
Math degree? That is why RSA encryption shines, its easy to use yet hard to crack. Everyone(interested in encryption) knows the mechanics but prime factoring high numbers takes so much computer power that it becomes a reliant method. To prove that anyone at any stupidity level can write a simple encryption program I made a program myself, based on the example from naruko's link.