// HACKER NEWS — CYBERSECURITY
Solving the Jane Street Reverse Engineering Challenge
Jane Street periodically puts out challenges, and this one thoroughly nerd-sniped me and sent me down a month-long rabbit
hole that I’m only now emerging from. This post is an overview of how I solved it with a combination of hard-headedness
and sleep deprivation. It’s going to be decently technical, but in future posts I’ll go over the specifics of each
step if people are interested.
For some background I’d recommend looking at the original post on the Jane Street blog here - Can you reverse Engineer an ASIC?
And if you ever want to read the (terrible) code I used for this challenge, you can find it at my github page here
I have an engineering degree rotting away somewhere in my brain, so a lot of the words of the challenge
are familiar. The challenge is to take an ASIC and work out what it does. For those unfamiliar, an ‘ASIC’ is an
Application-Specific Integrated-Circuit, which is a fancy word for what we’d usually call a ‘Computer Chip’.
Firms like Jane Street presumably design these to get extra performance relative to the equipment you can buy from
a normal manufacturer.
In any case, the challenge is to take a ‘GDS’ file describing a chip, and work backwards to understand what it does,
and then I guess maybe there’s a password in there or something. I didn’t, and still don’t, know what ‘GDS’ stand for.
There’s two parts to the challenge - one is a warmup where you’re given a lot more information (like the actual design of
the chip), and the real puzzle where you’re given a firm handshake and a ‘good luck’ as you face the increasing prospect
of not sleeping for the next three weeks.
For some reason, I like to do things the hard way so rather than doing any research I just started poking around in the files.
I can see there’s some familiar words in them like like ‘clk’ (clock), ‘rst’ (reset) and ‘VGND’ (Ground Voltage) and ‘VPWR’ (Power Voltage).
And there’s a bunch of …. something with a prefix of sky130_fd_sc_hd__ followed by things that sound like logic element, like
‘or’ and ‘not’ and things like that. I guess that’s what I’ll need to pull out of the file?
I found there’s a really nice library ‘gdstk’ in python that seems to be able to read them. It tell me that there’s 27
elements on the warmup puzzle. A good start!
There’s also a ‘vcd’ file for the main puzzle, which is a text file, and I guess is a simulation input or output or something.
I didn’t, and still don’t, know what ‘vcd’ stands for. I can see some suspicious entries in it that look like ASCII characters.
I play around with it, writing a small C program, and get the output ‘TRY AGAIN’. Ah, so the circuit has messages in it somehow!