If my understanding is correct, clients assume the currently longest chain is authoritative. The chain with most peers working on it gets longer quicker, and therefore anyone on any other chain "switches" to the longest. This is a clever way to ensure no "forks" exist for long.

Difficulty is calculated based on how many blocks have been calculated in the past week/2 weeks, to keep a global target of around 1 block every 10 mins.

If I were to start a new isolated firewalled bitcoin network, working from the same base block as the existing network, with only a single slow host working on it, the chain would still get longer by 1 block every 10 minutes, since the difficulty would adjust after 2 weeks to ensure this.

If I now tweak the system clock to go at double-speed, the difficulty will re-adjust to make generation yet easier, and a block will be generated every 5 minutes. I now have the possibility for my chain to catch up and overtake the official one. When this happens, I unfirewall my host, upload all my blocks to the network, and all the clients see my chain as longer, and therefore authorative.

How does the network protect against this? Is the "chain length" actually a function of both difficulty and length in blocks?

If I were to start a new isolated firewalled bitcoin network, working from the same base block as the existing network, with only a single slow host working on it, the chain would still get longer by 1 block every 10 minutes, since the difficulty would adjust after 2 weeks to ensure this.

Also difficulty changes only every 2016 blocks - not every 2 weeks. It is expected that hash rates grow/decrease within limits (= not moving from a few Terahashes/s to a few Megahashes/s in your example). also the new difficulty takes into consideration the average time it took to calculate the past 2016 blocks. For the difficulty to go down by 50%, the last 2016 blocks would need to be solved within 4 weeks, instead of 2.

The Bitcoin blockchain is essentially a global clock, where it is ensured more or less that it's hard enough for members to trigger a "tick" at the same time - and if they do, the network will solve it on it's own.

To be able to build a longer Blockchain than the official one, you need more hashing power than the rest of the network. This is also known as the "51% attack" and which is why people are currently worried that deepbit might become (again) big enough to do this in theory. In practice, deepbit will most likely NOT pull off a stunt like that, but it still poses some dangers and insecurities.

https://www.coinlend.org <-- automated lending at various exchanges. No fees(!).Mail me at Bitmessage: BM-BbiHiVv5qh858ULsyRDtpRrG9WjXN3xf