Caesar cipher - cipher, in which each character in the open message is replaced by a character located a certain number of positions to the left or right of it in the alphabet. These are the encryption and decryption formulas for the Caesar cipher.
Here m is the message symbol, k is the key (shift),
n is the cardinality of the alphabet and c is the encrypted message symbol.
Consider an example where we encrypt the number 6 using the key 3 and the alphabet with a cardinality equal to 7
. In the first line we will encrypt m and get our secret message c, which is equal to 2,
and in the second we will decrypt it
#shorts #short #maths #cryptography #caesar