4 ms·
Sometimes a remnant of the magic remains in the math, though, even after you understand why the math must work. The Burrows-Wheeler transform used in bzip2 is a
by mistercow 2y ago
Sometimes a remnant of the magic remains in the math, though, even after you understand why the math must work. The Burrows-Wheeler transform used in bzip2 is an example of this for me. I get why it works, but it just feels too damned convenient, almost as if this is one of the universe’s APIs, and you don’t get to look into the source code of this one to find out why such a simple maneuver is so effective on exactly the sort of data we like to compress.
- criddell 2y agoI've always thought the Diffie-Hellman key exchange is pretty neat.
- mistercow 2y agoMy own mental picture of that makes it just feel very clever, rather than magical. If you imagine that addition is easy, but division is hard, it’s pretty easy to see how you can build fast integer multiplication out of addition, and create hard to reverse operations like key exchange. Now replace “addition” with modular multiplication, and “division” with the logarithm, and you have the trick behind DH. Swap out addition for this weird operation that involves jumping around elliptic curves, and you have the trick behind ECDH (admittedly, the fact that that jumping around thing works as a group operation is still pretty magical). What I like about this way of thinking about it is that you can fully implement the key exchange in terms of integer addition, and the fact that it lets you pass around secrets in a world without “division oracles” seems pretty mundane.