(KL Ex 8.10, 15 points) Prove that for every \(x\in \{0,\ldots, m-1\}\) (even if \(x\) is not in \({\mathbb{Z}}^*_m\)) if \(ed = 1 \pmod{|{\mathbb{Z}}^*_m|}\) then \((x^e)^d = x \pmod{m}\).
(One time signatures, 25 points) As I mentioned it is in fact possible to get digital signatures based on only private key cryptography. In this exercise we will show a baby version of this. We say that a signature scheme \((G,S,V)\) is a one time signature scheme if it satisfies the security definition of digital signatures (with a public verification key) with the restriction that the adversary is only allowed to make a single query \(m\) to the signing oracle, and needs to output a signature on a messahe \(m' \neq m\). Let \(PRG:{\{0,1\}}^n\rightarrow{\{0,1\}}^{2n}\) be a pseudorandom generator. Prove that the following scheme is a secure one-time signature scheme for messages of length \(\ell\):
Key generation: Pick \(2\ell\) independent random strings in \({\{0,1\}}^n\) which we’ll denote by \(x^0_1,\ldots,x^0_\ell,x^1_1,\ldots,x^1_\ell\). The secret signing key is the tuple \(( x^b_i )_{b\in{\{0,1\}},i\in[\ell]}\) while the public verification key is the tuple \(( y^b_i )_{b\in{\{0,1\}},i\in[\ell]}\) where \(y^b_i = PRG(x_i^b)\)
Signing: To sign a message \(m\in {\{0,1\}}^\ell\), output the \(\ell\)-tuple \((x^{m_1}_1,\ldots,x^{m_\ell}_\ell)\).
Verification: To verify a message \(m\) w.r.t. signature \((x'_1,\ldots,x'_\ell)\) and public key \(( y^b_i )_{b\in{\{0,1\}},i\in[\ell]}\), check that \(PRG(x'_i)=y^{m_i}_i\) for all \(i\in[\ell]\).
(25 points) Prove that under the LWE assumption, the following variant of our lattice based encryption scheme is secure: (you can use the assumption of security of the scheme presented in class if it helps.)
Parameters: Let \(\delta(n)=1/n^4\) and let \(q=poly(n)\) be a prime such that LWE holds w.r.t. \(q,\delta\). We let \(m = n^2\log q\). (Same as before)
Key generation: Pick \(x\in{\mathbb{Z}}_q^n\). The private key is \(x\) and the public key is \((A,y)\) with \(y=Ax+e\) with \(e\) a \(\delta\)-noise vector and \(A\) a random \(m\times n\) matrix. (Same as before)
Encrypt: To encrypt \(b\in{\{0,1\}}\) given the key \((A,y)\), pick \(w\in{\{0,1\}}^m\) and output \(2w^\top A, 2{\langle w,y \rangle}+b\) (all modulo \(q\) of course). The difference is that instead of adding either \(0\) or \(q/2\), we add either \(0\) or \(1\), but multiply this by \(2\) so the result would be even or odd as needed.
Decrypt: To decrypt \((a,\sigma)\), output \(0\) iff \(|{\langle a,x \rangle}-\sigma|\) is even. (Instead of asking this to be smaller than \(q/10\).)
You need to design a reduction that takes \(h=g^a\) and returns \(a\) using “in its belly” an adversary for the signature scheme. You can use \(h\) as the public key. The scheme ensures that to produce a valid signature the adversary will first need to ask \(F\) on the query \(f\), and then ask \(H\) on the query \(m,F(f)\). The idea is that once an adversary makes a query \(f\) to the oracle \(F\), then they have “committed” to the value \(b\) such that \(g^b=f\) even if they didn’t disclose it. Now, if they are able to successfully sign the message \(m\) with decent probability over the output of \(H(m,c)\) then we’ll be able to find two different responses \(d \neq d'\) for which they can sign successfully. This will yield two linearly independent equations on the two unknowns \(b\) and \(a\).↩