Detecting MacBinary format

Classic Mac OS (the main Macintosh operating system from 1984-2001) had an interesting way of storing files. Each file potentially consists of two separate byte streams, known as the data fork and resource fork. Additionally, some important information was stored in the file's directory entry, using features of the Mac's native MFS and HFS filesystems. … Continue reading Detecting MacBinary format

Examining the SHA-1 collision files

SHA-1 is a cryptographic hash function. You give it a computer file, and it produces a 160-bit hash that is completely determined by the input file, but not in any obvious way. In early 2017, a group of researchers, using advanced mathematics and 6500 CPU-years of computer searching, found the first ever SHA-1 collision: two … Continue reading Examining the SHA-1 collision files

About that JPEG/ZIP/Shakespeare hybrid file

The other day, a Twitter user (David Buchanan, @David3141593) posted a message that gained some attention. It has an attached JPEG file, with an image of William Shakespeare. If you save a copy of the JPEG file, and unzip it as if it were a ZIP file, it unzips into the complete works of Shakespeare. … Continue reading About that JPEG/ZIP/Shakespeare hybrid file

How is a JPEG image’s color type determined?

In order to decode and display a JPEG image, you have to know what "color type" (or "color model") it uses. There are several possibilities that your software probably ought to handle: Grayscale YCbCr (transformed from RGB) RGB YCCK (transformed from CMYK) CMYK Unfortunately, if you look at all the bits and bytes that make … Continue reading How is a JPEG image’s color type determined?