H e l l o t h i s i s a t e s t + 4 3 2 4 1 5 4 3 2 4 1 5 4 3 2 4 1 5 4 3 L h n p p % x k k w ! n w # c $ u j w vThe key is repeated over and over again to encode the message. If a letter such as Z is reached, it is cycled back to A. The ascii value of a space is 32. Add ing 5 to 32 yields 37, which is the ascii value of %.
View the C source code for the Encryptor
The RSA system involves the use of two keys instead of one. One key is used to encrypt a message and the other is used to decrypt the message. You cannot decrypt a message with the same key you used to encrypt it. One key can be used as the encryptor key, and it can be made public. The other key is used to decrypt and it is kept private.
The reason that the two keys work together is that they are mathematically linked. One key undoes what the other has done, similar to the way that division undoes multiplication. Here is the way that they are linked:
To encrypt a message, take the original code, raise it to the power of the Encrypt Key (E), and take the remainder when it is divided by a special number called the Modulus.
To decrypt a message, take the encrypted code, raise it to the power of the Decrypt Key (D), and take the remainder when it is divided by a special number called the Modulus.
modis the modulo function. It is like division, except it is using the remainder. For example 146 mod 12 = 2, because 146/12 = 12 remainder 2. The modulo function is useful for many purposes in encryption because of its periodic, or repeating nature. N is a large prime number used as the modulus in the formula
Once the values have been calculated, P and Q are then discarded. It is very important to do this, because D can easily be calculated from E if P and Q are known. But if N is really P*Q, doesn't that mean that you can find P and Q? The answer is that in order for a cracker to find P and Q from N, they must factor N. Because N is such a huge number, it is would take such an extreme amount of computing power to factor it, that it is practically impossible.