Answer
$k = 13$
for the case k = 13, the enciphering function for the shift cipher is then the
ame as the deciphering function.
Work Step by Step
Enciphering function of the shift cipher:
f(p) = (p+k) mod 26
Corresponding deciphering function:
f-(p) = (p-k) mod 26
Note: the trivial case k = 0 also makes the enciphering function for the shift
cipher is the same as the deciphering function.
Let us assume that & is not zero. We want the two functions to be the same
(p + k) mod 26 = (p - k) mod 26
Subtract p from each side of the previous equation:
k mod 26 = -k mod 26
Adding 26 does not have an effect on the result due to the modulo 26:
k mod 26 = 26 - k mod 26
Since k is a number between 0 and 25 (including), 26-k is a number between
1 and 26. Assuming that & is not zero, we then obtain:
k = 26 - k
Add & to each side of the equation:
2k = 26
Divide each side of the equation by 2:
k = 13
for the case k = 13, the enciphering function for the shift cipher is then the as the deciphering function.