How to encrypt this using caesar cipher? I recently had an exercise that read:


  Encrypt the message "easy question" using Caesar Cipher defined as:
  C=E(P)=(Pi+3) mod 26 


What is this formula and how to solve it?
The formula reads:


C: ciphertext of a character
E(P): encryption using Caesar of plaintext character =
(Pi + 3) mod 26: index of character in alphabet, plus 3 (the key) and then  modulus 26, the size of the alphabet


So basically for A you encode the value to 0 and add 3, which gets you the value 3, which decodes back to D. For Y you use 24, add 3 and get 27. However, when you do mod 26 you get the value 2, which decodes back to B. So basically you go 3 characters to the right, wrapping around to A after you've reached Z.

Decryption is simply the reverse.