The Introduction to multidisciplinary Computer Science II by James Tam | Return to the course web page |
Encryption is the process of converting ordinary text into a form that cannot be read. Encryption is an important part of computer security. Vast amounts of information are transmitted via the Internet and wireless networks each day and we've all heard stories of systems being 'hacked' and private personal information such credit and banking information being stolen. Encrypting data before it's transmitted can prevent or mitigate ease dropping during transmission because all that will be seen of the encrypted text is gibberish. However there are good encryption algorithms and there are poor ones. Cracking or breaking the encryption is the process of trying to find the original text from the encrypted form. Good encryption algorithms make it very hard or impossible to find the original information. This is why for web browsers 128 bit encryption is superior to the older form that only uses 64 bits and for wireless computer networks why WPA replaced WEP. Decryption is the reverse of encryption and takes unreadable encrypted information and restores the original message using the original encryption algorithm.
For this assignment you will write a program that will prompt the user for a string of text and the person can choose between one of two encryption algorithms in order to 'scramble' the message. Although the algorithms that you will implement are by necessity extremely simple ones, they should provide an insight into how encryption can be used to protect data and how poor encryption can make it easy to guess the original message. You don't need to implement a decryption algorithm for this assignment. There will be a sample executable (called "crypt") illustrating how your encryption program should work and in UNIX it can be found under the path: /home/219/assignments/assignment1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Finally you need to decompose your programs into functions and employ (in some form) parameter passing and return values in your functions. The decomposition by function should be a fairly logical one that's well balanced between functions. For example you shouldn't name a function 'decrypt' if it actually encrypts text. Nor should you have one or more 'super' functions where most/all of the program instructions reside and a few trivial functions that do almost nothing.