Programming Assignment 1

Programming Assignment 1 - DCP1323 10/6/2009 Programming...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
DCP1323 10/6/2009 1/5 Programming Assignment 1 Due before 10:10, Wednesday, October 28, 2009 ( 3 weeks ) Note: You need to COMPLETELY follow the instructions in this sheet. Problem description Vigen è re cipher is a kind of polyalphabetic cipher. Each key consist of m characters, called keyword . The Vigen è re cipher encrypts m characters at a time. Let m be a positive integer. Define ° = ? = ± = ( ? 26 ) ² . For a key ± = ( ³ 1 , ³ 2 , , ³ ² ) , we define ? ³ ´ 1 , ´ 2 , , ´ ² µ = ( ´ 1 + ³ 1 , ´ 2 + ³ 2 , , ´ ² + ³ ² ) and ³ · 1 , · 2 , , · ² µ = ( · 1 − ³ 1 , · 2 − ³ 2 , , · ² − ³ ² ) where all operations are performed in ? 26 = { ¸ = ¹ , º = » , , ¼ = ? } In this assignment, you are requested to use C language to implement a program that satisfies the following requirements: a. Given a plaintext X and a key K , using the Vigen è re cipher to encrypt the plaintext X to a ciphertext Y b. Given a ciphertext Y and a key K , using the Vigen è re cipher to decrypt the ciphertext Y to a plaintext X c. Cryptanalysis of the Vigen è re cipher: Given a ciphertext Y only c.1: determine the length m of the key c.2: determine ± = ³ 1 , ³ 2 , , ³ ² µ c.3: calculate the computing time (faster is better) You are suggested to use the functions declared in string.h (strstr,… ), ctype.h (isalpha, islower, tolower,…),
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

Programming Assignment 1 - DCP1323 10/6/2009 Programming...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online