Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE HELP SOLVE PROBLEM 2 ONLY Problem 1. Write computer programs for the Substitution Cipher based on Zn, which is cor- responding to 26 alphabetic

PLEASE HELP SOLVE PROBLEM 2 ONLY

image text in transcribed

Problem 1. Write computer programs for the Substitution Cipher based on Zn, which is cor- responding to 26 alphabetic characters (0 - 25), space (26), and ", " (27) "." (28). The key is a random permutation 7 on Z29. Write down encryption and decryption programs. For the encryption, the plaintext and the key need to be input. The out put will be the ciphertext. Select a paragraph of text (I don't think any two people will choose a same paragraph if they choose independently) and encrypt it using your encryption algorithm. Then use your decryption program to check the correctness. You can use Java, C or other computer languages. Record your plaintext, ciphertext and the key # in your answer sheet. Problem 2. Write computer programs for the Permutation Cipher based on Z2g as in Problem 1. In encryption program, the inputs are a value of m (the size of permutation), a permutation as the key and the plaintext, and the output is the ciphertext. Write the decryption program accordingly. Try your programs by some text. Note that since 1 m and the length of plaintext is not fixed, paddings might be added to the end of plaintext by the program. You may think about what kind padding is better for the security and design your paddings. Problem 3. Write an algorithm to perform known-plaintext attack on Permutation Cipher. This algorithm can be used to determine the length of the permutation m and the key permutation. Use this algorithm to attack the system in Problem 2: by inputting a plaintext and the according cipher text from Problem 2, your program should output the value of m and the permutation (the key). Problem 1. Write computer programs for the Substitution Cipher based on Zn, which is cor- responding to 26 alphabetic characters (0 - 25), space (26), and ", " (27) "." (28). The key is a random permutation 7 on Z29. Write down encryption and decryption programs. For the encryption, the plaintext and the key need to be input. The out put will be the ciphertext. Select a paragraph of text (I don't think any two people will choose a same paragraph if they choose independently) and encrypt it using your encryption algorithm. Then use your decryption program to check the correctness. You can use Java, C or other computer languages. Record your plaintext, ciphertext and the key # in your answer sheet. Problem 2. Write computer programs for the Permutation Cipher based on Z2g as in Problem 1. In encryption program, the inputs are a value of m (the size of permutation), a permutation as the key and the plaintext, and the output is the ciphertext. Write the decryption program accordingly. Try your programs by some text. Note that since 1 m and the length of plaintext is not fixed, paddings might be added to the end of plaintext by the program. You may think about what kind padding is better for the security and design your paddings. Problem 3. Write an algorithm to perform known-plaintext attack on Permutation Cipher. This algorithm can be used to determine the length of the permutation m and the key permutation. Use this algorithm to attack the system in Problem 2: by inputting a plaintext and the according cipher text from Problem 2, your program should output the value of m and the permutation (the key)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Databases Technologies And Applications

Authors: Zongmin Ma

1st Edition

1599041219, 978-1599041216

Students also viewed these Databases questions

Question

5. Arranging for the training facility and room.

Answered: 1 week ago

Question

Slicers on a dashboard are the filters. True False

Answered: 1 week ago

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago