Question

Hello, I need to think of a short message between 15 and 40 characters. I will...

Hello,

I need to think of a short message between 15 and 40 characters. I will need to encode it using a linear affine cipher with n=26. I am unsure of how to even start and am not understanding how to process this. Can you please help and show me how to do it step by step? Also, what is the best way I can decipher messages without the key?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

linear affine cipher is v combination of additive and multiplicative ciphers which uses a pair of key.

first key - is used with multiplicative cipher (k1 )

- belongs to Z26* = > only some numbers in Z26 will have multiplicative inverse, so only those have to be selected as k1.

  k1 = {1, 3, 5, 7, 9, 11, 15, 17, 19, 21, 23, 25}

second key - is used with additive cipher (k2 )

- belongs to Z26

k2 = {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}

=> key domain = 12 * 26 = 312

Encryption : C = (P*k1 +k2)mod 26

Decryption: P = (C-k2)*k1-1)mod 26

Plaintext - hello everyone

First the plaintext will be mapped with numbers ( 0 - a....25 - z)

Let k1 and k2 be 7, 2 respectively.

Both multiplication and addition will be done with respect to modulo n (=26)

Encryption:

h = 07 ------> (07 * 7 + 2)mod 26 => (49+2)mod 26 =  25 ---------> 25 = z

e = 04 ------> (04 * 7 + 2)mod 26 => (28+2)mod 26 = 04 ---------> 04 = e

l = 11 ------> (11 * 7 + 2)mod 26 => (77+2)mod 26 = 01 ---------> 01 = b

l = 11 ------> (11 * 7 + 2)mod 26 => (77+2)mod 26 = 01 ---------> 01 = b

o = 14 ------> (14 * 7 + 2)mod 26 => (98+2)mod 26 = 22 ---------> 22 = w

e = 04 ------> (04 * 7 + 2)mod 26 => (28+2)mod 26 = 04 ---------> 04 = e

v = 21 ------> (21 * 7 + 2)mod 26 => (28+2)mod 26 = 19 ---------> 19 = t

e = 04 ------> (04 * 7 + 2)mod 26 => (28+2)mod 26 = 04 ---------> 04 = e

r = 17 ------> (17 * 7 + 2)mod 26 => (28+2)mod 26 = 17 ---------> 17 = r

y = 24 ------> (24 * 7 + 2)mod 26 => (28+2)mod 26 = 14 ---------> 14 = o

o = 14 ------> (14 * 7 + 2)mod 26 => (98+2)mod 26 = 22 ---------> 22 = w

n = 13 ------> (13 * 7 + 2)mod 26 => (98+2)mod 26 = 14 ---------> 15 = p

e = 04 ------> (04 * 7 + 2)mod 26 => (28+2)mod 26 = 04 ---------> 04 = e

Ciphertext = zebbweterowpe

Decryption

Ciphertext = zebbweterowpe

Inverse can be found using Fermat's theorem or Euler's theorem or Euclidean method

Inverse of 7 is 15

z = 25 -----> ((25-2)*7-1)mod 26 => (23*15)mod 26 = 07 ---------> 07 = h

e = 04 -----> ((04-2)*7-1)mod 26 => (02*15)mod 26 = 04 ---------> 04 = e

b = 01 -----> ((01-2)*7-1)mod 26 => (25*15)mod 26 = 11 ---------> 11 = l

b = 01 -----> ((01-2)*7-1)mod 26 => (25*15)mod 26 = 11 ---------> 11 = l

w = 22 -----> ((22-2)*7-1)mod 26 => (20*15)mod 26 = 14 ---------> 14 = o

e = 04 -----> ((04-2)*7-1)mod 26 => (02*15)mod 26 = 04 ---------> 04 = e

t = 19 -----> ((19-2)*7-1)mod 26 => (17*15)mod 26 = 21 ---------> 21 = v

e = 04 -----> ((04-2)*7-1)mod 26 => (02*15)mod 26 = 04 ---------> 04 = e

r = 17 -----> ((17-2)*7-1)mod 26 => (15*15)mod 26 = 17 ---------> 17 = r

o = 14 -----> ((14-2)*7-1)mod 26 => (12*15)mod 26 = 24 ---------> 24 = y

w = 22 -----> ((22-2)*7-1)mod 26 => (20*15)mod 26 = 14 ---------> 14 = o

p = 15 -----> ((15-2)*7-1)mod 26 => (13*15)mod 26 = 13 ---------> 13 = n

e = 04 -----> ((04-2)*7-1)mod 26 => (02*15)mod 26 = 04 ---------> 04 = e

Plaintext = helloeveryone

=> hello everyone

Brute-force and statistical methods can be used to identify the plaintext without knowing the key. But this will take time.

If suppose intruder has access to the sender's computer, they can go for chosen-plaintext attack. Here a text is given and corresponding ciphertext is found. Now, we have to map the letters from the text to ciphertext and have to find the key. In this way we'll be able to decode whatever sent between the sender and receiver.

