Hey, I know how it works, but i can't understand how to generate a public and private key, yes i know there are tools to do it, but i am a programmer, what do you expect :)
Knowing how it works implies knowing how to generate keys.
You will need a bignum library to handle the numbers, and a good way to ensure primality.
If you are looking to do it yourself, you can use either GMP (a heavyweight library, at http://gmplib.org/ ) or ttmath (lightweight, at http://www.ttmath.org/ ).
Thank you for the speedy response, but i don't think i expressed myself clearly. Lets say i have two prime numbers as keys - keeping it trivial 5 and 7 - and i have the message "hello" how would i encrypt it so that given the other key it can decrypt it.
Lets say i have two prime numbers as keys - keeping it trivial 5 and 7 - and i have the message "hello" how would i encrypt it so that given the other key it can decrypt it.
If you don't know that, than what about the encryption method do you know?