Posts RSS Comments RSS 1,005 Posts and 478 Comments till now

Archive for December, 2005

FYP Blues

Well here I am… blogging after 11 hours of programming today. FYP sucks.

[Explanation of my project background for the non-techies out there:]
Cryptography is the science of scrambling information to the extent that it is unreadable to anyone not in possession of a special password, known as a key. In the case of computer-based cryptography, this “key” is (more often than not) a unique number. Since the key is a number, it must fall into a range of values. In cryptography, this range is known as a keyspace.

My project basically aims to try every possible number in the keyspace, until I find the correct one which unscrambles a given scrambled message… Rather akin to having, say, 100 keys on your key ring and a locked door. With no idea which one fits, you have no choice but to try each and every one till the door opens. Alas, however, the number of possible values in the keyspace is much much more than 100. Hence, my program has to be designed to collaboratively search through the keyspace with other instances of itself, i.e. if you and I both run the program, we’d each only have to worry about half the keyspace.
[End of explanation.]

Managed to get the alpha version of the prototype running today. For the sake of academia, I was instructed by my sup to tackle the Data Encryption Standard (DES) with a keyspace of 2^56 (that’s 2 to the power of 56 for those unused to text formatting). Though considered small by today’s standards, 2^56 is still mind-bogglingly freaking huge when you come up close and personal with it.

Some facts and figures

  • My untuned prototype searched through a small chunk of 2,097,152 keys in 403,359 milliseconds.
  • That’s 403.359 seconds, or 6.72265 minutes.
  • Dividing, that gives a test rate of 5199.21955 keys per second.
  • While 5000 keys per second may seem blazing fast to the unacquainted, it’s actually dismally slow. Let’s delve a little further…

  • There are 2^56 keys in the keyspace.
  • 2,097,152 keys is exactly 2^21.
  • Hence, assuming this single computer works at an ultra-constant rate, it will take 2^35 times longer to completely go through the keyspace.
  • That’s 34,359,738,368 x 403,359 = 13,859,309,708,378,112 milliseconds.
  • Which is 13,859,309,708,378.112 seconds,
  • 230,988,495,139.6352 minutes,
  • 3,849,808,252.32725333 hours,
  • 160,408,677.1803022222 days,
  • 439,175.02308090957487 holy earth years long.
  • Meaning, at this rate, I’d have to leave my computer unattended for 439 thousand years before it ever finishes checking all keys in the keyspace. Of course, that’s in the worst case… Statistically speaking, if the key was originally chosen entirely at random, There’s a good chance I might take half that time, or 219,587.511540454787 years. If, however, I got another 999 friends with comparable computers to join me, the 1000 of us working together, non-stop, day and night, will only take 219 years to cover all the possible values on average.

    Remember, folks, this encryption standard has been declared obsolete because the keyspace is too small. Present-day AES uses up to 256 bits (2^256 keys), and RSA uses 4096 bits.

    You do the math.

    P.S. My program has been christianed ARGH! (A Really Gigantic Haystack!) and is currently in version 0.2a.

    Do U Require Another Increment? (D.U.R.A.I)

    Welcome to the media circus

    I finally got home over the Chistmas weekend and managed to catch up on the news of the past week (I am media-deprived in hall) and it took me a good part of 4 hours to wade through the blitzkreig-bombshell-shitload of articles surrounding KPMG’s damning report on “the old” NKF. Durai and party are in for a world of hurt… They mayn’t have technically run afoul of whatever little regulation they had, but the way I see it, it’s only a matter of time before The Good People cave in to public pressure for blood and dole out a hefty slap on the proverbial wrist. Be honest though… don’t you wish you were employed by the NKF as fund raising staff before the shit hit the fan?

    Fun Fact: It’s interesting to note that barely a week after the report is out, NKF’s Wikipedia entry has already been updated with up-to-the-minute information. Look there for a good see-all of the case from start to end.

    Fun Fact: KPMG was also reported to have charged heavily discounted rates for this investigation, with the Straits Times quoting a suit saying that it’s their way of performing their “share of National Service”… bah. Smells like a carefully calculated move to push PwC’s rep further down the drain…

    Bendy Woman

    I don’t know what this girl’s been eating, or where she comes from or what event this is, but it appears she’s made out of tofu or something. It makes my back hurt just to watch.

    Linky.

    From the comes-as-no-surprise department:

    Toilet paper, having been used to clean a frying pan of traces of curry, then dumped unceremoniously into a toilet bowl, imparts unto said bowl the striking resemblance to a crock of shit.

    More BF2 woes

    Alright… I’m up to corporal now… streaked through LCP from private to CPL in one night… and since I own the SF expansion, I am supposed to get one unlock for LCP, one unlock for LCP from SF, one unlock for CPL and another unlock for CPL from the SF expansion. My stats are registering fine on EA’s backend servers, but somehow BFHQ doesn’t seem to work through this damn campus firewall,. As a result, I can’t unlock anything! argh. Will have to go to a LAN shop or something where there’s a working BFHQ in order to unlock my guns. This sucks.

    Edit: I have my G36C and my SCAR-L now.. Thanks, Gavin!

    The Promise

    Do not watch this movie. It is awful.


    Cher.

    I caught this last Thursday (we were going for Perhaps Love, but couldn’t get tix, and figured since we were there we might as well watch something anyway) and it wasn’t just disappointing, but embarassingly bad. This movie differs from Kung Pow: Enter the Fist only in that it has a much larger budget. It seemed promising at the beginning, with the short prologue about gods and generals, followed by an establishing shot of corpses strewn across a battlefield, and some goddess with a beautiful CGI dress (subsurface scattering and all that jazz)… then fell flat on its face 10 minutes in, when it showed some slave running faster than a horde of charging bulls. It never recovered after that.

    The movie then went on to insult my intelligence with (in no particular order):

  • said slave running faster than many other people in the movie, up walls and at times displaying superhuman strength
  • said slave going back in time as a result of running thus (this is a major plot point)
  • overdone CGI
  • a homosexual assassin
  • a race of bird people
  • a master villain who, when fully decked out in regalia, bears more than a passing resemblance to Cher
  • banana trees in China (granted that the geography can be disputed, however said trees in an obviously temperate zone is just wrong)
  • I would attempt to describe the plot… if there were one. There’s more bullshit in this than on the ground of Horseshoe Valley after the charging of the bulls.

    Tis the season

    The ring came in a box topped with a white bow and accompanied by a note, which read: “Merry Christmas. Thank you for leaving your car door unlocked. Instead of stealing your car I gave you a present. Hopefully this will land in the hands of someone you love, for my love is gone now. Merry Christmas to you.”

    Linky.

    Busy with acap

    Singing day in, day out…

    //too tired to type.

    Would you want one of these?

    Wherein I whine and bitch

    So I’m playing BF2 as Spec Ops, right, and laying down suppressing fire in Mashtuur City, when, like, some bloody moron decides to stroll into my line of fire for a better view of the action, right… And I’m not talking 20 yards out… more like 3 feet in front of me, so naturally my 5.56 NATOs drill straight into the back of his thick skull; and I get punished for a teamkill??!

    I know it’s part of the game and all, but, God! Some people are motherfucking wankers.

    Next »