CS190 Slackers - Class Homework


Various Links

CS190 Homepage

Cryptography Discussion Topics

Cryptography Class Homework

Cryptography White Paper by Slackers

CS190 Homework

Homework #1
Homework #2
Homework #3
Homework #4

Other Groups Homework

Push Technology
VRML
Network Agents
Audio Streaming
Java Group

Cryptography Resources

Cryptography FAQs

Induhvidual Home Pages

Tim
Grean
Brandon

UCSD Computer Related

ACM - UCSD
UCSD CSE Page


This page can be
viewed with:



And maybe this
but no guarantees:



Join the DNRC:









 
Slackers Group : Cryptoraphy Class Homework

Assignment : Simple secret-key encryption exercise.



A simple example of a secret-key encryption:
  • create a key (a random string)
  • perform an XOR between the characters in the key and characters of the encrypted message
  • to decode the message, perform an XOR on the encrypted message with the same key
original string 101111
key 101010
encrypted string 000101
--- transmission ---
encrypted string 000101
key 101010
original string 101111

The XOR algorithm is a polyalphabetic substitution cipher.

Assignment is to write a program to perform this type of encryption. In the example above, it was a 6 bit key and 6 bit block. We'll use 16 bit blocks and a 16 bit key (an int). This assignment only requires you to encrypt numeric messages rather than ascii characters to avoid complexity, but if you are so inclined to do so you'll get extra extra credit!

So basically your program should:
  1. take as input the plaintext numeric message
  2. encrypt it using a key that you designate with the XOR scheme
  3. print out the encrypted message
  4. pretend its sent the message somewhere
  5. decrypt the ciphertext
  6. then print out the resulting plaintext.





Copyright 1997 by Slackers Union. Comments should go to any of the group members. Opinions reflected on this page are by no means opinions of UCSD. Go sue somebody else.

Last Modified: April 21, 1997