- 1 A Simple Way Of Encrypting Data Is To Employ A Substitution Cipher A Substitution Cipher Is A Method Of Encrypting B 1 (76.75 KiB) Viewed 10 times
1. A simple way of encrypting data is to employ a substitution cipher. A substitution cipher is a method of encrypting b
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
1. A simple way of encrypting data is to employ a substitution cipher. A substitution cipher is a method of encrypting b
1. A simple way of encrypting data is to employ a substitution cipher. A substitution cipher is a method of encrypting by which units of plain text are replaced with ciphertext, according to a fixed system. The simplest is to simply change each character by some offset. For example, an offset of +5 will replace 'A' with 'F'; 'B' with 'G'; 'C' with 'H'; etc. To do this you simply use the ASCII value of the character and add the offset to get the ASCII value of the new character. To make this cipher more dynamic, we will repeat it multiple times on a given line of text. How many times is up to the user! The user will run your program by using the following command: ./a.out 5 -7 3 -7 12 Each of the input numbers is a successive substitution cipher to perform that will be completed by a separate thread for each substitution. Characters are passed between the threads using pipes. So, for the example above we will have five threads with six pipes as pictured here. TI will do a cipher of +5; T2 a cipher of -7; T3 a cipher of 3; T4 a cipher of -7 and T5 a cipher of 12. T1 T2 T3 main T4 T5 The main process will read the input characters from stdin and print the output of the encrypted text on stdout. There is a limit of 1000 ciphers that the user can specify on the command line.