In: Computer Science
All of the remaining questions involve the following toy encryption scheme. It encrypts plaintexts that consist of only uppercase letters and the underscore character (27 characters total):
ABCDEFGHIJKLMNOPQRSTUVWXYZ_
Note that the underscore character is part of the alphabet and 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. For example, if the message HI_SALLY is encrypted with the key 2407, the H would be shifted by 2, the I by 4, the underscore by 0, and the S by 7. Then we would start over with the first digit of the key, shifting A by 2, L by 4, and so on. So the ciphertext would be: JM_ZCPLE
Alphabets: ABCDEFGHIJKLMNOPQRSTUVWXYZ_
A. WFNSDNUMX
As we have been given encrypted words, so we need to decrypt the letters by shifting the letter to its before by that digit in key.
As we divide the given letters in to chunk of 4 letters at a time and apply key 4127.
first sub letters : WFNS : shift W before 4 positions, F to 1,N to 2,S to 7.
W - digit is 4 so shift the W before 4 positions. final answer is S.
F - Shift the F to 1 positions before. final letter is E.
N - Shift the N to 2 positions before. final letter is L.
S - Shift the S to 7 positions before. final letter is L.
second sub letters: DNUM : shift D before 4 positions,N to 1,U to 2,M to 7.
D - digit is 4 so shift the D before D positions. final answer is _.
N - shift the N before 1 positions. final answer is M.
U - shift the U before 2 positions. final answer is S.
M - shift the M before 7 positions. final answer is F.
third sub letters: X
only one letter present in third sub letters
shift X before 4 positions (4 is first digit in key). final ans is T.
final decrypted message is SELL_MSFT
B. NVFEDJUGTMCUX
first sub part : NVFE
N- shift the N before 4 positions. final answer is J.
V- shift the V before 1 positions. final answer is U.
F- shift the F before 2 positions. final answer is D.
E- shift the E before 7 positions. final answer is Y.
second sub part : DJUG
D- shift the D before 4 positions. final answer is _.
J- shift the J before 1 positions. final answer is I.
U- shift the U before 2 positions. final answer is S.
G- shift the G before 7 positions. final answer is _.
third sub part: TMCU
T- shift the T before 4 positions. final answer is P.
M- shift the M before 1 positions. final answer is L.
C- shift the C before 2 positions. final answer is A.
U- shift the U before 7 positions. final answer is N.
fourth subpart : X
only one letter present in fourth sub letters
shift X before 4 positions (4 is first digit in key). final ans is T.
final decrypted message is : JUDY_IS_PLANT
C _JVOHSCCDUTVSQU
As we divide the given letters in to chunk of 4 letters at a time and apply key 4127.
first part: _JVO
_- shift the _ before 4 positions. final answer is W .
J- shift the J before 1 positions. final answer is I.
V- shift the V before 2 positions. final answer is T.
O- shift the O before 7 positions. final answer is H.
second part: HSCC
H- shift the H before 4 positions. final answer is D.
S- shift the S before 1 positions. final answer is R.
C- shift the C before 2 positions. final answer is A.
C- shift the C before 7 positions. final answer is W.
third part: DUTV
D- shift the D before 4 positions. final answer is _.
U- shift the U before 1 positions. final answer is T.
T- shift the T before 2 positions. final answer is R.
V- shift the V before 7 positions. final answer is O.
fourth part: SQU
only THREE letters present in fourth sub letters
S- shift the S before 4 positions (1st digit in key). final answer is O.
Q- shift the Q before 1 positions(2nd digit in key). final answer is P.
U- shift the U before 2 positions(3RD digit in key). final answer is S.
final ans is : WITHDRAW_TROOPS
THANK YOU, HOPE YOU GOT THE IDEA AND CAN SOLVE ON YOUR OWN IF YOU MEET AN DISCREPANCY.
DO UPVOTE MY EFFORT