The Internet protocol suite is wonderful, but it was designed before the advent of modern cryptography and without the benefit of hindsight. On the modern Internet, cryptography is typically squeezed into a single, incredibly complex layer, Transport Layer Security (TLS; formerly known as Secure Sockets Layer, or SSL). Over the last few months, 3 entirely unrelated (but equally catastrophic) bugs…
…in the integers mod 2 (a.k.a. the finite field of order 2). Multiplication mod 2 is AND : A B (AB) A B AND 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 1 Adding one mod 2 is NOT : A (A+1) A NOT 0 1 1 1 0 0 So, multiplication plus one is NAND : A B (AB+1) A B NAND 0 0 1 1 0 1 1 1 1 0 1 1 1 1 0 0 Since NAND is universal, and any finite composition of polynomials is a polynomial, any finite boolean circuit is a…
Thanks to fellow Hacker School er Leah Steinberg for inspiring this post! Having intermittently struggled with apache2 configuration files for the majority of my adult life, I find nginx an absolute joy to set up. I’m completely sincere about that. But, for those who are just getting into Web development, nginx is just about as much of a struggle as Apache used to be—in fact, probably more so,…
The Virtual Network Computing (VNC) system for accessing the GUI environments of remote computers uses a protocol called Remote Frame Buffer (RFB) to exchange data about graphics output as well as keyboard and mouse input. RFB turns out to be a very sane protocol (specification PDF here ) compared with X11, and infinitely more sane than Cocoa (which requires the ObjC runtime) or Win32 (no…
Now that nearly every computer has some form of multi-processing (that is, multiple CPUs sharing a single address space), some high-level languages are starting to get attention for their concurrency features. Many languages refer to such features as “concurrency primitives.” But since these are high-level languages, we know that these “primitives” must ultimately be implemented with hardware…
General disclaimer for InfoSec articles: Reading this article does not qualify you to design secure systems. Writing this article does not qualify me to design secure systems. In fact, nobody is qualified to design secure systems . A system should not be considered secure unless it has been reviewed by multiple security experts and resisted multiple serious attempts to violate its security claims…
Note: This is a position piece, not a technical article. Hat tip to Jake Skelcy for requesting such a piece. Computers didn’t always have operating systems. The earliest machines, like the Harvard Mark I and the EDVAC , performed one “computation” at a time. Whenever a computation finished, with its output printed by a teletypewriter or recorded on a magnetic tape, the machine would shut down. A…
See the slides (PDF) . (You may want to use your PDF viewer’s presentation mode; there are a lot of pseudo-animations that could get annoying to scroll through.) Update : Today, I drew up the field axioms in this notation. I’m almost to the point where I can define linearity! Last week at Hacker School , I floated the idea of giving a presentation about linear algebra. Over a decade after taking…
In 2001, my favorite programming language was Python. In 2008, my favorite programming language was Scheme. In 2014, my favorite programming language is x64 assembly. For some reason, that progression tends to surprise people. Come on a journey with me. Python In this article, we’re going to consider a very simple toy problem: recursively summing up a list of numbers 1 . def sum_list ( list ): if…
Last night, a fellow Hacker School er challenged me to a running-time contest on the classic eight queens puzzle . Naturally, I pulled up my trusty Intel® 64 manual and got to work. It turned out to be even faster than I expected, churning out pretty-printed output in 15ms, which is totally dominated by the time it takes the terminal to display it (it takes only 2ms if redirected to a file).…
Myth : “Virtual memory” is the mechanism that a kernel uses to make more memory available than is actually physically installed, by setting aside a disk partition for the overflow and copying pages between memory and disk as needed. I acquired this belief very early in my programming career, but it turns out that swapping pages to disk is merely one of the many things that “virtual memory” makes…
One of my 3 major goals for Hacker School was to create a bootable, 64-bit kernel image from scratch, using only nasm and my text editor. Well, folks, one down, two to go. The NASM/x64 assembly code is listed below, with copious comments for your pleasure. It comprises 136 lines including comments; 75 with comments removed. You may wish to refer to the Intel® 64 Software Developers’ Manual (16.5MB…
Today is my second day at Hacker School , and I decided to set up a little bit of tooling for blogging about what I do here. The first tool I set up (following the recommendations of many Hacker Schoolers and alums) was Octopress , a static site generator designed for GitHub Pages and implemented atop Jekyll . (The page you’re reading right now is Octopress-generated.) I followed the admirably…