Date: Fri, 05 Mar 2004 17:45:00 -0600 (CST) From: Mark Jacobson To: 810-151-05@uni.edu Subject: Assignment two and Friday, March 5th review... Hi VB.NET students, Since today is 03/05, the following note should have been published on 3 by 5 notecards in honor of March 5th! :-) Please see the VB.NET class web page at: http://www.cns.uni.edu/~jacobson/c151VB.html and link to an extensive review of today's class and your next programming assignment: http://www.cns.uni.edu/~jacobson/030VB/030NetAssign2.htm Your next assignment is explained there at the above page. It involves reading the contents of an ASCII raw text file and encrypting each line of the file, and displaying the encrypted lines in a listbox control. 1 1 1 1 1 123456789012345678 1234567890 PANTHER would be encrypted as: 48PH followed by 37 T followed by 260NR followed by 159AE ----> 48PH37 T260NR159AE <--- Ciphertext 1234567890 PANTHER <--- Plaintext 1 1 1 1 1 1 1 1 1 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 9 0 P A N T H E R - - - - <--- 4, 8, 12, 16th * * * * <--- 3, 7, 11, 15th & & & & & <--- 2, 6, 10, 14, 18th $ $ $ $ $ <--- 1, 5, 9, 13, 17th This is called a tranposition cipher technique, since it rearranges the letters of the original message to encrypt the plaintext into ciphertext. The other type of encryption basic approach is called a substitution cipher, such as the Caesar cipher, which replaces each character with a different character. For example: A is replaced by D, B is replaced by E, etc. If the key for the Caesar cipher is 3, which was the actual key for the very first use of a Caesar cipher. Secret key 3 means A becomes D B becomes E C becomes F D becomes G etc. Caesar cipher method with secret key value of 5 would map letter A to F, B to G, C to H, etc. Character( ASCIICodeValue(letter) + 5 ) would be the technique to encrypt with key = 5 Character( ASCIICodeValue("A") + 5 ) Character( 65 + 5 ) Character( 70 ) "F" Your assignment is due on Wednesday, March 10th. I will probably not have an in-class quiz on Wednesday, March 10th. We can discuss that on Monday in class. Mark