Hi guys, I\'m having sometrouble implementing the following problem, and the alg
ID: 3612408 • Letter: H
Question
Hi guys, I'm having sometrouble implementing the following problem, and the algorithim ofthe following substitution-based cryptosytem. I"m writing thisproblem in Java. Thank you for all your help.The substitution-based cryptosytem uses the following:
Input alphabet ={a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z} (26symbols)
Output alphabet = Letters + Numbers; where:
Letters ={A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z};
Numbers = {0,1,2,3,4,5,6,7,8,9} (a total of 26 + 10 = 36symbols) It uses the following method algorithm. (1) The parties agree ona set of secret words, whose lengths vary between 5 and 26 symbols,which are taken from the “Letters” set. Let us callthis set of words SKEYS. The secret words must be such that nosymbols of “Letters” are repeated in them. (Forinstance, KEY = ANALYSIS would not be included in the setSKEYS.)
(2) The sender splits the plaintext into lines.
(3) CYPHERTEXT = empty_string;
(4) For each line L do
(4.1) The sender generates a random number between 1 and the numberof elements in set SKEYS. Let us call this number NL.
(4.2) KEY = SKEYS[NL] (the element NL of set SKEYS)
(4.3) The sender generates a random number between 1 and 26. Let uscall this number PL.
(4.4) The sender aligns the secret word KEY under the PL-thcharacter of “Input alphabet” (depending on the lengthof KEY, wrap-around might be needed)
(4.5) All remaining symbols in “Input alphabet” aresubstituted by the symbols in “Letters” which are notin KEY, in the order they appear in “Letters”.
(4.6) The sender uses this substitution to encrypt L. Let us callthis encryption LE.
(4.7) CYPHERTEXT = CYPHERTEXT + (PL + NL + LE) (Note: PL is encodedas a two-digit number which varies between 01 and 26).
(5) The sender sends CYPHERTEXT to the receiver When encrypting/decrypting a plaintext, the sytem must treatall letters as lower case and the sstem must echo to thecyphertext any symbol that is not in "Input Alphabet" Thank you for all of your help. Hi guys, I'm having sometrouble implementing the following problem, and the algorithim ofthe following substitution-based cryptosytem. I"m writing thisproblem in Java. Thank you for all your help.
The substitution-based cryptosytem uses the following:
Input alphabet ={a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z} (26symbols)
Output alphabet = Letters + Numbers; where:
Letters ={A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z};
Numbers = {0,1,2,3,4,5,6,7,8,9} (a total of 26 + 10 = 36symbols) It uses the following method algorithm. (1) The parties agree ona set of secret words, whose lengths vary between 5 and 26 symbols,which are taken from the “Letters” set. Let us callthis set of words SKEYS. The secret words must be such that nosymbols of “Letters” are repeated in them. (Forinstance, KEY = ANALYSIS would not be included in the setSKEYS.)
(2) The sender splits the plaintext into lines.
(3) CYPHERTEXT = empty_string;
(4) For each line L do
(4.1) The sender generates a random number between 1 and the numberof elements in set SKEYS. Let us call this number NL.
(4.2) KEY = SKEYS[NL] (the element NL of set SKEYS)
(4.3) The sender generates a random number between 1 and 26. Let uscall this number PL.
(4.4) The sender aligns the secret word KEY under the PL-thcharacter of “Input alphabet” (depending on the lengthof KEY, wrap-around might be needed)
(4.5) All remaining symbols in “Input alphabet” aresubstituted by the symbols in “Letters” which are notin KEY, in the order they appear in “Letters”.
(4.6) The sender uses this substitution to encrypt L. Let us callthis encryption LE.
(4.7) CYPHERTEXT = CYPHERTEXT + (PL + NL + LE) (Note: PL is encodedas a two-digit number which varies between 01 and 26).
(5) The sender sends CYPHERTEXT to the receiver When encrypting/decrypting a plaintext, the sytem must treatall letters as lower case and the sstem must echo to thecyphertext any symbol that is not in "Input Alphabet" Thank you for all of your help. When encrypting/decrypting a plaintext, the sytem must treatall letters as lower case and the sstem must echo to thecyphertext any symbol that is not in "Input Alphabet" Thank you for all of your help.
Explanation / Answer
0m
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.