Add a comment
Know the answer?
Add Answer to:
Hello, I need to think of a short message between 15 and 40 characters. I will...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • "Encode and decode a message using a substitution and transposition cipher." I'm not exactly sure what...

    "Encode and decode a message using a substitution and transposition cipher." I'm not exactly sure what a substitution and transposition cipher are exactly, but I "think" it has to do with something like this: I want to encode then decode the string: "HELLO". I have: c(H) = (8 + 4)mod26 == 12mod26 == 12 H = 12 == L c(E) = (5+4)mod26 E = 9 == I c(L) = (12+4)mod26 L = 16 == P x2 c(O) = (15+4)mod26 O...

  • Can i get Playfair Cipher for python 3 that encrypts a message and decrypts it, could...

    Can i get Playfair Cipher for python 3 that encrypts a message and decrypts it, could you possibly make it as simple as you can without losing functionality. please include comments, that would help me better understand Example of PlayFair Cipher: https://en.wikipedia.org/wiki/Playfair_cipher The Playfair cipher uses a 5 by 5 table containing a key word or phrase. Memorization of the keyword and 4 simple rules was all that was required to create the 5 by 5 table and use the...

  • Computer Security Question about the Caesar Cipher: I also don't know this part of the problem...

    Computer Security Question about the Caesar Cipher: I also don't know this part of the problem Hello I am not sure how to figure this out Hello so for question 3, I think its +23 "the password is qqzzqqz" choose the correct multiple choice Question1 2 pts The following cipher text was produced by the Caesar Cipher: The Caesar cipher cryptanalysis technique from lecture calculates the most likely keys. When the technique is applied in this case, which of the...

  • I need help programming this program in C. 1.) Write a program that reads a message,...

    I need help programming this program in C. 1.) Write a program that reads a message, then checks whether it's a palindrome (the letters in the message are the same from left to right as from right to left), example is shown below: Enter a message: He lived as a devil, eh? Palindrome Enter a message: Madam, I am Adam. Not a Palindrome 2.) Ignore all characters that aren't letters. Use integer variables to keep track of positions in the...

  • 5. Essay on Quantum Mechanics (40 pts) In this problem, you will need to write down your short es...

    5. Essay on Quantum Mechanics (40 pts) In this problem, you will need to write down your short essay on quantum mechanics. You’re NOT allowed to discuss this problem with your classmates or instructor: therefore, your answer here should be unique, and be NOT even similar to that of others. Just think by yourself and freely state what you learned and how you feel about quantum mechanics now. You may want to include the following specific topics in your essay....

  • Hello, I am taking an electrical engineering lab course and I really need help understanding the...

    Hello, I am taking an electrical engineering lab course and I really need help understanding the solution to this question: Now this solution was marked as correct. Here are my questions: 1) Could you please explain how they obtains the gain (Av) of 6 V? 2) Why did they substract 0.6 V from the gain? If you could walk me through this solution step-by-step, I would really appreciate it, thank you. 2. (2 points) Consider the push-pull amp sketched below....

  • Hello, can you help me respond to this message in a unique way. I would like...

    Hello, can you help me respond to this message in a unique way. I would like a very short responds. Thanks I was very surprised to learn just how expansive the range of roles social workers can fill. I think what struck me most was social workers in settings like retirement homes, and dealing with elderly people. I was always under the impression social workers were mainly concerned with children and young adults. Fighting social injustices, a major goal of...

  • I NEED A MATHEMATICAL ALGORITHM FOR A CEASER CHYPER I CREATED. PLEASE HELP ME...THANK YOU! THE...

    I NEED A MATHEMATICAL ALGORITHM FOR A CEASER CHYPER I CREATED. PLEASE HELP ME...THANK YOU! THE SINGLE-DIGIT KEY IS 14 THE PHRASE IS "GOOD MORNING PROFESSOR" THE CYPHER IS UCCR ACFBWBU DFCTSGGCF I DON'T KNOW HOW TO CREATE THE ALGORITHM AND IT CANNOT BE COMPUTER GENERATED. a. Develop a Caesar cipher-type encryption algorithm with a little more complexity in it. For example, the algorithm could alternatively shift the cleartext letters positive and negative by the amount of the key value....

  • Hello, please keep the solutions simple and understandable, I am not a computer scientist. Thank you! 1.1. How many bits are necessary to represent the alphabet using a binary code if we only allow u...

    Hello, please keep the solutions simple and understandable, I am not a computer scientist. Thank you! 1.1. How many bits are necessary to represent the alphabet using a binary code if we only allow uppercase characters? How about if we allow both uppercase and lowercase characters? 1.2. Describe how you can create an OR gate using NOT gates and AND gates. 1.3. A kilobyte is 1024 bytes. How many messages can it store? 1.4. What is the entropy associated with...

  • c++ Please help! i keep getting an error message. I think my main problem is not...

    c++ Please help! i keep getting an error message. I think my main problem is not understanding the circle calculations function and how both the area and the circumference is returned from the function. I know & needs to be used, but I am unsure how to use it. Copy the following code and run it. You should break it into the following 3 functions getValidinput - which asks the user to enter the radius and then make sure that...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT