62 points · by oedmarap · 5y ago · 22 comments
Here's a toy one-time pad implementation I did (years ago) in C++. I just recently implemented it in Go too. These are pretty simple to write, but I wonder if I've made mistakes.
code: https://github.com/62726164/padder
blog: https://www.go350.com/posts/padder-a-one-time-pad-implementa...
That’s one advantage that a military crypto system has over a civilian one in that they already have well established physical identity and authentication. They can take advantage of that to deliver the one time pad. For example, before a ship goes on deployment, it can be loaded up with the one time pad. Similarly for a division being deployed.
One time pads are useful for espionage, and you can see examples of how they are used here[1]. They took advantage of how most espionage worked (and who knows, may still work!): different channels for sending and receiving. The numbers station read you a short message, and if you needed to send a message back you signaled your handler to meet in person at a prearranged place.
The same thing that makes OTPs suck on ships make them excellent for sending short messages to spies. You can't hide an Enigma in a walnut, after all!
I wish the NSA would declassify more records of what it managed to break in the pre-digital era, now that the methods are out of date and the people involved are mostly dead. It would be great for historians to see both what the agency was capable of in that period, and how its methods, together with its successes and failures, shaped history in the early Cold War.