In OTP, one party generates a uniform randomly key, writes it in a roll of paper, or a book, or CD, or USB. They transmit it in person with reliable people to the other side.

The OTP keystream obviously is a long stream to long-time use, i.e. one can encrypt many messages over time without using any bits again. 

- **OTP with length hiding**; 

[Wikipadia defn][1];
> One-time pads are "information-theoretically secure" in that the ciphertext provides no information about the original message to a cryptanalyst (**except the maximum possible length of the message**).


Let both parties agree on a maximum length of the messages in advance, say $t$.

Let the keystream is represented by $k_i$ and the first message is encrypted be $m$ with length $\ell$. Then the encryption is performed with the first $\ell$ part of the message. The remaining part is padded, here `10..0` padding is used since it is easy to apply even by hand.

\begin{align}
 c_i &= k_i \oplus m_i , \quad\text{for } 0\leq i < \ell\\
 c_{\ell} &= k_1 \oplus 1\\
 c_i &= k_i , \quad\quad\quad\;\; \text{for } \ell < i < t\\
\end{align}



> One time pad - how is the difference in length between the plain text & the OTP handled?

Two cases we have;

1. The OTP keystream is shorter: in this case, one should not send reusing the keystream. Otherwise, two(or many)-time pad use occurs, and that OTP is no longer informationally secure and can be broken.

   - [How does one attack a two-time pad (i.e. one-time pad with key reuse)?][2] 

   - [Taking advantage of one-time pad key reuse?][3]

2. The OTP keystream is longer: The `10..` padding as above.


  [1]: https://en.wikipedia.org/wiki/One-time_pad#Perfect_secrecy
  [2]: https://crypto.stackexchange.com/q/2249/18298
  [3]: https://crypto.stackexchange.com/q/59/18298