Question

In: Computer Science

Use the Affine cipher algorithm with k1=7,k2=11 to encrypt the following message : I want to...

Use the Affine cipher algorithm with k1=7,k2=11 to encrypt the following message : I want to get a hundred in this test

Solutions

Expert Solution

In the Affine Cipher Algorithm, every alphabet is first given a numeric serial code as follows:

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
Code(x) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

The code "x" is then changed using the formula f(x) = (k1*x + k2) mod m, where 'm' is the length of the alphabet used and k1, k2 are the keys of encryption.

The encrypted code is then assigned its corresponding alphabet and the encrypted message is generated.

Now, we shall see how the encrypted message is generated for the given message.

Given: Message: I want to get a hundred in this test, k1 = 7, k2 = 11, m = 26

Assigning code to it:

Alphabet I    W A N T    T O    G E T    A    H U N D R E D    I N    T H I S    T E S T
Code(x) 8 22 0 13 19 19 14 6 4 19 0 7 20 13 3 17 4 3 8 13 19 7 8 18 19 4 18 19

Changing the code "x" to f(x) = (7 * x + 11) mod 26

Alphabet I    W A N T    T O    G E T    A    H U N D R E D    I N    T H I S    T E S T
Code(x) 15 9 11 24 14 14 5 1 13 14 11 8 21 24 6 0 13 6 15 24 14 8 15 7 14 13 7 14

Finally, getting the encrypted message by assigning the relevant alphabet to code:

Code(x) 15 9 11 24 14 14 5 1 13 14 11 8 21 24 6 0 13 6 15 24 14 8 15 7 14 13 7 14
Alphabet P    J L Y O    O F    B N O    L    I V Y G A N G    P Y    O I P H    O N H O

Final encrypted message: p jlyo of bno l ivygang py oiph onho


Related Solutions

Write a Java program that uses the RC4 cipher algorithm to encrypt the following message using...
Write a Java program that uses the RC4 cipher algorithm to encrypt the following message using the word CODES as the key:   Cryptography is a method of protecting information and communications through the use of codes so that only those for whom the information is intended can read and process it. Instead of using stream length 256, we will use length 26. When encrypting, let A = 0 to Z = 25. Ignore spaces and punctuations and put the message...
(a) Use Vigenere cipher to encrypt the message “United States Constitution” using the keyword      “covid” Given...
(a) Use Vigenere cipher to encrypt the message “United States Constitution” using the keyword      “covid” Given that the Vigenere cipher of part (a) with the same keyword was used to produce the ciphertext: VFPUSVSNBVRCNQW Find the plaintext message.        
1 Introduction A cipher is an algorithm which encrypts a message into cipher text so that...
1 Introduction A cipher is an algorithm which encrypts a message into cipher text so that it can be safely transmitted without an eavesdropper being able to (easily) read it. For the purposes of this assignment the message and ciphertext will be stored as strings of ASCII characters. Cipher algorithms always perform two tasks: encryption and decryption. The encryption process takes a “message” and “key” as inputs and produces cipher text. The decryption process performs the reverse: it turns cipher...
Write a Java program to encrypt the following message using the RC4 cipher using key CODES:...
Write a Java program to encrypt the following message using the RC4 cipher using key CODES: Cryptography is a method of protecting information and communications through the use of codes so that only those for whom the information is intended can read and process it. Instead of using stream length 256, we will use length 26. When encrypting, let A = 0 to Z = 25 (hence CODES = [2 14 3 4 18]). Ignore spaces and punctuations and put...
Suppose K1 and K2 have the following distribution: Scenario Probability return K1 return K2 w(1)   ...
Suppose K1 and K2 have the following distribution: Scenario Probability return K1 return K2 w(1)    0.3 -10% 10% w(2)    0.4 0% 20% w(3)    0.3 20% -10% (a) Find the risk of the portfolio with w1 = 30% and w2 = 70%. (b) Find the risk of the portfolio with w1 = 50% and w2 = 50%. (c) Which of the portfolios above (in part (a) and (b)), has higher expected returns?
1. Use a Vigenere cipher with a key of "Patton" to encrypt: "If everyone is thinking...
1. Use a Vigenere cipher with a key of "Patton" to encrypt: "If everyone is thinking alike, then somebody isn't thinking." Is this a good key? Why or why not? 2.  Calculate the index of coincidence for the result. SHOW ALL WORK PLEASE
acid formula k1 k2 k3 arsenic acid 5.8e-3 1.1e-7 3.2e-12 carbonic acid 4.45e-7 4.69e-11 hydrogen sulfide...
acid formula k1 k2 k3 arsenic acid 5.8e-3 1.1e-7 3.2e-12 carbonic acid 4.45e-7 4.69e-11 hydrogen sulfide 9.6e-8 1.3e-14 phosphoric acid 7.11e-3 6.32e-8 4.5e-13 Determine the pH of a 0.0410 M solution of the following salts. A table of pertinent K values is found to the right. a) Na2S b) Na3AsO4
Part 1: Design a Cipher allow user to use a “key” to encrypt and decrypt the...
Part 1: Design a Cipher allow user to use a “key” to encrypt and decrypt the message. Use at least two ciphers combined to design your own cipher Specify the min. and max. length of the message user can enter to encrypt Specify the length of the “key” user can enter to encrypt and decrypt the message Part 2: Programme the cipher and make it available to validate. Cleartext for the original programming scripts has to submitted. A frontend webpage...
Part 1: Encrypt the message CINEMA using RSA with n = 17 * 11 and e...
Part 1: Encrypt the message CINEMA using RSA with n = 17 * 11 and e = 13, use A =10...Z = 35, work in blocks of one letter each. Part 2: Decrypt the message 088-164-051-164-021-074 using the same parameters from part 1.
The Vigenère Cipher is an encryption algorithm that combines the use of a keyword with the...
The Vigenère Cipher is an encryption algorithm that combines the use of a keyword with the message to be encrypted. A tableau is provided that shows an encrypted character for each combination of characters in the message and the keyword. Using the Vigenère Tableau encryption scheme with a keyword of KEYWORD, encrypt the following message: IS INFORMATION SECURITY ESSENTIAL After encrypting the message, decrypt the following message, using KEYWORD as the keyword: YRJUW WWRIG JTFUW ERECE LCMKL CIWKR R For...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT