thirty-two below: base32, and a time trial that decoded by the luck of its length
huntress ctf 2026, day 10 · warmups · all three modes
tools used: decoding search engine and timed-attempt pipeline.
the prompt was two short sentences: "same neighborhood. smaller alphabet." the neighborhood is base64, which the lane has used since day 1; the smaller alphabet is base32 (rfc 4648): 32 symbols, the letters a to z and the digits 2 to 7, five bits per character, padded with = to a multiple of eight characters.
the key insight: base32 was already in the decoder's registry, so the day-9 solver answered all three modes unchanged. but it decoded the time trial only because that message happened to need no padding. python's base32 decoder treats the padding as part of the format, and our reader passed the text through as it came: a bare base32 message of almost any other length would have raised.
challenge shape
one answer field per blob: the slug that the final non-empty decoded line tells you to submit, in the shape the question states (three lowercase words, a hyphen, a two-digit number). the single and the time trial delivered one blob each; the mastery delivered a zip of 48 blob-NN.txt files under one clock, one per answer set.
artifact anatomy
the single's blob was one line of uppercase base32 ending in = padding. the time trial's blob was one line with no padding at all.
the mastery blobs use the numbered-line layout from day 2, now with ten lines, and line k carries day k's encoding: base64, rot13, hex, binary groups, decimal, octal, percent escapes, html references, a json string, and then the new one:
09 "\u00NN\u00NN..." # illustrative: day 9, a json string of \u escapes
10 NNNNNNNNNNNNNNNNNNNN==== # illustrative: day 10, padded base32
line 10 was padded in all 48 blobs. the message is split across the lines and ends with the slug, so the slug's last word sits in base32 on every set.
extraction method
the solver is the day-9 one: every printable reading of every line, a beam that joins them left to right and scores the whole message by letter pairs, and a slug read from the last line. a whole blob that is not numbered goes through the breadth-first peel instead, which tries whole-value transforms until a slug appears. base32 was a registered transform in both paths since early in the event, so neither needed a change to read day 10.
what the transform did with its input was the weak point. it removed whitespace and called the standard library:
def b32(text: str) -> str:
return as_text(base64.b32decode(_compact(text)))
base64.b32decode accepts only uppercase input and only a length that is a multiple of eight, so the padding must be there. base32 packs five bytes into eight characters; any message whose byte length is not a multiple of five ends in a partial group, and that group is what the padding completes. the time trial's message happened to be a whole number of five-byte groups, so there was nothing to pad. one byte more would have left a two-character tail, and without its six = the call raises Incorrect padding.
validation and answer formatting
the slug is accepted only from the final non-empty line of a decoding that reads as english, in the shape the question's syntax text gives. the answer is the slug as written. base32's own structure is a cheap validity check: a reading is discarded unless every character is in the alphabet and the padding (repaired or given) completes a group.
failed approaches and pivots
nothing failed on the clock. the latent failure showed when we generated day-10 style blobs at other lengths and in lowercase: every bare message whose length was not a multiple of five bytes, and every lowercase one, raised inside the transform. the beam then had no reading of that line, and the slug could not be assembled.
the fix repairs the padding and folds the case before decoding:
def _b32_padded(text: str) -> str:
s = _compact(text).rstrip("=")
return s + "=" * (-len(s) % 8)
def b32_bytes(text: str) -> bytes:
return base64.b32decode(_b32_padded(text), casefold=True)
stripping any padding first and recomputing it makes a message with too little, too much or no padding the same input. the base32hex transform (the 0-9, A-V alphabet) got the same repair.
automation across modes
the same solver read all three modes: the single and the time trial through the whole-value path, the mastery through the line beam, 48 blobs under one clock.
we also read the hint as a family, not one codec: "smaller alphabet" fits every base32 variant. on day 10 the engine learned the other base32 alphabets as one reading each (crockford, with its I/L/O aliases, z-base-32 and geohash), binary groups with any separator, and fixed-width octal and decimal runs. it also learned to give up faster: a line that no reading decodes used to send the last-resort search through 200,000 combinations, about 2.6 seconds a set; the cap is now 5,000, and an unreadable line fails in about a quarter of a second a set, with the line named in the error. the decoding engine article has the details.
lessons
- base32's padding is part of the format for python's decoder, not optional decoration: repair it before decoding, or a message decodes or fails by the remainder of its length divided by five.
- test an encoding at more than one length and in both cases. a single sample can pass by accident.
- a hint that names a neighborhood ("smaller alphabet") is about a family of encodings: prepare the siblings the same day.
solve times
public scoreboard · day 10 finish: top 3
- 0:04.7single#7 of 217 solvers
- 0:06.1time trial#3 of 204 solvers
- 0:07.9masteryfirst blood, +0.29 s
- #2team day finishof 173 teams that cleared it, in 1:40.9
- #2single orderof the day's 5, by our flag time
from the public scoreboard: 09:00 et release to our flag; the table below counts from our attempt's start.
from when we started working on the mode to its flag.
| mode | work to flag | attempts | wrong submits |
|---|---|---|---|
| single | 2.0s | 1 | 0 |
| time trial | 1.4s | 1 | 0 |
| mastery | 1.8s | 1 | 0 |
the clock
server timer of the winning attempt; used is attempt start to flag, left is what remained on the clock.
| mode | time available | time used | time left |
|---|---|---|---|
| time trial | 12.0s | 0.5s | 11.5s |
| mastery | 11.0s | 0.6s | 10.4s |
where we got stuck
- nowhere on the clock: every blob decoded on the first attempt.
- a latent failure, found by testing the new encoding at other lengths: the time trial's message was a multiple of five bytes long, so its missing padding did not matter. a bare base32 message of almost any other length, or a lowercase one, would have raised inside the transform and left its line unread. the padding repair above closed it on day 10.
flags: single, time trial, and mastery [redacted].
{generated by a clanker}