HW1:

Part I:
Q1:
it deciphers to:
Providing Your Assignment To Some One Else Is Considered Cheating
Q2:


(given) C0 = 1010101 0101010 1010101 0101010
(given) D0 = 1010101 0101010 1010101 0101010

We are in round 1, so from the table in FIPS46-3: 1 bit left shift (rotation of bits of bit to the left):
C1 = 0101010 1010101 0101010 1010101
D1 = 0101010 1010101 0101010 1010101


After permuted choice 2 (PC-2) we get the 48 bit k1 or the round 1 key:
K1 = 100100 010101 001111 100101 010000 110001 100110 111101


(given) R = 01010101 01010101 01010101 01010101

Based on the E-bit selection table we expand the 32 bit R value to 48 bits:
E(R) = 101010 101010 101010 101010 101010 101010 101010 101010


E(R) = 101010 101010 101010 101010 101010 101010 101010 101010
xor
K = 100100 010101 001111 100101 010000 110001 100110 111101
001110 111111 100101 001111 111010 011011 001100 010111

We now have 8 sections each consisting of 6 bits. Total of 48 bits. There are 8 Sboxes, each operating on one of the 8 sections. Each S box takes in 6 bits. The first and last bits constitue the row of the Sbox, and the middle 4 bits the column. The number which this row and column point to is the output of the Sbox and is 4 bits.

S1: row=0 column=7 S_out=8
S2: row=3 column=15 S_out=9
S3: row=3 column=2 S_out=13
S4: row=1 column=7 S_out=3
S5: row=2 column=13 S_out=3
S6: row=1 column=13 S_out=11
S7: row=0 column=6 S_out=8
S8: row=1 column=11 S_out=11


Therefore the output after the Sboxes would be:
8 9 13 3 3 11 8 11
1000 1001 1101 0011 0011 1011 1000 1011

After the permutation we have:
1011 1100 1110 1011 0110 1001 1000 0001
Q3:

(a):
p=3;q=11
n=p*q=33
Phi(n)=2*10=20

e has to be relatively prime to phi(n), and 1 < e < phi(n)
d is the inverse of e in phi(n)

if you select e=3 then d=7, since 3*7 = 21 mod 20 = 1 mod 20
if you select e=13 then d=17, since 13*17 = 221 mod 20 = 1 mod 20

Let's select e=3 and d=7 for the rest of this problem

(b):
Public key would be (e,n) or (3,33)

(c):
E(2)=2^3 mod 33 = 8

(d):
D(8)=8^7 mod 33 = 2097152 mod 33 = 2 (you could use the efficient exponentiation algorithm to calculate this)


Q4:

I was looking for three advantages:
1- Secret sharing
2- Signing/Authentication
3- Better Key Management

Q5:
Read section 1 of this paper: http://world.std.com/~dtd/sign_encrypt/sign_encrypt7.html

Q6:
-Firewalls are meant to block/limit access. Where as IDS is meant to detect intrusions. -Firewall is an active network component, it block traffic. IDS is a passive network component, it only detect intrusion and could signal a firewall to block the traffic. -They are both network security devices, which complement each other.

Part II:

You should have submitted a plot and compared your results. If you have not submitted a plot you will loose points!