IO

by Neal Tibrewala

Answer:
INTERNET PROVIDER

We're given a schematic and 4 pieces of code. The schematic has 5 logic gates, 3 network ports, and 3 circles. The lines (or traces) all have unique colors. Two of the colored traces on the schematic are pre-labeled: Brown is "I" and Red is "O". (This is I and O, not 1 and 0). This suggests what we're doing in this puzzle is labeling the rest of the colors with the appropriate letters.

Colors

Each source file is by "roy g biv." This is a reference to the colors of the rainbow, which clues us into seeing colors in these files. Indeed we find 3-byte sequences throughout the file, and specifically these are in lowercase just like the author's name (defying convention). Reassigning these hex values to colors allows us to match up lines of code to the schematic and results.

File Extensions

We also notice, conspicuously, that the file name extension of the source file is missing. Each file is written in a different programming language, created on the date in the header comment. Each language also uses a 2-letter file extension:

  1. Python (PY)
  2. Ruby (RB)
  3. Go (GO)

The source code files are numbered 1–3 and are text on a black background. This corresponds to the numbered circles in the schematic. Since these are black circles (dots) and have an arrow indicating direction, we make the leap to assign the incoming color to the first letter, and the outgoing color to the second letter. This is confirmed by the red trace being assigned O again.

Ports

The first part of each file, using simplified code, opens sockets to different ports. We recognize that the ports used in these tests: 21, 25, and 80 are all well-known ports assigned to the protocols FTP, SMTP, and HTTP respectively. The operation is to send a color to the indicated port (this selects which RJ port on the schematic is being referenced).

Looking at the comments, we see the acrostic RFC, which, in network lingo, refers to "Requests for Comments", which are the published specifications of these protocols. In case we miss the acrostic, the third line is explicitly "requesting a comment".

Looking up the RFC numbers for each protocol, we get a few possibilities, but the date on the first comment disambiguates which RFC is correct (and confirms that this is the right thing to be looking at). Additionally, that RFC number is close to the "expected" value being asserted. We take the difference, and use "code page 38" (ASCII) to assign a letter.

WKPProtocolAssertedRFCDateDifferenceColorLetter
21FTP179114April 1971653cb44bA
25SMTP861788November 1981739a6324I
80HTTP20291945May 199684fabed4T

Logic Gates

The remaining pieces of the code have a similar structure, but instead we're writing values "to" the colored traces. These colors are the inputs to the logic gates in the schematic. Rather than page 38, we're using page 37: IBM EBCDIC (non-ASCII). The "wrong value" also includes the bytes 0xEBCD1C. In total, 4 bytes are sent into each gate, which translate to a 4-letter word. The 4-letter word is a clue to another word that contains the gate between 3 letters. As a confirmer, OR gates are compared to wrong values that are 5 bytes (letters) long, while AND gates are compared to wrong values that are 6 bytes (letters) long.

For example, the snippet in test1 sends 0xD3D6 (LO) and 0xE5C5 (VE) to the gate with input colors 0x3cb44b (green) and 0x4363d8 (blue), and output color 0x469990 (teal), which is the upper left OR gate. The answer to this gate is AD(OR)E, confirming our earlier letter assignment of A to green, and additionally assigning D to blue and E to teal.

BytesWordGate WordColor 1Color 2Color 3
test10xD3D6, 0xE5C5LOVEAD(OR)E3cb44b (A)4363d8 (D)469990 (E)
test20xC7C9, 0xD3C4GILDAD(OR)N3cb44b (A)4363d8 (D)dbceff (N)
0xE6C9, 0xD5C5WINEBR(AND)Y42d4f4 (B)f58231 (R)fffac8 (Y)
test30xE2, 0xC9, 0xE9, 0xC5SIZEGR(AND)E800000 (G)f58231 (R)469990 (E)
0xC2, 0xD6, 0xD5, 0xC5BONEIV(OR)Y9a6324 (I)ffe119 (V)fffac8 (Y)

Extraction

Putting together all the pieces, we get this final table of colors. As a final confirmer, the letters are in alphabetical order by hex value:

ColorHexLetter
green3cb44bA
cyan42d4f4B
blue4363d8D
teal469990E
maroon800000G
brown9a6324I
lavenderdbceffN
rede6194bO
magentaf032e6P
orangef58231R
pinkfabed4T
yellowffe119V
light yellowfffac8Y

The last file is a Kotlin file, with the appropriate date and by the same author. Here, we're using the discriminator array to get the desired value. We're given 2 lines that perform an "exorbitant hash", which clues performing the XOR operation. The first line in "inputs" gives 136 / 0x88 / 10001000, which is suspicious; more suspicious is the "outputs" value of 32 / 0x20 / 00100000.

Inspecting these lines, we see that the parameters to the hash function are the RGB values, the ASCII value and this new discriminator value. How do we choose which index to use in the discriminator array? The array is 26 values long, and we used the 9th value (0-based index 8) for the color 9a6324 with letter I, the 9th letter of the alphabet.

Computing the values, we get the following table:

ColorHexASCIIDiscriminatorDec. XORBin. XORLetter
green0x3c0xb40x4b0x410x82000000000A
cyan0x420xd40xf40x420x20000000000B
blue0x430x630xd80x440xb8400000100D
teal0x460x990x900x450x181800010010E
maroon0x800x000x000x470xc7000000000G
brown0x9a0x630x240x490x1c13610001000I
lavender0xdb0xce0xff0x4E0xe06801000100N
red0xe60x190x4b0x4F0xdb3200100000O
magenta0xf00x320xe60x500xf412810000000P
orange0xf50x820x310x520x5d7301001001R
pink0xfa0xbe0xd40x540xe53300100001T
yellow0xff0xe10x190x560x411600010000V
light yellow0xff0xfa0xc80x590x94000000000Y

In binary, we see that some letters are 0's, and that the number of 1 bits is very low. The binary representations indicate which positions the letter appears in an 8-letter sequence. There are only 2 reasonable words that can be made from the regular expression [ip][nr][ot][ev][ir][dn]e[rt]: the answer INTERNET PROVIDER.