| 1 | 2 | 3 | 4 | 5 |
THEOREM: Let a, b be relatively prime integers. There is a one-to-one correspondence between Mn(ab)* and Mn(a)* × Mn(b)*.
eK(x) = x ⊕ K ⊕ KRwhere KR denotes string reversal so for example 011010111R = 111010110. Is the modification perfectly secure? Prove your claim.
Here Mallory can listen to and alter all of the communications between Alice and Clive in both directions. How can Mallory learn Alice's password after only 50 sessions? The point here is that "perfect security" guarantees nothing when applied to more complicated protocols than the definition intends.
ρ(x ⊕ y) = ρ(x) ⊕ ρ(y)
ρ(x ) = ρ(x)
e(K, x) = e(K,x)The information about DES from the block-cipher lecture should suffice to do this problem.
hK(23) = hK(99) = 43Use the known collision to compute Dlog43(5) mod 47, as well as Dlog5(43) mod 47.
Let G be a cyclic group with n elements and let g be a primitive element. Then an arbitrary element gi is primitive iff gcd(i, n) = 1.Your job is to prove the "gi is primitive ⇐ gcd(i, n) = 1" direction of the theorem. As a hint, here's the proof for the "gi is primitive ⇒ gcd(i, n) = 1" direction:
Suppose gi is primitive. Then consider the setHINT: A proof by contradiction is suggested. I.e., suppose that gcd(i, n) = 1 but that it were NOT the case that gi is primitive. Find an argument that results in g being non-primitive thus contradicting our assumptions.S = { gi, (gi)2, (gi)3, … , (gi)n-1 } = { gi, g2i, g3i … , g(n-1)i}By definition of primitivity, 1 is not contained in S. Furthermore, we claim that all the elements of S are distinct. Otherwise, there would be j < k such that gji = gki, so multiplying both sides by (gji)-1 one obtains g(k-j)i = 1, contradicting the fact that g(k-j)i ∈ S cannot equal 1. By Lagrange's theorem,if a ≡n b, then ga = gbso as the elements of S are all distinct, it must be the case the exponents are all distinct mod n and different from 0. So adding in 0 we get that the set of numbersT = {0, i mod n, (2i) mod n, (3i) mod n, … , (n-1)i mod n }are all distinct in Zn. Since the set has size n conclude that T = Zn. In other words, the function fi on Zn defined by multiplying by i modulo n:fi(m) = (im) mod nis a bijection. We saw that this is only the case if i is invertiblue modulo n which establishes the fact that gcd(i, n) = 1.
Recall that in showing that hardness of the Discrete Log Problem implies collision resistance of the Discrete Log Hash Family we only showed how to solve Dlogx(y) mod p when both x and y are primitive. No method of solution was provided when y was non-primitive as allowed in the general Dlog problem. (For the case p = 2q + 1, with q prime, this implied failure to solve Dlog for about half of all cases). We give some pseudocode to fix this problem for primes of the type p = 2q + 1, with q prime:
INPUT: x : primitive base in range [2,p-2]
y : relatively prime to p in range [1,p-1]
p : a prime of the form 2*q+1 with q prime
OUTPUT: the number n such that x^n mod p = y
EXTERNAL: ISPRIMITIVE(x) : procedure testing if x is a primitive element
FINDPRIMITIVE(p) : procedure returning a random primitive element
uniformly distributed in the primitives mod-p
DLOG_FOR_PRIMITIVE(x,z,p) : discrete-log restricted to primitive z
DLOG( x, y, p ){
if ISPRIMITIVE(y)
return DLOG_FOR_PRIMITIVE(x,y,p)
if y == 1
return 0
if y == p-1
return (p-1)/2
r = FINDPRIMITIVE(p)
log_r = DLOG_FOR_PRIMITIVE(x,r,p)
z = (y * r) mod p
if !ISPRIMITIVE(z)
return "FAIL"
log_z = DLOG_FOR_PRIMITIVE(x,z,p)
return (log_z - log_r) mod (p-1)
}
Suppose the number N has prime factorization N = p1e1 ... pkek. Let S1 ⊆ Zp1, ... , Sk ⊆ Zpk be sets, and let T be the set of all numbers in the range [0, N-1] which satisfy the predicatex mod p1 ∈ S1 AND x mod p2 ∈ S2 AND ... AND x mod pk ∈ SkThen |T| = |S1| p1e1-1 ⋅ |S2| p2e2-1 ⋅ ... ⋅ |Sn| pkek-1 .
0000100100100101100100001011010Alice's private key is ( p, q ) = ( 983, 1019 ). What message did Bob send? You'll need to show work as follows: If you write a program you should print it out, if you do it in matlab you should print out your matlab session, or if you do it by hand include your calculations. HINTS: the answer is the name of a song. Again, I am providing you with a matlab function for modular exponentation. Other useful matlab functions are dec2bin / bin2dec for converting between decimal and binary, and xor.
The cryptosystem (M, K, G, E, D) is NOT key-secure if there is a PPT key-cracking algorithm C with associated plaintexts m1, m2, ... , mL such that when C is given the plaintexts and corresponding ciphertexts, C returns the key k with non-negligible probability. More precisely:Show that if such a cracking algorithm C exists, it can be used to create a multi-message distinguisher A and thus the cryptosystem would not be computationally secure.
- the messages mi depend on the security parameter 1l and the number of messages L is polynomial in l
- runnning time is as a function of l
- non-negligibility is measured in terms of l
- Prob( C( [m1, m2, ... , mL] , [Ek(m1), Ek(m2), ... , Ek(mL)] ) = k ) is non negligible
An a-b encryption oracle OE,ab is a black box that takes as input two equal sized plaintexts ma , mb and outputs either ciphertext Ek(ma) or ciphertext Ek(mb) with a or b fixed for all calls of the oracle during any given session, and the ciphertext being returned chosen at random from the set of all possible ciphertexts. A decryption oracle OD is a black box that takes as input any ciphertext c and outputs the plaintext Dk(c). The cryptosystem (M, K, G, E, D) is secure under adaptive chosen ciphertext attack if there is no PPT message distinguishing algorithm A calling on OE,ab and OD a polynomial of times such that OD is never called on any of the previous outputs of OE,ab, and such that A has non-negligible a-b advantageHINTS: Your argument should still be valid when CS1 is secure under chosen ciphertext attack. The definition of chosen ciphertext attack pre-cludes you from decrypting what you just encrypted, but you are allowed to modify the received ciphertext. You should be able to demonstrate insecurity with just 1 call to OE,ab and 1 call to OD.Pr[A(when OE,ab returns a-messages)=1] - Pr[A(when OE,ab returns b-messages)=1]
CLAIM: Suppose (M, K, G, E, D) is a computationally secure stateful cryptosystem from messages of size l to messages of polynomial size P(l) (and defined on all bitstring keys and messages). Consider the function g defined by g(x) = Ex(0l). Then g is a PRG with expansion P(l) proving that the existence of computationally secure ciphers implies the existence of PRG's.HINT: Try to find a perfectly secure cryptostystem where the resulting bitstrings don't look random at all.
gk ( x || y ) = fk ( x ) || fk ( x ⊕ y )where x, y ∈ {0,1}n. Show that g is not a secure pseudo random permutation family.
g • f : A → Cis a one way function. Use this idea to construct a one-way permutation family from the discrete log one-way family. Recall that for valid index (p, g) the discrete log function has formula f(p, g)(x) = gx mod p, with domain Zp-1 and codomain Zp*. NOTE: You should assume that p is prime and g is primitive in Zp*.
message1 = 3, message2 = 4, message3 = 5For each signable message, give the corresponsing signature.
Signature scheme (M, K, G, S, V) is considered to be secure if the existence of a successful PPT selective forger using a known public key attack would imply the existence of PPT algorithm for factoring products of equal-sized primes. (see digital signatures lecture, slide 6)Show that the naïve Rabin digital signature scheme is secure under this weaker than usual security definition. Note: Assume the forger knows somehow which messages are valid. (This isn't a major issue since 25% of all messages are valid).
INPUT: n, y
EXTERNAL: black box for V*
OUTPUT: a transcript (s, b, t)
while( true ){
b' = random guess from {0, 1}
r = random guess from [0, n-1] relatively prime to n
s = r^2 / y^(b') mod n
call V* for second round and let b be V*'s returned bit
if (b == b') return (s,b,r)
}
Show the algorithm is a Las-Vegas algorithm and that if the while
loop is allowed to run k times, the probability of failure
(not returning any value) is 1/2k . Show that
for both Simon's S-V* simulations, as well as Villain's
P-V* sessions, transcripts are of the form
( r2 / yb mod n, b, r )Furthermore, show that the probabilities of obtaining any particular transcript are within a factor of (1 - 1/2k) from each other, so negligibly different. This would show that the protocol is zero knowledge since V* would not be able to learn more information talking to P than S would without talking to P.