Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I want k-rail fence cipher in python code Note: Please, send the code in Python. Also the algorithm steps must be equivalent to prepared code.

I want k-rail fence cipher in python code

image text in transcribed

Note: Please, send the code in Python. Also the algorithm steps must be equivalent to prepared code. Also, I want all the answers of the questions. Project 1 (k-Rail Fence Cipher): The rail fence cipher is a transposition cipher, where a plaintext message is enciphered into a ciphertext message by performing some sort of permutation on the plaintext letters. Using this encryption technique, a plaintext is written down as a sequence of diagonals and then reads off as a sequence of rows. For example, to encipher the message "HELLO CSEN 4340 STUDENTS!" with a rail fence of depth 2, we write the following: H LOS N30TDNS E10E44su E10 The resulting ciphertext is: HLOSN 30TDNSELCE44SUET! The decryption function is performed as follows: - Compute the length of ciphertext. Let m be this length. - Let k be the number of rails (i.e., key). Reserve m placeholders on the k-rail fence in the same way a plaintext was placed on a k-rail fence. Assign the ciphertext letters to those placeholders row by row, starting from the top one. Read off the resulting plaintext as a sequence of diagonals. 1. Write an algorithm for a k-rail fence cipher, where k 22. 2 Show that your proposed algorithm is correct using an informal proof (i.e., discussion) 3. Give a program corresponding to your proposed algorithm, using python programming language. Your program should simulate this cipher and display the ciphertext along with the corresponding plaintext and key. The implementation of this k-rail fence cipher software should be as structured as possible. You should have a user-friendly interface showing all the steps of this cipher, including encryption and decryption. Note: Please, send the code in Python. Also the algorithm steps must be equivalent to prepared code. Also, I want all the answers of the questions. Project 1 (k-Rail Fence Cipher): The rail fence cipher is a transposition cipher, where a plaintext message is enciphered into a ciphertext message by performing some sort of permutation on the plaintext letters. Using this encryption technique, a plaintext is written down as a sequence of diagonals and then reads off as a sequence of rows. For example, to encipher the message "HELLO CSEN 4340 STUDENTS!" with a rail fence of depth 2, we write the following: H LOS N30TDNS E10E44su E10 The resulting ciphertext is: HLOSN 30TDNSELCE44SUET! The decryption function is performed as follows: - Compute the length of ciphertext. Let m be this length. - Let k be the number of rails (i.e., key). Reserve m placeholders on the k-rail fence in the same way a plaintext was placed on a k-rail fence. Assign the ciphertext letters to those placeholders row by row, starting from the top one. Read off the resulting plaintext as a sequence of diagonals. 1. Write an algorithm for a k-rail fence cipher, where k 22. 2 Show that your proposed algorithm is correct using an informal proof (i.e., discussion) 3. Give a program corresponding to your proposed algorithm, using python programming language. Your program should simulate this cipher and display the ciphertext along with the corresponding plaintext and key. The implementation of this k-rail fence cipher software should be as structured as possible. You should have a user-friendly interface showing all the steps of this cipher, including encryption and decryption

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

Joe Celkos Data And Databases Concepts In Practice

Authors: Joe Celko

1st Edition

1558604324, 978-1558604322

More Books

Students also viewed these Databases questions

Question

Repeat Problem 36 when the materials are surrounded by water.

Answered: 1 week ago