\documentclass[12pt,ifthen]{article} \usepackage{url} \newcommand{\lf}{\left\lfloor} \newcommand{\rf}{\right\rfloor} \newcommand{\lc}{\left\lceil} \newcommand{\rc}{\right\rceil} \newcommand{\Ceil}[1]{\left\lceil {#1}\right\rceil} \newcommand{\ceil}[1]{\left\lceil {#1}\right\rceil} \newcommand{\floor}[1]{\left\lfloor{#1}\right\rfloor} \newcommand{\abit }{\hat{a}} \newcommand{\bbit }{\hat{b}} \newcommand{\bits}[1]{\{0,1\}^{{#1}}} \newcommand{\nth}{n^{th}} \newif{\ifshowsoln} %\showsolntrue \newcommand{\und}{\_\_\_\_\_\_\_\_\_} \newcommand{\Z}{\mathbb{Z}} \usepackage{amsmath} \usepackage{amssymb} % for \nmid \begin{document} \centerline{\textbf{HW 9 CMSC 456. DUE Nov 19}} \ifshowsoln \centerline{\textbf{SOLUTIONS}} \fi {\textbf{NOTE- THE HW IS THREE PAGES LONG}} \begin{enumerate} \item (0 points) READ the syllabus- Content and Policy. What is your name? Write it clearly. What is the day of the final? READ the slides and notes on Secret Sharing. \item (30 points) Assume there is an $\alpha$-SES. From class we know we can, with a hardness assumption, use the $\alpha$-SES to get a $(t,L)$ secret sharing scheme with shares of size $\frac{n}{t} + \alpha n$. \begin{enumerate} \item[1)] (10 points) Use the $\alpha$-SES to get a $(t,L)$ secret sharing scheme with even SHORTER shares (though see next part). (NOTE -- whatever you do to make it shorter, just do once. In a later part of this question you'll get to do it again!) \item[2)] (5 points) Your answer to the above question might not quite yield shorter shares. You need a condition on $t,\alpha$. What is that condition? \item[3)] (10 points) Do a protocol that makes the shares even shorter! (See next part) \item[4)] (5 points) Your answer to the above question might not quite yield shorter shares. You need a condition on $t,\alpha$. What is that condition? \end{enumerate} \centerline{\bf GOTO NEXT PAGE} \newpage \item (40 points) For this problem you can assume that, for any $t,L$, there is a protocol for $(t,L)$ secret sharing where everyone gets one share of size the size of the secret (or roughly). For the problems below explain it so that someone who has never seen secret sharing can understand it, though she knows that for all $t,L$ there is a $(t,L)$ secret sharing scheme where blah blah. (This is not hypothetical. I am having this one graded by someone outside the course grading this one.) Zelda has a secret $s\in\bits n$. She wants to share a secret with $A_1,\ldots,A_{L_1}$, $B_1,\ldots,B_{L_2}$. such that the following happens: \begin{enumerate} \item If $\ge k_1$ of $A_1,\ldots, A_{L_1}$ meet with $\ge k_2$ of $B_1,\ldots,B_{L_2}$ then they can learn the secret \item No other set of people can learn the secret. \item Everyone gets a string of length roughly $n$ (the roughly since we are over $\Z_p$ and not the field on $2^n$ elements.) \end{enumerate} \centerline{\bf GOTO NEXT PAGE} \newpage \item (30 points) In this problem you will investigate the low quality and predictability of the Java random number generator. In order for this problem to work, your code must instantiate a single instance of ``java.util.Random" and call the ``nextInt()" method to generate random numbers. \begin{enumerate} \item Write a function ``genList(int N)" which creates an array of N random integers \item Write a function ``countEvenSubseq(int[] list , int n)" which will return the number of contiguous subsequences of even numbers. To put it another way, this is the number indicies $i$ so that list[$i$] $...$ list[$i+n-1$] are all even. For example, \begin{enumerate} \item countEvenSubseq(\{0,4,2,3\}, 2) = 2 \item countEvenSubseq(\{0,4,2,2,10,8\}, 4) = 3 \item countEvenSubseq(\{0,4,2,9,10,8\}, 4) = 0 \end{enumerate} \item If the java random number generator were truly random, then what on average would you expect $countEvenSubseq(genList(N), n)$ to be? (Hint: there are $N-n+1$ indices which could be the start of a contiguous subsequence. What is the chance that each one is all even? Now multiply those two numbers together.) \item Write a program which outputs $countEvenSubseq(genList(N), n)$ for N=3145728, n=14. Try running it a few more times. How do the results differ from what you would have expected from part (c)? \item (Not worth any points, just for your own information) see \url{https://www.javamex.com/tutorials/random_numbers/java_util_random_algorithm.shtml} to learn more about how the Java random number generator actually works. Can you figure out why part (d) worked the way it did? Hint: what are the factors of N? \end{enumerate} \end{enumerate} \end{document}