Exam 2 Flashcards

1
Q

how do you get p[4|O] in the dice problem?

A

Consider all odd cases, look for sums of 4 within those cases

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

how do you get p[a|1]?

A

Use bayes theorem:
p[a|1] = ( p[1|a] p[a] ) / p[1]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

how do you get p[1|a]?

A

refer to the table, look for 1 under a, add up the probabilities of the keys with 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

formula for joint probability

A

p[x,y]=p[x|y]p[y]
OR
p[x, y]=p[y|x]p[x]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

how to get l(f)

A

multiply the number of bits with the probability
(if only the frequency was provided, calculate the probability by dividing by the total)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

find H[P|1]

A

-1/ln2(p[a|1]ln(p[a|1])+p[b|1]ln(p[b|1])+…)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

information gain

A

( H(P)-H(P|C) ) / H(P)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what is |P| and |K| for a substitution cipher?

A

|P|=26, |K|=26!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what is |P| and |K| for a vigenere cipher?

A

|P|=26^m, |K|=26^m

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what is |P| and |K| for a hill cipher?

A

|P|=26^m, |K|=26^m^2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

what is |P| and |K| for a affine cipher?

A

|P|=26, |K|=312

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

R_L = ?

A

0.75

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

formula for unicity distance?

A

ln|K| / (R_L ln|P|)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

formula for the number of spurious keys? s_n

A

|K|/ (|P|^nR_L) - 1
n = size of the cipher text

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

memory requirement for s-box?

A

l2^l
l = number of inputs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

how would you get p[1] given a table?

A

multiply the probability of every key where 1 appears with the probability of the letter it corresponds to

17
Q

H(P) of a table?

A

use probabilities of a,b,c in entropy formula

18
Q

get H[P|C]

A

do p[1]H[P|1]+p[2]H[P|2]+…

19
Q

division algorithm

A
  1. make columns for u1, v1, u2, v2, u3, v3, q
  2. The first row should be 1, 0, 0, 1, (larger input), (smaller input), 0
  3. For the next row, former v’s become u. Every u becomes u - (v *q). Q will be u3/v3 without the remainder
  4. Repeat 3 until v3 = 0. GCD = u3. Multiplicative inverse of the smaller number in the mod of the larger number is u2
20
Q

how to write a decryption rule given an encryption rule

A
  1. encryption function is: e(x) = (ax+b) mod 26
  2. key is (a, b)
  3. decryption function: d_k(y)=a^{-1}(y-b)
  4. dont forget to mod out!!!
21
Q

how to decrypt autokey cipher?

A
  1. Write the value equivalents of each letter
  2. Start by subtracting the key value from the first letter, subtract the resulting value from the next letter and onwards
22
Q

find the inverse of a matrix in Z_26

A

K^{-1}=(detK)^{-1}\begin{pmatrix}
d & -b
-c & a
\end{pmatrix}

determinant is ad - bc

23
Q

formula for period of key stream

A

2^m -1
m = degree

24
Q

How to apply MixColumn

A

1) convert matrix values to polynomials
2) multiply 2x2 matrix of [1 x^2 x^2 1] with the matrix
3) mod out, divide each polynomial by the field given

25
Q

perfect secrecy

A

p[x|y] = p[x] for x in P and y in C

26
Q

Compute N_D

A

1) for the x* column: add the bits of the input value for each input in the s-box
2) for the y* column: use the s-box and x* as the input
3) add y + y* to get y’
4) look for the number of values in y’ that equal the output value

27
Q

Compute R_P

A

N_D / 2^m
m = number of bits

28
Q

baby horst cipher

A

1) first half of plaintext is L0, other half is R0
2) L1 = R0
3) R1 = L0 + f(R0, K1)

29
Q

SDES/DES: how to handle inputs for s-box

A

DES:
1) 1st and last bit plus 1 represents the row
2) middle bits + 1 represent the column
SDES:
1) 1st bit + 1 represents the row
2) last 3 bits + 1 represent the column

30
Q

H(P|C)

A

H(P|C) = H(P, C) - H(C)

31
Q

for modular equations, when is there more than one solution or no solution?

A

when gcd does not equal 1

32
Q

formula for hash functions

A

B = a^x mod p
x = L_a(B)

33
Q

random oracle model

A

E = 1 - (1 - 1/M)^Q
Q = number of tags
M = possible messages