Skip to content

Model scripts - #10

Merged
mjthatch merged 16 commits into
mainfrom
model-scripts
Nov 13, 2026
Merged

mjthatch merged 16 commits into
mainfrom
model-scripts

Conversation

@mjthatch

Copy link
Copy Markdown
Collaborator

No description provided.

mjthatch and others added 16 commits November 12, 2026 16:10
The pages load js/index.js, js/stateless.js and js/stateful.js; the tests and
synth_generated.py run those files instead of cutting the HTML at comment
markers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QabhpThuWQEq1AZRZo24vm
formulas.js becomes js/model.js and takes the explorer's security code. The
explorer drops its copy of the cost model and calls slhMetrics; its Schnorr
reference and baseline tuple are the model's SCHNORR and SLH.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QabhpThuWQEq1AZRZo24vm
The explorer and the stateful page shared copies of the slider mapping, the
slider and number-input binding, the address-bar code, the share button, the
CSV download and the data.json loader; js/ui.js now holds one of each. Both
pages rank with the model's weightedDistance. The stateful page's entry points
are named like the explorer's: setup, writeHash, applyHash.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QabhpThuWQEq1AZRZo24vm
renderControls added a click listener to the reset button on every call, and
a reset calls renderControls, so each reset doubled the work of the next one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QabhpThuWQEq1AZRZo24vm
The pool comes only from data.json. Without it the page says so and your own
candidate still works. test_site_index becomes test_site_explorer and keeps
the metric checks; the pool count is still checked against data.json.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QabhpThuWQEq1AZRZo24vm
The pages keep only markup: their <style> blocks move into style.css, and the
fixed inline styles become classes. Rules the pages shared appear once; a rule
that would reach another page is scoped by the body class of its page
(page-index, page-stateful). Rules that matched nothing are gone. Every element
has the same computed style as before, at four widths and on hover and focus.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QabhpThuWQEq1AZRZo24vm
docs/model.md derives the hash-call counts, WOTS, SLH-DSA, the FORS security
sum, XMSS, XMSS-MT and UXMSS, and the distance; the scripts point to its
sections. Each script starts with what it does. Only comments and whitespace
change in the scripts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QabhpThuWQEq1AZRZo24vm
SHRINCS implements the cached model. The tag uncached-convention, on the
commit before this one, keeps the old numbers reproducible, and the report's
sentence about the HASH_CONVENTION flag now names the tag. The uncached
fixtures and test_uncached_convention go with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QabhpThuWQEq1AZRZo24vm
run_experiments.py, utils/all_candidates_search.py and
utils/scatter_plot_draw.py go (decision 4), and with them the README line and
the .gitignore entry for their output. stateful.sage drops the WOTS-classic
variant, which only its own tables showed. costs.sage stops counting hash
calls and grinding attempts (sign_hashes, verify_hashes, exp_search,
worst_search), so the worst_case helper and the scipy import go too; its CSV
loses those four columns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QabhpThuWQEq1AZRZo24vm
The sweep swapped sys.argv to an option costs.sage no longer knows, so every
sweep first computed and printed the whole PARAMETER_SETS table. It now sets
COSTS_SAGE_NO_MAIN, as stateful.sage does. The CSVs are unchanged; make sweeps
sends stdout to /dev/null, so only the time it takes changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QabhpThuWQEq1AZRZo24vm
parameters.json holds the stateless grid and size bound, the w sets, the
S_wn table, the stateful grid, the UXMSS bounds, the security target and
the SLH-DSA-128s baseline. costs.sage loads it for the Sage scripts (its
integers become Sage Integers, as literals were), tests/model.py for the
tests, and the export copies it into data.json as before.
test_site_parameters checks the JavaScript model's copies against it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QabhpThuWQEq1AZRZo24vm
costs.sage gains evaluate() and sweep(): security, size and costs of every
(w, swn, h, d, k, a) of a grid, with compute_security computed once per
(h, k, a). slhdsa-2to40.sage turns the results into CSV rows and
export_site_data.sage into pool rows; their own copies of the loop, the
security cache and the scheme-to-model rule are gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QabhpThuWQEq1AZRZo24vm
XMSS is XMSS-MT with d = 1, so its rows come from the same functions and
the copies for a single tree go. The WOTS chain counts come from
wots_lengths() in costs.sage instead of three local copies of the FIPS 205
formulas. Arguments are parsed in the main block, so export_site_data.sage
no longer swaps sys.argv to load the file, and --help prints this file's
docstring, not costs.sage's.

Removed: the --ref-size20 and --ref-size40 flags, which nothing read, and
the reference footer with its hard-coded 128-bit security; the UXMSS table
note names the reference instead. The table headers list w = 65536 too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QabhpThuWQEq1AZRZo24vm
docs/model.md gains the W+C, FORS+C and PORS+FP sizes and costs, how mmax
is chosen, the PORS+FP forgery probability, how security.sage sums, and
why hsf stops at 255. The code keeps one-line pointers: security.sage's
70-line essay, the WOTS-TW and WOTS+C derivations in costs.sage and the
hash-call notes go.

Module headers are at most ten lines: what the file computes, from what,
and how to run it. slhdsa-2to40.sage prints its options from a USAGE
string. Removed: history (the audit, "the old formula"), emphasis,
decorative separators and comments that repeat the code. Fixed: the
security.sage demo is SLH-DSA-128s, not 128f; the export header named
(w, S_wn) pairs and a --max-size that parameters.json now holds;
compute_security gets n from costs.sage, and the security target in the
costs.sage assertion and the sweep summary comes from parameters.json.
tests/model.py has one ν function instead of two.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QabhpThuWQEq1AZRZo24vm
Each script opens with what it draws or writes, from which input, and how
to run it; sieve_search_draw.py had no header. Removed: step numbers and
comments that repeat the code, a commented-out title, "NEW LOGIC" banners
and the history of the focus figures. min_mult_search.py compares five
metrics, not four. sieve_search_draw.py's default weights were never used,
since --weights always sets them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QabhpThuWQEq1AZRZo24vm
@mjthatch
mjthatch merged commit 256d22d into main Nov 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant