Question

In: Computer Science

Write a short message of between 15 and 40 characters to your classmates. Encode it using...

Write a short message of between 15 and 40 characters to your classmates. Encode it using a linear affine cipher with n=26. Post the message to the “Encrypted Messages” thread but do not give the “a” and “b” that you utilized.

Also post your own initial response thread in which you propose at least one way that you might try to decipher messages without the key.

Solutions

Expert Solution

Message:

HELLO FRIENDS NICE TO MEET YOU

encoding the message with n=26

Encryption(x) = (a*x + b)mod n = (a*x + b)mod 26

X values for alphabets

A B C D E F G H I J K L M

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

N O P Q R S T U V W X Y Z

encrypting given message:

WELCOME TO THE CLASS

a =17, b=20

Message W E L C O M E T O T H E C L A S S
Equivalent numeric (x) 22 4 11 2 14 12 4 19 14 19 7 4 2 11 0 18 18
Encrypted(x) = (a*x +b)%26 (17* 22 +20)%26 = 4 (17* 4 +20)%26 = 10 (17* 11 +20)%26 = 25 (17* 2 +20)%26 = 2 (17* 14 +20)%26 = 24 (17* 12 +20)%26 = 16 (17* 4 +20)%26 = 10 (17* 19 +20)%26 = 5 (17* 14 +20)%26 = 24 (17* 19 +20)%26 = 5 (17* 7 +20)%26 = 9 (17* 4 +20)%26 = 10 (17* 2 +20)%26 = 2 (17* 11 +20)%26 = 25 (17* 0 +20)%26 = 20 (17* 18 +20)%26 = 14 (17* 18 +20)%26 = 14
Decrypted Messgae E K Z C Y Q K F Y F J K C Z U O O
Encrypted Message is : EKZCYQK FY FJK CZUOO

To Decrypt the message use ;

D ( x ) = a^-1 ( x - b ) mod n

n=26


Related Solutions

JAVA Write a class for a Stack of characters using a linked list implementation. Write a...
JAVA Write a class for a Stack of characters using a linked list implementation. Write a class for a Queue of characters using a linked list implementation. Write a class for a Queue of integers using a circular array implementation.
Write a small program to encrypt and decrypt a message using Python library.
Write a small program to encrypt and decrypt a message using Python library.
Part 1 Write a program that reads a line of input and display the characters between...
Part 1 Write a program that reads a line of input and display the characters between the first two '*' characters. If no two '*' occur, the program should display a message about not finding two * characters. For example, if the user enters: 1abc*D2Efg_#!*345Higkl*mn+op*qr the program should display the following: D2Efg_#! 1) Name your program stars.c. 2) Assume input is no more than 1000 characters. 3) String library functions are NOT allowed in this program. 4) To read a...
writing Subject This week's assignment is to write a piece of fiction using characters or settings...
writing Subject This week's assignment is to write a piece of fiction using characters or settings created by someone else, or using public figures as your main characters. Below are a few options for how to proceed. Take a story that you know really well and write it from the point of view of a different character. Try writing an alternative ending to your favorite story. Take characters from different mediums and tell a story about them. What might an...
Using c++, write a program that reads a sequence of characters from the keyboard (one at...
Using c++, write a program that reads a sequence of characters from the keyboard (one at a time) and creates a string including the distinct characters entered and displays the string on the screen. The input terminates once the user enters a white-space character or the user has entered 50 distinct characters. Do not use C-Strings. 2. Use the following function to append character “ch” to the string “s”: s.push_back(ch); 3. Read the input characters one by one, i.e. do...
In c++, using stack structure, write a program that will take a sequence of characters (string)...
In c++, using stack structure, write a program that will take a sequence of characters (string) and determine whether it is a palindrome. Use the linked version of the stack.
Write an assembly language program that will print out the message of your choosing #NOTE #write...
Write an assembly language program that will print out the message of your choosing #NOTE #write in a simple way, so that i can execute it from command window using masm
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...
Your task is to write a C program which performs encryption and decryption of a message...
Your task is to write a C program which performs encryption and decryption of a message using the substitution cipher algorithm. Write a C program which performs encryption and decryption using the substitution cipher algorithm. Your program must be fully automated (ie: it does not take any interactive user input) and either encrypt or decrypt depending on the files which exist in the program’s directory. If message.txt exists your program should read that file, encrypt the contents, and write the...
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...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT