Tektite

Tektite is a two part badge. The original design called for electrolumination, but it proved too tedious to mask and paint them. It comprises a web and a detachable spider. Technically, the web is the actual badge and the spider is an addon, but the spider has a great deal more functionality. The web is larger, holds a batter pack, and eight addon connectors connected via a common bus. The spider is smaller, much more delicate, and too space constrained for a dedicated battery pack.

This is device is part of the Ungoliant series and acts as a sort of "decoder ring." The Tektite spider uses its eight LED "eyes" to act as an display mechanism. Two input buttons allow the user to clock in data, one bit at a time. Tektite will encode or decode the input value and display the appropriate output.

Tektite is the name of a mythical spider-like creature from the "Legend of Zelda" franchise.

Usage

Tektite contains fifteen individually addressable 255 entry codebooks. They are numbered 1-15. The codebooks map alphanumeric ASCII characters to random single-byte values. The codebooks were generated using frequency-of-letter tables (for the English language), such that more commonly used letters appear more often in each codebook. Although this mechanism of encoding is demonstrably imperfect (for example, it fairly obviously leaks the length of the encoded plain text), it should prove unbreakable if it is only used for short phrases that do not repeat characters too often, and where there is no codebook reuse.

Codebook Zero

Because of the constraints with user input on the badge, it is impossible to select either a codebook or index at position zero. Here, thus, is a codebook that we will call "Codebook Zero." Note that the value at position 0x00 is zero. Also note that the codebook contains only values between 48-57 and 97-122. These values map to the ASCII codes for the characters "0" through "9" and "a" through "z".

.    0    1    2    3    4    5    6    7    8    9    A    B    C    D    E    F
0    0, 116, 109, 101, 121, 121, 115,  51, 102, 107,  97, 120, 101, 115, 106, 108,
2  105,  97,  97, 114, 108,  48,  99, 102,  97, 105,  97,  52, 102, 101,  56, 100,
3  122, 116, 113,  49, 108, 111, 115, 101, 115, 104, 111, 121, 101, 109, 111, 118,
4  105, 111,  97, 105, 104, 104, 111, 116, 116, 102, 100, 101,  99,  52, 101, 110,
5  104, 119, 121, 108, 112,  97, 109,  97, 111, 101,  98, 116, 104, 101, 101, 114,
6  117, 119, 102, 111, 117, 104, 116, 104, 108, 104, 105,  54, 101, 116,  50,  55,
7  115, 103, 116, 116, 122,  98,  57, 110, 111, 101, 109, 111, 115, 101, 108, 111,
8   97, 108, 115, 104, 101, 105, 100,  99,  48,  55, 110, 100, 100,  97, 111, 118,
9  101, 101, 105,  56, 108, 113, 105,  50, 106, 116, 111, 117, 109, 110, 114, 116,
A   99, 114, 101, 100,  97, 104, 103, 100, 108, 114, 101, 120, 105,  49, 122, 105,
B  115, 105, 101, 118, 105, 116, 114, 117,  51,  97, 101, 114, 108, 100, 114, 100,
C  110,  53, 108, 101, 104, 104,  97,  99, 108, 110, 109,  97, 101, 121, 108,  99,
D  110, 101, 114, 101, 110, 116, 116, 100, 100, 104, 115, 111, 114, 119,  53, 103,
E  116, 110, 118, 101, 122, 117, 110,  57, 116, 116,  54, 107, 102, 105, 116, 115,
F  104, 110, 110, 101, 103, 111, 101, 119, 119, 108, 112, 110, 101, 110, 115, 111

Encoding

Messages encoded with a Tektite scheme are represented thusly:

0{39cc53f9db6146a1bc86}

The first character identifies the codebook in use, in this case, number zero. The remaining characters, enclosed within curly braces, are the cipher text. Each pair of characters represents a hex value from 1-255 (again, zero is not used). The character pairs are thus:

39 cc 53 f9 db 61 46 a1 bc 86

If we look up each character pair in the above codebook, we see the following mappings:

39 = 104
cc = 101
53 = 108
f9 = 108
db = 111
61 = 119
46 = 111
a1 = 114
bc = 108
86 = 100

Mapping the decoded values to ASCII characters, we discover the plain text:

104 = h
101 = e
108 = l
108 = l
111 = o
119 = w
111 = o
114 = r
108 = l
100 = d

"helloworld" is far from the most original message, but consider that while it contains repetitions of two characters ("l" and "o"), the cipher text contains no repetitions. It's also quite easy to express the entire method using only 8 bits and two inputs, as Tektite does.

Using Tektite

When Tektite first boots, it goes through a short initialization period, and then arrives at a steady state with all lights off. Input will timeout if 10 seconds pass without it receiving a clock.

When the badge is held with the eyes facing up, the most significant bit is on the left, and the least significant bit is on the right.

Tektite has two inputs: SET and CLK. The user enters data one bit at a time, and Tektite evaluates every input byte. To enter a zero, press CLK. To enter a one, hold SET and press CLK.

Data is entered LSB first. Visually, that means right to left.

Upon resetting (either post-boot or after inactivity) Tektite will display a short "shift in/shift out" animation. You can manually reset the badge by entering eight zero bits (simply hold CLK until the animation displays).

Tektite will not timeout when displaying a result (encoded or decoded) byte. It will continue to display the result until another bit is input.

Decoding a message

To decode a message, the first byte entered represents the codebook to use. To select a codebook for decoding, enter 1 byte with a value 1-15. For example, to decode with codebook "A" you would enter the byte 00001010. Because data is input LSB first, you would enter:

CLK SET+CLK CLK SET+CLK CLK CLK CLK CLK

After the eighth bit is input, you will see the input animate to the left and the display will then remain blank. You are now ready to decode your first byte. For example, to decode the message "A{39}" with codebook "A" selected as above, we would input the byte 00111001 thusly:

SET+CLK CLK CLK SET+CLK SET+CLK SET+CLK CLK CLK

After the eighth bit is input, you will see the input animate out to the left and a return value animate back in from the left. Were we using codebook Zero and input the value 00111001, the return value shown would be 1101000, equating to the decimal value 104, and the ASCII character "h."

Tektite will wait for any further input before changing the display. Subsequent bytes to decode using the same codebook may be entered immediately; you do not re-enter the codebook number.

Encoding a message

Encoding works exactly the same as decoding, except that the first byte entered must be a value from 1-15 that is shifted four bits to the left. For example, to encode with codebook "A" would you enter the byte 10100000. Because data is input LSB first, you would enter:

CLK CLK CLK CLK CLK SET+CLK CLK SET+CLK

After the eighth bit is input, you will see the input animate to the right and the display will then remain blank. You are not ready to encode your first byte. For example, to encode the letter "w", you would determine its ASCII value (119), convert that to binary (1110111), and then enter:

SET+CLK SET+CLK SET+CLK CLK SET+CLK SET+CLK SET+CLK

After the eighth bit is input, you will see the input animate out to the right and a return value animate back in from the right. That value is then converted to hex and recorded as the first character of cipher text.

Tektite will wait for any further input before changing the display. Subsequent bytes to encode using the same codebook may be entered immediately; you do not re-enter the codebook number.

Key Components

Spider

Web

Firmware

v0

v1

Hardware

Web

v0

Turns out that the mask material acts a bit like the dielectric layer and still causes the EL paint over top of it to illuminate

v1

This is why we DRC stuff, kids

v2

v3 (WIP)

Spider

v0

Assembling the LEDs on the front of this sucker was a PITA

v1

Alas, the shift register I was using produced a terrible result

v2

using produced a terrible result

v3 (WIP)