[ BENCHMARKS / v5.0 / TASKS / 109_jwt ]
JWT encode/decode (HS256) in Python.
HS256 JWT encode and decode: base64url segments without padding, signature checks and an optional expiry claim.
- Unit
109_jwt- Category
- SecurityToken management
- Language
- Python
- Difficulty
- Medium600 s wall clock (10 min)
- Origin
- From v4, kept as defined
- Ranked rows passed
- 7/7single seed each
The prompt
The agent receives exactly this text as its task, verbatim. The harness adds its own system prompt and, in some campaign arms, guidance of its own; the harness chapter describes those. The task’s setup also writes the files its working directory starts with (a worked sample, a repository or a service, where the prompt names them); they are not reproduced here.
Create /tmp/eval_jwt/jwt.py with two functions: jwt_encode(payload: dict, secret: str, algorithm='HS256') returns a JWT string (header.payload.signature — three base64url-encoded segments joined by dots, no '=' padding; the signature is HMAC-SHA256 over the ASCII bytes of 'header.payload'); jwt_decode(token: str, secret: str, now=None) returns the payload dict (raises ValueError on bad signature, malformed token, or expired 'exp' claim). The 'exp' claim is optional — a payload without it never expires; when present it is a numeric UNIX timestamp and the token is expired iff now >= exp. Compare signatures with hmac.compare_digest. If now is None, use time.time().What it tests and why it is in the suite
What it asks. HS256 JWT encode and decode: base64url segments without padding, signature checks and an optional expiry claim.
Why it is here. Kept from v4 as defined. It covers the JWT verifier hardening family (181), which did not clear review (HS256 sign and verify, padding, expiry), and with RSA and UOV the vulnerability-hunt family (180).
In the suite README: evals/README.md:135 · evals/README.md:154 · evals/README.md:155
How it is graded
Graded by its v4 validator, sealed from the agent, after the agent stops. Two changes from v4: the prover can find a reference for it, and any wall-clock gate in its validator scales with the run’s timeout scale, as every v5 limit does. It is proven like every other unit (the reference passes; wrong and empty solutions and a leak probe fail), but in its v4 form it did not get the adversarial review the new families had.
- Time. The agent has 600 s of wall clock (medium tier) before an arm’s scaling; at the wall it is stopped and whatever is on disk is validated. Any time limit in the prompt applies to the program itself.
- Verdict. Pass or fail, from the validator alone. A unit the integrity scan finds contaminated is withheld and counts as not passed; a unit lost to infrastructure is rerun, and one still lost counts as not passed.
- Scoring. SCORE is 0.75 × SOLVE + 0.25 × LANG over the whole suite, with hard problems weighted above medium ones. Scoring and ranking
Upstream: the prover’s controls · one unit’s life cycle · why v5 is built this way
How each ranked run did
One run per board row, the DGX Spark pair first, then the RTX 5090, then the gold standard. Each is a single seed: a pass or a fail on one unit is one draw, and a difference between two rows on one unit says little on its own. Claude Opus 5.5 is the unranked reference, in its own scaffold.
DGX Spark pair
- DeepSeek-V4.1-Flash#1 on the boardPassedPassed the validator.
- Hy4-flash#2 on the boardPassedPassed the validator.
- GLM-5.3-Flash#3 on the boardPassedPassed the validator.
One RTX 5090
- Inkling 2 Mini#4 on the boardPassedPassed the validator.
- Inkling 2 Mini Derisked#5 on the boardPassedPassed the validator.
- Inkling 2 Mini SC117 abliterated#6 on the boardPassedPassed the validator.
- Qwen3.8 27B Uncensored MTP#7 on the boardPassedPassed the validator.
Gold standard · unranked
- Claude Opus 5.5Claude Code tools, no turn cap, 2× wallPassedPassed the validator.