illuminating science

26/2/2007

Problem solving in all its forms

Filed under: — Joel @ 11:08 am

Physicists are pretty good at problem solving. During a course of physics you are trained on as much on how to approach problems as you are on how to do physics. We’re (theoretically) very good at taking a complex problem, breaking it down into smaller pieces and then finding manageable ways forward. It’s one of the main reasons why physicists are always in high demand by banks, consulting firms and engineering companies - not to do physics, but to help solve problems.

But lately, I’ve been thinking that some of the best problem solvers in the world are criminals. Everybody loves the idea of criminals outsmarting some sinister oppressive force, right? Think of movies the Thomas Crown Affair or Ocean’s 11 (awesome movie). We love to read about successful bank heists or whatever (even thought we know that they’re bad guys!)

Well, the iconic modern day criminal problem solvers have got to be the various guys working at cracking copy protection on CDs, DVDs and so on. Yes, I know piracy is bad. But when I buy a DVD in Australia and can’t play it the US, or visa versa, when I can’t play music I’ve bought of iTunes (which I don’t) on my portable player…it really bugs me. Let’s face it, if you’ve legally bought your media, you’re already doing the right thing. If you’re going to pirate, you’ll succeed no matter what.

Anyway, politics aside, the story is just too darn cool to ignore. The latest generation of DVDs are known as HD-DVDs. They’re encrypted, so you can’t just pull the movie off and use it. Only programs or players that are responsible enough to protect the decrypted movie are given the decryption key (e.g., your Sony DVD player, or Windows Media Player, etc). The catch is, this sort of system is never secure - encryption normally works because the person you want to keep your data safe from (in this case, you) is different from the person who wants to decrypt it (in this case, also you). I encode my message, send it to someone to has the decryption key. If anyone picks it up along the way, they don’t have the key to decode.

In the case of movies, we must use “security through obscurity” - the players have to hide the decryption key by not keeping it in memory long, using roundabout coding, etc. The game, then, is for the intelligent hacker to find it! (Note that I mean hacker in the sense of brilliant coder, rather than illegal tresspasser.)

That’s what the members of the Doom9 forum have been doing. This is definitely illegal (violating a copy protection scheme) but it’s also really inspiring reading about the ingenious ways they’ve proceeded. They’re working on the AACS, the encryption for the new HD-DVDs. It’s a frightfully complicated set up - each player has a Device Key, which is used to obtain a Media Key, which is combined with a unique Volume ID for each disk. This is in turn used to decrypt the Title Key which is used to decode the movie. From Freedom to Tinker:

To explain what’s at stake, we need to describe a few more details about the way AACS manages keys. Recall that AACS player applications and devices are assigned secret device keys. Devices can use these keys to calculate a much larger set of keys called processing keys. Each AACS movie is encrypted with a unique title key, and several copies of the title key, encrypted with different processing keys, are stored on the disc. To play a disc, a device figures out which of the encrypted title keys it has the ability to decrypt. Then it uses its device keys to compute the necessary processing key, uses the processing key to decrypt the title key, and uses the title key to extract the content.

These three kinds of keys have different security properties that make them more or less valuable to attackers. Device keys are the most useful. If you know the device keys for a player, you can decrypt any disc that the player can. Title keys are the least useful, because each title key works only for a single movie. (Attacks on any of these keys will be limited by disc producers’ ability to blacklist compromised players. If they can determine which device has been compromised, they can change future discs so that the broken player, or its leaked device keys, won’t be able to decrypt them.)

I still can’t quite get a grasp on it all, but there’s a few resources to have a look at if you’re interested in knowing more: Freedom to Tinker has a summary which covers some basics and looks at some interesting economical impacts. And there’s a pretty good thread by hacker arzenami outlining the whole process, including a really fascinating description about how certain players can have their ability to decode disks “revoked”.

But best of all are the stories from the hackers on how they managed all this. Arzenami definitely has the best story about finding the processing key which combined with a good guess of the unique Volume ID (a good story too!) will allow you to decode the disk. It’s pretty amazing the techniques used, and the determination and time that he put into it. His summary of AACS again shows he’s a brilliant software engineer, and someone who should be given a job with Google! Then most recently, the Device Key for a particular program has been found. This allows a more general method of decoding disks, if protection is improved in the future, but at the moment knowing the Processing Key is enough.

Again, this is all illegal - but it’s pretty amazing, nevertheless.

22/2/2007

Mathemagical card tricks

Filed under: — Joel @ 3:23 pm

As I’ve mentioned several times, in addition to physics I also dabble in magic. (When I first wrote that sentence I had them swapped around! Hmm!) I imagine everyone’s done the good old “three piles of seven” trick? Just in case you haven’t:

  • Take 21 cards from a deck
  • Deal them face up into three rows of 7
  • Ask someone to pick a card, and tell you which pile it’s in. Then pick up the piles, turning them face down, and putting the selected pile in the middle
  • Deal them into 3 piles again (alternating piles), and get them to tell you which pile it’s in. Pick up in the same way and redeal.
  • When they select their pile this time, the middle card is their card! Either remember it and reveal it appropriately, or pick up the piles in the same way, and the 11th card from either end is their card.

Well, I just watched a video on YouTube with what has got to be the most convoluted card trick ever. Seriously. Assuming it really does work, it would be fun to follow the maths through and explain why! (I haven’t yet, and my head still hurts from following the video through, so someone should feel free to jump in!)

I must confess that although as a kid I liked the mathematical magic tricks, it was more because I enjoyed following the maths through! As a general rule, any time the magician starts doing a vaguely convoluted procedure of counting, knocking out cards and counting again, or anything like that - think maths. I saw a trick the other day which screamed maths to me, and a little time with pencil and paper meant I could reproduce the trick. Sure I needed to know how to do a little bit of set up first, but any half intelligent audience member could follow it through and get to a reasonable approximation. (Maybe his audiences aren’t usually that intelligent - or just tipsy!)

20/2/2007

A lightbulb moment

Filed under: — Joel @ 3:04 pm

A quite exciting move towards energy conservation in Australia today - the government has announced plans to phase out normal, incandescent lightbulbs, and instead require everyone to use fluorescent, energy saving bulbs. These are the white, twisted tube bulbs that have the same type of socket as a normal bulb, but work on the same principals as a fluoro tube.

These bulbs use up to 80% less energy than conventional light bulbs, and since light bulbs contribute about 12% of the energy use in homes, this will have a real impact on the amount of energy we use as a country. It’s not earth shaking (we’re saving 80% of 12% of energy used in homes - but what fraction is home energy out of all used over the entire country?) but it’s a positive step which if nothing else makes a statement. Good move!

Powered by WordPress