Codes and ciphers question

What is the most difficult code or cipher to decode or decipher? How far has the world come regarding post “Enigma” coding and ciphering?

There’s a method of cryptology called a one-time pad which is theoretically secure: no matter how many hours of computer time you’re willing to throw at it, you can never be certain that you’ve cracked it.

However, a one-time pad is also ridiculously hard to implement. In practice, AES is probably the best you’ll run into (but don’t hold me to that).

The most difficult to decipher is the “one-time pad” method, which is actually very simple to describe: you generate a very large number of completely random numbers (truly random, not pseudo-random - paranoid types use things like radioactive decay emissions to generate their data), then use them to encrypt your data via simple shift or XOR algorithms. In theory, if properly done, it will be absolutely impossible to decrypt the message without the key, since every possible decryption has a statistically equal chance of being valid. The catch is that doing it properly is damn near impossible. In particular:

  1. It really, really has to be random data. If it isn’t, then with enough examples of encrypted text, an attacker could identify statistical flaws in your encryption data that would greatly reduce the number of possible decryptions , which could lead to a possible break.

  2. Your key must be exactly as long as your message. If you use a shorter key, repeating, there are statistical methods that can quickly reveal the length of the key, at which point it’s possible to make inferences that can lead to a break of the code.

  3. You can only ever use a given key once, for a single message. If you ever reuse a given key, it’s possible to combine the two messages in such a way that both can be recovered. This can be done without knowing anything about either message or wither key.

Because of points 1-3, it’s necessary to generate a lot of high-quality random data before you can carry out true one-time pad encryption. Furthermore, if your data is not random, the encryption is not actually very secure. However, there’s another reason why one-time pads are not generally used. This is the so-called “cart before the horse” problem: you need a secure channel in which to transmit your one-time pads, and in practice that usually means using encrypted communications. Unfortunately, you can’t even get off the ground using one-time pads for this, since you’ll never be able to transmit more data than you’ll use up in sending the data. Instead, you have to use some other method of encryption that’s very strong, but not as strong as one-time pads (it can be shown that no other method is as strong). Since that means that your message security now depends on the security of that encryption, it’s much less of a hassle to deploy a simpler, but highly secure, encryption method instead. One therefore rarely sees one-time pad encryption deployed when some other method will do.

A properly-used one-time pad is unbreakable.

The problem is that with paper one-time pads you need mountains of the things to run a communication system. If pads are reused they can be broken (ala VERONA).

With computers, we can make a huge number of one-time pads and store them in almost no space.

The Enigma system is long-past its prime. (Somewhere) on the net is an Enigma simulator that can have dozens of discs, some spinning backwards, othr spinning for every n-th letter, others that self-destruct. It is very tough, but still breakable.

The big New Thing in coding is the use of Public Key encyption. With it you can send a message to me using my “Public Key,” a huge prime number split in half. Even you cannot break the message you just sent. Only I can, by using my secret Private Key.

Pretty neat.

All in all, the increses in computer power and the generation of an unlimited number of prime numbers means that civilians now have codes for commercial usage that are very tough indeed. Governments may have the resources to break something like PGP, but otherwise it is secure.

Meanwhile government code systems (if properly used) are (or should be) unbreakable.

Of course we must admit that there is a lot we just know about the latest developments in this business.

Encryption is basically the use of trapdoor functions, operations that are easy to carry in one direction (encrypt), but difficult to carry in an opposite direction (decrypt), unless you are in possession of a secret extra “key”.

So, in encryption, we see the use of trapdoor functions such as the factoring of large numbers (it’s easy to multiply two huge primes, but very difficult to factor out the result) and so on.

Absolutlely, it was decades after the Enigma code had been cracked that any information was released, IIRC full declassification happened in the 1990s(?).

Information is power, governments know this. According to Simon Singh’s The Code Book, after WWII the British Government “donated” Enigma machines to its colonial allies, telling them of this “unbreakable” code. Sneaky British Gov’t.