Encryption
For the encryption, only the public key n is used, thus producing a ciphertext out of the plaintext. The process follows:
Let be the plaintext space (consisting of numbers) and be the plaintext. Now the ciphertext is determined by
- .
That is, c is the quadratic remainder of the square of the plaintext, modulo the key-number n.
In our simple example, is our plaintext space. We will take as our plaintext. The ciphertext is thus .
For exactly four different values of m, the ciphertext 15 is produced, i.e. for . This is true for most ciphertexts produced by the Rabin algorithm, i.e. it is a four-to-one function.
Read more about this topic: Rabin Cryptosystem