CSCI 4174 NETWORK SECURITY-Assignment 4


  • 作业标题:CSCI 4174/CSCI 6708 NETWORK SECURITY: ASSIGNMENT NO. 4
  • 课程名称:Dalhouse University CSCI 4174 Network Security
  • 完成周期:4天

练习1

Exercise 1: Write a program to simulate Playfair substitution cipher. Your program should have three
methods/functions:

  • Method 1: Accepts a secret key (String of characters) as argument and generates and returns a key matrix (2D array).
  • Method 2: Accepts plaintext (String of characters) and the key matrix as arguments and generates and returns the ciphertext.
  • Method 3: Accepts ciphertext (String of characters) and the key matrix as arguments and generates and returns the plaintext.

You may assume that the plaintext, ciphertext and the key all consist of only upper-case letters. You can ignore spaces, punctuations and line breaks.
Use a driver program with a main method to test the above methods. First test your code using the examples
from the lecture notes. Ensure that you test some of the special cases such as repeated characters in a pair, odd total number of characters, etc.

。。。

练习2

Exercise 2: Write a program to simulate Matrix transposition cipher. Your program should have two methods:

  • Method 1: Accepts plaintext (String of characters) and a key (integer array representing the permutation of the columns) as arguments and generates and returns the ciphertext (String of characters).
  • Method 2: Accepts ciphertext (String of characters) and a key (integer array representing the permutation of the columns) as arguments and generates and returns the plaintext (String of characters)

。。。

提交要求

You can develop the programs in Java, C, C++ or Python. Make necessary assumptions regarding the spacing of characters in the input text files.

Submit your source codes and a text file/PDF file containing the inputs and outputs.

What to submit: One zip file containing a) Source codes for the two programs and c) Text file/PDF containing sample inputs and outputs.


文章作者: IT神助攻
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 IT神助攻 !
  目录