The messages of Olympus have been preserved, but every sender has been replaced with [deleted].
Hidden within the conversations is a ghostwriter watermark. The watermark can reveal which account authored each message, but the accounts are protected by four-digit PINs.
Recover the PINs, identify the messages written by each account, and decode the hidden sequence to uncover Zeus's final apology.
The file olympus_chat.jsonl contains 200 messages, with one JSON object per line. Each object contains:
id
time
sender
message
Every sender is recorded as [deleted].
The accompanying scheme.md describes the ghostwriter watermark algorithm. Each account is protected by a four-digit PIN, which is stretched using scrypt with the following parameters:
Parameter
Value
Salt
olympus-ghostwriter-v2
N
2^19
r
8
p
1
Output length
8 bytes
The resulting 64-bit key K is interpreted as a little-endian integer.
For each adjacent token pair, a SplitMix64-style function combines K, the previous token, and the current token to determine whether the current token is green. The ghostwriter favoured green tokens when generating messages.
Detection counts green tokens across the distinct adjacent token pairs and computes a z-score.
The algorithm is public, but the PINs are unknown.
Tool: Text editor.
Output: Recover the PINs, use the watermark to identify who wrote each message, and read the result as bits.
#Step 2: Implement the Detector and Check the Test Vectors
Tokenize each message using the GPT-2 BPE tokenizer, exactly as written in the file.
Implement the key derivation, green-token rule, and z-score calculation from scheme.md. Before proceeding, verify that your implementation reproduces all provided test vectors.
Each key derivation takes approximately one second and requires 512 MiB of RAM. Brute-forcing all 10,000 possible PINs would therefore be unnecessarily expensive.
Instead, inspect the handwritten messages: the short, chaotic messages that do not resemble GPT-2-generated paragraphs.
Two messages leak one digit each:
The wine fountain message says Zeus told everyone at dinner that his ghostwriter PIN starts with a 4.
The peacock message says Hera's PIN starting with 5 is no secret.
These clues narrow the search space from 10,000 candidates to 2,000.
The remaining candidate range is:
4000-5999
Tools: Text editor, grep -iw pin olympus_chat.jsonl.
from multiprocessing import PoolMSGS = [ enc.encode(json.loads(l)["message"]) for l in open("olympus_chat.jsonl", encoding="utf-8")]def score(pin): k = K(pin) return pin, sum(z(m, k) > 4 for m in MSGS)with Pool() as p: for pin, n in p.imap_unordered( score, [f"{i:04d}" for i in range(4000, 6000)] ): if n >= 20: print(pin, n)
Warning
This is the most resource-intensive step. Each worker requires approximately 512 MiB of RAM, so the number of parallel workers should be limited by available memory.
The search may take a few minutes on a multi-core laptop.
With both PINs recovered, derive their corresponding keys and score all 200 messages.
For each message:
If one key produces a high z-score, that account authored the message.
If both scores are near zero, the message is either human-written or unwatermarked filler and should be discarded.
Using only one key is a trap. Treating every message not marked by 4627 as belonging to the other account incorrectly includes the 32 unmarked messages, resulting in garbage during decoding.
The actual marked messages have scores of at least 5.35, while every wrong-key or unmarked score is below 2. Therefore, any threshold between 3 and 5 cleanly separates them.