Friday, June 26, 2009

[ubpkxwzb] Homegrown cipher

Contrary to popular belief, it's actually not hard to design your own unbreakable (practically unbreakable) cipher. The catch is, what's hard is to design a cipher that is fast and compact and unbreakable. And "idiot-proof" (no weak keys).

But sometimes compactness is not a desirable feature in a cipher, for example the hard-to-steal cipher. In that case an amateur-designed cipher with thousands or millions of rounds, with a huge block size, alternating huge S boxes and huge P boxes will probably do. Consider a substitution-permutation network with block size 65536 bits, with 16-by-16 bit S-boxes, so 4096 different S-boxes per round, and different S-boxes between rounds. The substitutions alternate with permutations of the 65536 bits in the block, a different permutation for each round. 2^29+2^17 bytes per round. Repeat for 200000 rounds. The key is simply the 100 terabytes of S and P boxes so it is up to the user to choose them. Initializing them from a truly random source is usually sufficient unless you are fantastically unlucky.

No comments :