MA 479 / CSSE 479: Cryptography
Homework 3 problems inspired by Computer Science
Rose-Hulman Institute of Technology
A joint effort of the
Department of Mathematics
and the Department of Computer Science & Software Engineering
Spring term, 2003-2004
For the programming problems:
- Use any language and environment you wish. Please check with me
if you have any questions about what features of the language or
environment you may use. In particular, please do not use pre-packaged
matrix calculation routines.
- The user interface is up to you.
- Turn in the source and object code of the program, and any supporting
materials, to these drop boxes.
- Make sure you include clear instructions on how the code is to be
run! Most of the points will be determined based on whether the program
performs correctly on test cases.
I am always open to other suggestions for programming projects. Come talk
to me if you have one in mind that you don't see here.
The non-programming problems you may turn in to the drop boxes or on
paper.
Drop box submissions are due at midnight on the due date. Paper submissions
are due in class or in the box outside my office by 5:00 p.m.
- [8 points.] Implement a version of S-DES with Biham's
key-dependent S-boxes. See here for the specifications.
Test data: a binary plaintext of 1000 1000 encrypted with a "regular"
binary key of 01111 11101 and an "extra" binary key of 11 0110
should give a binary ciphertext of 1010 0010. Decryption should work
correspondingly.
- [8 points.] Implement a version of DES with Biham's key-dependent
S-boxes. See here for the specifications.
- [4 points.] Create software that can encrypt and decrypt in Cipher
Block Chaining mode using one of the following ciphers: affine modulo
256, Hill modulo 256, S-DES, DES. (Pick one cipher only; ask me if it
is not clear.)
Test data for S-DES: using a binary initialization vector of
1010 1010, a binary plaintext of 0000 0001 0010 0011 encrypted with a
binary key of 01111 11101 should give a binary plaintext of 1111 0100
0000 1011. Decryption should work correspondingly.
Test data for DES: using a hex initialization vector 0123456789ABCDEF,
a hex plaintext of 0123456789ABCDEF 133457799BBCDFF1 encrypted with a 64-bit
hex key of 133457799BBCDFF1 should give a hex ciphertext of 948A43F98A834F7E
44BB24150CFC49F7. Decryption should work correspondingly.
- [8 points.] Create software that can encrypt and decrypt in 4-bit
Cipher Feedback mode using one of the following ciphers: additive
modulo 256, affine modulo 256, S-DES;
or
8-bit Cipher Feedback mode using one of the following ciphers: 2x2 Hill
modulo 256, DES. (Pick one cipher only; ask me if it is not clear.)
Test data for S-DES: using a binary initialization vector of 1010 1011,
a binary plaintext of 0001 0010 0011 0100 encrypted with a binary key
of 01111 11101 should give a binary plaintext of 1110 1100 1111 1010.
Decryption should work correspondingly.
Test data for DES: using a hex initialization vector 0123456789ABCDEF,
a hex plaintext of 0123456789ABCDEF encrypted with a 64-bit hex key
of 133457799BBCDFF1 should give a hex ciphertext of 84C4EFB845DB8A38. Decryption should work correspondingly.
- [8 points.] Create software that can encrypt and decrypt in 4-bit
Output Feedback mode using one of the following ciphers: additive
modulo 256, affine modulo 256, S-DES;
or
8-bit Output Feedback mode using one of the following ciphers: 2x2 Hill
modulo 256, DES. (Pick one cipher only; ask me if it is not clear.)
Test data for DES: using a hex initialization vector of 0123456789ABCDEF,
a hex plaintext of 0123456789ABCDEF encrypted with a 64-bit hex key
of 133457799BBCDFF1 should give a hex ciphertext of 847D14318E4871BC. Decryption should work correspondingly.
- [4 points.] Create software that can encrypt and decrypt in
Counter mode using one of the following ciphers: affine modulo 256,
Hill modulo 256, S-DES, DES. (Pick one cipher only; ask me if it is
not clear.)
Test data for S-DES: using a counter starting at 0000 0000, a binary
plaintext of 0000 0001 0000 0010 0000 0100 encrypted with a binary key
of 01111 11101 should give a binary plaintext of 0011 1000 0100 1111 0011
0010. Decryption should work correspondingly.
Test data for DES: using a counter starting at 0000000000000000, a
hex plaintext of 0123456789ABCDEF 133457799BBCDFF1 encrypted with a 64-bit
hex key of 133457799BBCDFF1 should give a hex ciphertext of 95A9069E03288291
4E6D833F9CF5858B. Decryption should work correspondingly.
- [8 points.] Implement a differential cryptanalysis attack
on 3-round S-DES.
- [16 points.] Implement a differential cryptanalysis attack on
6-round S-DES. (If you try this problem, stop by my office for a handout
to get you going.)