Prove that if only a single character is encrypted, then the shift cipher is perfectly secret.10/16/2023 If the letters for the key are taken from the same set, i.e. Thus, if you implement it on bits, as kelalaka suggests, it will not be an OTP. When we consider any letter X in the encrypted message, then the probability that the original letter is one of is 2/32, and the probability for other letters is 1/32. $(P + K) \mod 26$ will produce not uniform output, because the probability that (P + K) mod 26 = P (or P+1. If you don't respect the number of letters in the set and take 5 bits = 32 key values, then the letters of the original message will be moved not uniformly. If the letters for the key are taken from the same set (26 letters), and the generator is uniformly random, then you get an OTP.Īnd don't agree with kelalaka's answer that the key should be defined on the bits. In the question text you are describing a shift cipher. A Caesar cipher is a cipher where all letters are shifted by the same number of positions. What you described it not a Caesar cipher.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |