There is a toy encryption scheme which encrypts plaintexts that consists of only
ID: 3913044 • Letter: T
Question
There is a toy encryption scheme which encrypts plaintexts that consists of only uppercase letters and theunderscore character (27 characters total): ACDEFGHIJKLMNOPQRSTUVWXYZ_ The underscore will also be encrypted. A key in this scheme consists of 4 digits, each from 0 to 9. Each digit tells how much to shift one character, that is, change it to the character that many positions later in the alphabet. If the shift goes past "_", then we wrap around to the beginning. The key is applied separately to each group of 4 letters in the message. So the message HI_SALLY would be JM_ZCPLE.
If you have a key 3144, Rerwrite the description of the encryption scheme to be more formal using functional notation to define the three algorithms G, E, and D. You may use English but give the definitions as eqality and variables to represent plaintext, ciphertext, and key.
Explanation / Answer
Message contains A - Z and _ (underscore)
Key contains 0 - 9
Assign a numerical value equvialent to each letter
A - 1 B - 2 C - 3 D - 4 E - 5 F - 6 G - 7 H - 8 I - 9 J - 10 K - 11 L - 12 M - 13
N - 14 O - 15 P - 16 Q - 17 R - 18 S - 19 T - 20 U - 21 V - 22 W - 23 X - 24
Y - 25 Z - 26 _ - 27
G -> Find the length of the message (Lm) and key (Lk)
If Lm > Lk then repeat key till key length equals message length
Encryption
Cipher text (C) = E(Mi, Ki) = ( Mi + Ki ) mod 27
Decryption
Plain text (M) = D(Ci, Ki) = ( Ci - Ki ) mod 27
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.