How were one-time pads and keys historically generated? In the 20th century, it was common for various intelligence agencies and military organizations to use ciphering machines and one-time pads.

However, no source I've seen ever mentions the process of generating the keys and printouts for such use.


Were there special machines for printing / punching them onto a card?
Where did the entropy they used come from?
Were there any significant breaches due to the bad randomness of the keys used?
Your interesting questions deserve to be answered more thoroughly, but here goes:

According to a highly classified document written in 1947 and finally declassified in 2013, the Germans started using a one-time pad system for diplomatic traffic in 1925. This system (GEE) used a one-time pad of digits to encrypt codes by modulo addition. To be clear, these codes, from a large codebook, stood for names, numbers, grammatical features of German, dates, places, objects, etc. GEE traffic was first intercepted in 1934.  That was good for the Allies because World War II in Europe was around the corner, and keys for the GEE system were being generated by a complex mechanical device that was not cryptographically secure.

The German additive generator of wheels and switches had weaknesses that were brilliantly exploited by American analysts:  the phases, cycles, potential overlaps, and limits of the keys became apparent after an exhaustive analysis of captured GEE one-time pads. By March 1, 1945, the U.S. was breaking GEE traffic because the German machine did not create truly random numbers--the Americans soon made a mirror machine based on key periodicity, other weaknesses, etc.
The released document (PDF) says that the GEE keys

…could be predicted in full upon partial recovery through cribs and superimposition to give a new kind of overlap.

Breaking GEE allowed the U.S. access into German diplomatic traffic at the end of the war, especially their dealings with Japan. (See the intriguing reference to uranium in one pre-August 6, 1945 transmission.)
Interestingly, the document says that the Germans could have easily defeated cryptanalysis by changing the set-up of the 240 wheels in the machine, but they never did!  The Germans produced enormous amounts of key material without altering the basic set-up of the device. This led to &quot;ample homogeneous material&quot; being created.

During the Cold War, the Soviets were known to generate one-time pads by having rooms full of typists peck away &quot;randomly.&quot;  That's not genuinely random, but still formidable because such results are--as another writer said--from different people and can be muddled further.  For those who disparage one-time pads, consider this:  the NSA refers to the day when the Soviets started using one-time pads in &quot;...all high-level Soviet communications, including the mainline military, air force, and navy nets&quot; for radio traffic--October 29, 1948--as Black Friday, which immediately &quot;...ravaged the cryptologic landscape...&quot;.  (See page 19 of The National Cryptologic School's &quot;On Watch&quot;, 9-86) Nevertheless, there are instances in which critical key weaknesses helped cryptanalysts exploit key misuse during the Cold War.

Early U.S. efforts to generate random numbers and marry those to plaintext (Telektypton, 1933) depended on a typist and keyboard, a natural but faulty way to think about the problem.  Importantly, the Telekrypton had other weaknesses, such as a looped keystream.  What is so interesting about Telekrypton is that it was widely used, highly regarded, and deeply flawed. After World War II, the idea of using noise for entropy in key generation was made and used by British Intelligence. The man who figured this out retired from GCHQ in the 1980's.  The generator based on his ideas has been regarded as the first to generate truly random keys.