Theorem \[thm:lbNoDisc\]
---------------------------------

The coding theorem involves constructing a common sequence $\rvu^n$ at the legitimate terminals and using it to generate a secret key.

![Codebook for the secret key agreement problem. A total of $\approx 2^{nI(\rvu;\rvyr)}$ codewords are generated i.i.d. $p_\rvu(\cdot)$ and partitions into $2^{nR}$ bins so that thare are $2^{nI(\rvu;\rvye)}$ sequences in each bin. Given $\rvs^n$, a jointly typical sequence $\rvu^n$ is selected and its bin index constitutes the secret key. ](codes2)

### Codebook Generation

Assume that the input distribution is such that $I(\rvu;\rvyr) > I(\rvu;\rvs)$ as required in Theorem \[thm:lbNoDisc\]. Let $\eps_n$ be a sequence of non-negative numbers that goes to zero such that $2\eps_n < I(\rvu;\rvyr) - I(\rvu;\rvs)$.

-   Generate a total of $T= 2^{n(I(\rvu;\rvyr) -
    2\eps_n)}$ sequences. Each sequence is sampled i.i.d. from a distribution $p_\rvu(\cdot)$. Label them $\rvu_1^n,\ldots, \rvu_T^n$.

-   Select a rate $R = I(\rvu;\rvyr)- I(\rvu;\rvye)-\eps_n$ and randomly partition the set sequences in the previous step into $2^{nR}$ bins so that there are $2^{n(I(\rvu;\rvye)-\eps_n)}$ sequences in each bin.

### Encoding

-   Given a state sequence $\rvs^n$ the encoder selects a sequence $\rvu^n$ randomly from the list of all possible sequences that are jointly typical with $\rvs^n$. Let the index of this sequence be $L$.

