Showing posts with label chess. Show all posts
Showing posts with label chess. Show all posts

Sunday, February 1, 2015

BootChess: The Tiniest Chess Program in Town

Coding hyper-efficient chess programs has been something like a running contest among big time Smarty Pantses with too much time on their hands. For the last 33 years, the record for the smallest version of chess was held by the fabled 1K ZX Chess for the Sinclair ZX81. First published in 1982, 1K ZX had all of the basic chess rules and a opponent loaded into a now-hard-to-imagine 672 bytes of memory. Its publisher, David Horne, would go on to publish the code for the program in a three art Computer Magazine series (the first part of which you can see embedded below:


This is the super-rad David Horne:

david horne joshua wieder bootchess

1K ZX's 33 year reign has just been challenged. The challenger is a program called BootChess, which includes all of the features of 1K ZX with a stunning memory allocation of only 512 bytes. The program was written by Olivier Poudade and Peter Ferrie.

BootChess, Josh Wieder, DOSBox
It was never a very graphic-intensive game, anyway
This is a photo of Peter Ferrie:
Joshua Wieder Peter Ferrie

A photo of Olivier Poudade was not immediately available however this artist's rendition is accurate:

Joshua Wieder Olivier Poudade
Olivier is not, in fact an evil genius. I can't prove it. Yet.
That 512 byte number might be familiar to some readers; it is the exact size of an x86 bootloader (You can take a closer look at the source, in assembler below). There is still a bit of a controversy surrounding the release, as there appears to be a few bugs with BootChess. I personally haven't had a chance to give it a complete test run yet (but I look forward to). Let me know what you think.

Saturday, November 29, 2014

Chess, Encryption and Comic Books (Mind MGMT)

Lately, I've been hooked on a brilliant comic book from genius Matt Kindt, called Mind MGMT. In a nutshell, Mind MGMT follows a cold war era intelligence service based on the conceit that Men Who Stare at Goats-style ESP spook tactics work, and have silently and secretly played a role in the machinations of world politics throughout the 20th century. Mind MGMT is really clever, the art is striking and the whole business is worth a read on its own.

Part of the fun of the comic book is that the creators seamlessly weave the sort of subliminal messaging they use in the plot, into the layout of the comic itself. Fake advertisements in the back of issues contain hidden text, while the margins themselves are formatted like Scantron documents with little limericks where the dotted "fold here" lines usually go.

Just today I read through issue 23, which opens with a tale of a man gifted with the fore-mentioned spying super-powers; a reclusive Bobby Fischer type who communicates through the world with messages encoded in the notation of championship chess game layouts. Have a look for yourself (click to enlarge):  
MIND MGMT, Josh Wieder, comic book, chess, encryption
The story fills in the picture a bit, while also providing a series of six chess boards with notation beneath each one. I don't want to spoil the fun of decoding the image for you - what do you think the chess boards spell out? Some things to consider - does each board, or does each notation spell a unique character? Does every board / notation spell the same character every time?

Any way, seeing this inspired me. I don't have much in the way of formal education in cryptography, but even I know that chess boards have been used for cryptography before. What I think would be cool is creating a simple program that would allow you to export a chess board from a computer chess game and use it as part of a cipher for an encryption system. There's even been some more recent publishing being done with chess board cryptosystems (which I have yet to read ... I've got a lot on my plate lately).

Not necessarily the most practical project but IMO a fun distraction / way to sharpen development skills for integrating ciphers into applications.

RAT Bastard

Earlier this week, several servers I maintain were targeted by automated attempts to upload a remote access trojan (RAT). The RAT is a simpl...