Project to simulate network attack defense mechanism

Write an Idea for programming project to simulate a network attack or threat mechanism or a defense mechanism.

Encipher message by using a keyword;

Decipher message by using a keyword.

Here is an detailed example of a user interaction with the encipher a program: A Program output is in bold & user input is in italics.

 Enter keyword: Javabean

 Enter a message end with a blank line:

We are the ideal!

We jqe sde Amqc!

Resistance is futile!

Qerfrsjlve for ntsfie!

Here is an detailed example of a user interaction with a decipher program

Enter the keyword: Javabean

Enter the message end with a blank line

We jqe sde Amqc!

We are the Borg!

Qerfrsjlve fr ntsfie!

Resistance is futile!

 This is mechanism how enciphering works. First, the keyword is used to create a "ciphertext" alphabet. The keyword is written out with repeated letters removed, and then the remaining letters of the normal alphabet (the "plaintext" alphabet" are added). So

from "Javabean", we get:


a b c d e f g h i j k l m n o p q r s t u v w x y z


j a v b e n c d f g h i k l m o p q r s t u w x y z

For above purpose, we ignore the case of the letters, treating them all in lowercase. Now to encipher a message, we have to replace each letter in the message with the corresponding ciphertext letter. Other characters, like spaces & punctuation, are left unchanged. Uppercase letters are converted to lowercase, substituted, and then converted to uppercase. For example, the letter 'B' is first converted to 'b', which is the second letter in the plaintext alphabet, and then substituted with the second letter of the ciphertext alphabet, which is 'a', and then converted back to uppercase, i.e. 'A'.

Deciphering is very similar, except which each letter is located in the ciphertext alphabet, and substituted with the corresponding letter from the plaintext alphabet. So, for example, 'f' is the 9th letter in the ciphertext alphabet, so it is substituted with the 9th letter is the plaintext alphabet, which is 'i'.

   Related Questions in Computer Network Security

©TutorsGlobe All rights reserved 2022-2023.