<TD ALIGN=LEFT VALIGN=TOP>
<!-- COL 3, every page should be different -->
<TABLE BORDER=0>
<TR><TD COLSPAN=3 ALIGN=LEFT>
The purpose of this assignment is to get you familiar with visual cryptography. Please see Doug Stinson's visual cryptography page for an introduction. Our assignment will be slighly different from what's on Doug Stinson's page
| Compiling | |||||||||||||||||||||||||||||||||
make hw2an executable named hw2 is created. The commandline syntax for hw2 is as follows: hw2 stream -p=pphrase -l=len
hw2 encrypt -p=pphrase -out=name [pbmfile]
hw2 merge pbmfile1 pbmfile2
hw2 decrypt [pbmfile]
Square bracketed items are optional. Follows the UNIX convention that commandline options can come in any order. (Note: a commandline option is a commandline argument that begins with a - character in a commandline syntax specification.) If pbmfile is not specified, the program reads from stdin. pbmfile refers to a file in the Portable Bitmap (or PBM) format with P4 being the magic number. Output of the program goes to stdout and error messages go to stderr. The meaning of the commands are:
The output for various commands are as follows.
|
|||||||||||||||||||||||||||||||||
| Key Generation for a Simple Stream Cipher | |||||||||||||||||||||||||||||||||
Let p be a null-terminated string containing the passphrase.
Please ues the following algorithm (or equivalent) to generate
key stream for our simple stream cipher. (Please make appropriate
modifications to make it work according to spec.)
At the end of every iteration, 8 bytes of the key stream are generated.
#include <sys/types.h>
#include <openssl/md5.h> /* please read this */
| |||||||||||||||||||||||||||||||||