Penguinis Weirdus said:
medv4380 said:
As much as OTP are supposed to be un-crack-able. The Key is almost certainly 5 values of 1 - 26 for each block at worst. That's only 12 Million combinations for each block. It work take my computer no time at all to run all 12 million combinations. Only a few of them could have any meaning. Toss the ones that are actually English words into a table and any human being would be able to pick out the most likely or even obvious words. I know what I'm coding tonight.
Except those codes are unique, and on top of that, your looking possible at more than one level of ciphering. Brute forcing passwords (in a computing sense) essentially relies on someone encrypting the random string you've sent and hopefully you'll create the correct hash.
One Time Pads aren't hashes, and the way they were implemented in WWII is a bit funny and makes it so you have a probable method for attack.
In modern code I'd just take 256 random bytes add them to a 256 block I wanted to encrypt. The result is the encrypted output, and since I'm just using whole bytes I don't need to do a mod 256 function. In this case you can make any random pad have any output you want. This is the core of why One Time Pads are, when done right, unbreakable.
However, that's not exactly what they did in WWII. They took a 5 digit number like 54048. Turned the letter they want to encrypt to a number of 1-26. So HELLO Coded to 54048 would be HJPLS. The catch is they only used the values 0-9 to apply the padding and then did something similar to Mod 26 to make the number between 1-26. Then Converted them back to letters. The 0-9 makes it so that you can narrow each character down to 10 possible. Done properly, to prevent any chance of decoding, you'd have to have used 0-25. If you assume HJPLS is a 5 letter English word then it can only be one of 38 words out of about 2000, using a modern dictionary.
HIKER HELLO HANDS GAMIN GAMES FINIS FILER FEIGN FALLS FAKIR FAKER EDGER EAGER DINGO DINER DENIM DEIGN CHOIR CHOCK CHILL CHICK CELLO CAPER CANER CAMEO CAMEL BINGO BIKER BENDS BEGIN BANJO BANGS BALLS BALER BAKER BAGEL AEGIS YIKES
The Intelligence agency would have a leg up on someone like me doing it since they should have a good dictionary of actual words they used during that period. If my dictionary is incomplete I won't decode those missing words. They might also be aware of random number distribution errors in their pads that would help reduce possibilities further.
From there they have physical placement based on where they were found in the code. You take all the words that you find and then put them together in every possible sentence that their placement allows for. Only certain combinations would form anything resembling valid English.
One possibility is that it is a One Time Pad with a Transposition Cipher. I wouldn't be able to brute force my way though the Transposition Cipher, but Intelligence Agencies would. All that would need to change in my method is to apply each possible transposition cipher. Which they should have. It would generate a list for each one, but as long as you know the possible transposition ciphers it is still a limited number of possibilities, and not an unlimited number of possibilities, it would work.
Keep in mind that this kind of coding and decoding needed to be done quickly and easily by hand, and a one time pad is only perfect if the rules are followed perfectly.
I suspect the British code breaker looked at it. Saw it was a one time pad, and went looking for the code book. If you believe that what you're looking at is unbreakable without the code book, then it is unbreakable.