Saturday, October 26, 2013

ST:TNG S4E3: Brothers, "private key" holds up over time, I think

Here's some Saturday morning fun.

I ran across a snippet of Star Trek: The Next Generation that is fun, from a security perspective. In Season 4, Episode 3, titled "Brothers" (YouTube), Data takes over (technical) control of the Enterprise in at the start of the episode and hurtles the ship and crew across the galaxy at warp 9.3 to some unknown destination. In order to do this, he has prevented others from taking over the ship again. (Sounds like a hacker, doesn't it?) Data has impersonated Picard and made sure all capabilities to enter in new commands are restricted.

Here's the dialog:

Data (impersonating Picard): Computer, establish a security code for access to all functions previously transferred to bridge.
Computer: Enter code.
Data (impersonating Picard): 17346721476C3278977763T732V 731171888732476789764376 lock 

Looking at this, I was curious if this code was sufficiently long to protect what Data wanted to do in this situation. After all the NCC-1701-D was built in the 24th century (2364 is where the ST:TNG series started). They have to have had significantly faster computers at that point.

So, some math. Looks like we have 10 digits and no distinction between upper or lower case, so 36 possible characters. The security code was 51 characters long.
  • 10+26 = 36 possible options 
  • 51 characters long 
  • Possible combinations: 2.351947044600255e+79
  • Or: 23,519,470,446,002,552,619,480,849,617, 690,081,539,337,173,577,026,375,375, 550,590,789,301,897,093,185,536

So, how long would would it take for a computer of the 24th century to crack this code through brute force (on average)? Well, we don't know, because ST:TNG used fictional computing measurements called quads, so there will be a gap in our assessment. Here's how it would lay out given our current way of thinking about computing power, using the GRC password checking tool, Haystack:

So...we find out it would take us 76.92 million trillion trillion trillion trillion centuries to look for the entire search space for this password, assuming we could guess 100,000,000,000,000 potential matches per second. For an average, we'd half that, but that's still a lot of time. I'd say Data has a chance at success in locking out the crew from taking back the ship!

And, if they had additional controls over guessing, like monitoring for failed attempts and time delays for additional guesses, he'd be good to go. Data would have little fear of the silly crew with their computer trying to guess the code in any reasonable time.

We find out later that he has been summoned by his father/builder/creator with a homing beacon, as his father's death is imminent. In the end, the show implies his dad passes on, and his unstable android brother Lor is back on the loose, with the custom emotion chip built by their father for Data, installed in Lor's brain.

Good fun!