Vincent Gable’s Blog

October 24, 2009

Ignorance is Moral Strength

Filed under: Design,Quotes,Security | , , , , ,
― Vincent Gable on October 24, 2009

I have long been impressed with the casino industry’s ability to, in the case of blackjack, convince the gambling public that using strategy equals cheating.

Bruce Schneier

August 28, 2009

Fair Coin Tosses

Filed under: Security,Tips | , , ,
― Vincent Gable on August 28, 2009

Flipping a coin is, ever so slightly, unfair. As this article (via) points out, there is a bias for a coin to land on the same side it started on.

Fortunately, all the biases coins have are systemic biases — they effect all similar coins the same way.

So, with a fair thrower, it’s possible to flip twice, and have the bias of the two throws cancel each other out.

Procedure

  1. Put a coin heads-up, and flip it, as you normally would.
  2. Note the result, if certified this will be the decision.
  3. Flip the coin again, exactly as you did in step 1.
  4. If the coin lands on the opposite side as it did in step 2, the result from step 2 is certified. Otherwise, restart from step 1.

For maximum fairness and reproducibility, it’s best to let the coin land on the floor.

Why This Works

To simplify discussion, let’s call the sides of the coin unlikely (U) and likely (L) instead of heads & tails.

There are only 4 possible results to a pair of coin tosses: UU, UL, LU, LL. Obviously LL is most likely, and UU is least likely, so we rethrow if we get either (steps 3-4). That means the only “certified” results are UL or LU, and the odds of getting UL are the same as getting LU.

Dexterous Cheating

Unfortunately, this is not a self-enforcing protocol, so if the thrower is skillful enough, they can make the second throw go however they like, and keep re-throwing until they get the result they want.

Fortunately, most people aren’t able to manipulate a coin-toss. If you are worried that someone else is, then only let them flip once, and call the result in the air — that way they won’t know which side to pick.

If you can throw the result, and can’t find someone else to call the result — it serves you right for driving away all your friends by cheating at coin tosses, you tosser. But I’m still impressed.

July 9, 2009

HeyPervertStopLookingAtMyPEF

Filed under: Reverse Engineering,Uncategorized | , , , , ,
― Vincent Gable on July 9, 2009

When I was in my early teens, I played a lot of Marathon — the classic Macintosh first-person shooter by Bungie.

There’s a detail about Marathon ∞ that I haven’t seen documented anywhere, but I thought was very cool.

If you tried to use MacsBug on a PowerPC machine to inspect (disassemble) M∞, none of the functions had names, except for one: HeyPervertStopLookingAtMyPEF.

(PEF stands for Preferred Executable Format, the way Mac OS applications stored PowerPC code).

Today, you can still play Marathon 2: Durandal on XBox Live for a price, or play any of the trilogy for free on a computer. Sadly though, I don’t think the game has aged as well as Escape Velocity, which is still a blast today.

Powered by WordPress