Thursday, November 20, 2008

XXTEA

It's fun to see this, because TEA ("tiny encryption algorithm") was one of the first and easiest ciphers I ever learned to code. I even memorized it! It's been through the mill a few times (apparently it was used — and immediately broken — in Microsoft's original XBox console), so XXTEA ("extended extended TEA") is the current version. The advantage is extreme small size in ROM. Rijndael (AES) is still preferable in most applications — it's well vetted and open source. Simple netdiving can turn up hours of similar fun, especially if you Google Schneier, Threefish, skein and RadioGatún, but life is full to the brim with other hours...

For instance, I always forget how to tune a baritone ukulele even though it's the same as a guitar, so I use a mnemonic: Do Girls Believe Everything ...? The "or nothing" part goes without saying.

Labels:

Sunday, December 09, 2007

Random thuds on cracking public key encryption

Lemme see now...

Let T be a plaintext which Alice must convey to Bob.

Let ¤ represent exclusive-or, or some similar operation which is reversible when twice applied (or at least symmetric, like TEA, where encode and decode work jes' fine.)

Let P be Alice's public key, and p be her private key.

Let PM¤p, where M is mysterious.

Let Q be Bob's public key, and q his private key.

Let QM¤q, where M is still mysterious.

Alice cleverly enciphers CT¤Q¤p.

Alice pops C into an envelope and sends it to Bob, awaiting anxiously.

Bob deduces Alice's private key, p ← (M¤p)¤(M¤qqP¤Q¤q.

Bob deciphers TC¤Q¤p.

Aaarrrgh!

Ok. This probably ain't how public key encryption works, but if it reduces to this case, kiddies, the jig is up!


M is not my favorite pseudorandom number generator, Mersenne Twister. M is mysterious! Like this.

Labels: