hashsigs 0.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. hashsigs-0.2.1/.cargo/audit.toml +30 -0
  2. hashsigs-0.2.1/.cargo/config.toml +2 -0
  3. hashsigs-0.2.1/.github/dependabot.yml +21 -0
  4. hashsigs-0.2.1/.gitignore +60 -0
  5. hashsigs-0.2.1/.vale.ini +13 -0
  6. hashsigs-0.2.1/CHANGELOG.md +158 -0
  7. hashsigs-0.2.1/COPYING +662 -0
  8. hashsigs-0.2.1/Cargo.lock +9192 -0
  9. hashsigs-0.2.1/Cargo.toml +163 -0
  10. hashsigs-0.2.1/Makefile +97 -0
  11. hashsigs-0.2.1/PKG-INFO +219 -0
  12. hashsigs-0.2.1/README.md +982 -0
  13. hashsigs-0.2.1/RELEASING.md +114 -0
  14. hashsigs-0.2.1/SECURITY.md +373 -0
  15. hashsigs-0.2.1/build.rs +154 -0
  16. hashsigs-0.2.1/deny.toml +61 -0
  17. hashsigs-0.2.1/examples/bench_keygen_sign.rs +49 -0
  18. hashsigs-0.2.1/examples/bench_table.rs +147 -0
  19. hashsigs-0.2.1/examples/bench_wots.rs +54 -0
  20. hashsigs-0.2.1/examples/measure_mem.rs +16 -0
  21. hashsigs-0.2.1/py/Cargo.toml +34 -0
  22. hashsigs-0.2.1/py/README.md +203 -0
  23. hashsigs-0.2.1/py/common/Cargo.toml +17 -0
  24. hashsigs-0.2.1/py/common/src/lib.rs +329 -0
  25. hashsigs-0.2.1/py/hashsigs_build.py +405 -0
  26. hashsigs-0.2.1/py/profiles/p128s_q18/Cargo.toml +26 -0
  27. hashsigs-0.2.1/py/profiles/p128s_q18/src/lib.rs +29 -0
  28. hashsigs-0.2.1/py/profiles/p128s_q18_sha2/Cargo.toml +26 -0
  29. hashsigs-0.2.1/py/profiles/p128s_q18_sha2/src/lib.rs +29 -0
  30. hashsigs-0.2.1/py/profiles/p128s_q20/Cargo.toml +26 -0
  31. hashsigs-0.2.1/py/profiles/p128s_q20/src/lib.rs +29 -0
  32. hashsigs-0.2.1/py/profiles/p128s_q20_sha2/Cargo.toml +26 -0
  33. hashsigs-0.2.1/py/profiles/p128s_q20_sha2/src/lib.rs +29 -0
  34. hashsigs-0.2.1/py/profiles/p256s/Cargo.toml +26 -0
  35. hashsigs-0.2.1/py/profiles/p256s/src/lib.rs +29 -0
  36. hashsigs-0.2.1/py/profiles/p256s_sha2/Cargo.toml +26 -0
  37. hashsigs-0.2.1/py/profiles/p256s_sha2/src/lib.rs +29 -0
  38. hashsigs-0.2.1/py/profiles.json +54 -0
  39. hashsigs-0.2.1/py/python/hashsigs/_api.py +398 -0
  40. hashsigs-0.2.1/py/python/hashsigs/_errors.py +41 -0
  41. hashsigs-0.2.1/py/python/hashsigs/py.typed +0 -0
  42. hashsigs-0.2.1/py/src/lib.rs +43 -0
  43. hashsigs-0.2.1/py/tests/test_api.py +200 -0
  44. hashsigs-0.2.1/py/tests/test_profiles.py +151 -0
  45. hashsigs-0.2.1/pyproject.toml +59 -0
  46. hashsigs-0.2.1/rust-toolchain.toml +6 -0
  47. hashsigs-0.2.1/src/abi.rs +662 -0
  48. hashsigs-0.2.1/src/bindings.rs +490 -0
  49. hashsigs-0.2.1/src/buf.rs +35 -0
  50. hashsigs-0.2.1/src/error.rs +116 -0
  51. hashsigs-0.2.1/src/hash/address.rs +145 -0
  52. hashsigs-0.2.1/src/hash/backend.rs +177 -0
  53. hashsigs-0.2.1/src/hash/mod.rs +44 -0
  54. hashsigs-0.2.1/src/hash/ops.rs +200 -0
  55. hashsigs-0.2.1/src/hash/suite/keccak.rs +27 -0
  56. hashsigs-0.2.1/src/hash/suite/mod.rs +96 -0
  57. hashsigs-0.2.1/src/hash/suite/sha2.rs +24 -0
  58. hashsigs-0.2.1/src/lib.rs +130 -0
  59. hashsigs-0.2.1/src/profile.rs +163 -0
  60. hashsigs-0.2.1/src/profiles/mod.rs +246 -0
  61. hashsigs-0.2.1/src/profiles/p128s_q18.rs +68 -0
  62. hashsigs-0.2.1/src/profiles/p128s_q18_sha2.rs +70 -0
  63. hashsigs-0.2.1/src/profiles/p128s_q20.rs +69 -0
  64. hashsigs-0.2.1/src/profiles/p128s_q20_sha2.rs +71 -0
  65. hashsigs-0.2.1/src/profiles/p256s.rs +70 -0
  66. hashsigs-0.2.1/src/profiles/p256s_sha2.rs +70 -0
  67. hashsigs-0.2.1/src/profiles/selected.rs +83 -0
  68. hashsigs-0.2.1/src/shrincs/action_context.rs +37 -0
  69. hashsigs-0.2.1/src/shrincs/dispatch.rs +382 -0
  70. hashsigs-0.2.1/src/shrincs/key.rs +735 -0
  71. hashsigs-0.2.1/src/shrincs/mod.rs +187 -0
  72. hashsigs-0.2.1/src/shrincs/signature.rs +528 -0
  73. hashsigs-0.2.1/src/shrincs/signer.rs +1402 -0
  74. hashsigs-0.2.1/src/shrincs/test_fixtures.rs +483 -0
  75. hashsigs-0.2.1/src/shrincs/uxmss.rs +1041 -0
  76. hashsigs-0.2.1/src/shrincs/vector_conformance.rs +523 -0
  77. hashsigs-0.2.1/src/shrincs/verifier.rs +654 -0
  78. hashsigs-0.2.1/src/sphincs_plus_c/fors_c.rs +1060 -0
  79. hashsigs-0.2.1/src/sphincs_plus_c/hypertree.rs +1062 -0
  80. hashsigs-0.2.1/src/sphincs_plus_c/key.rs +378 -0
  81. hashsigs-0.2.1/src/sphincs_plus_c/mod.rs +403 -0
  82. hashsigs-0.2.1/src/sphincs_plus_c/signature.rs +298 -0
  83. hashsigs-0.2.1/src/sphincs_plus_c/verifier.rs +233 -0
  84. hashsigs-0.2.1/src/test_support.rs +78 -0
  85. hashsigs-0.2.1/src/trace_macros.rs +67 -0
  86. hashsigs-0.2.1/src/treehash.rs +344 -0
  87. hashsigs-0.2.1/src/verifier.rs +78 -0
  88. hashsigs-0.2.1/src/wasm/export.rs +491 -0
  89. hashsigs-0.2.1/src/wasm/mod.rs +883 -0
  90. hashsigs-0.2.1/src/wots_c/mod.rs +380 -0
  91. hashsigs-0.2.1/src/wotsplus/mod.rs +741 -0
  92. hashsigs-0.2.1/tests/alloc_budget.rs +209 -0
  93. hashsigs-0.2.1/tests/build_script_features.rs +12 -0
  94. hashsigs-0.2.1/tests/common/mod.rs +347 -0
  95. hashsigs-0.2.1/tests/compile_fail/matched_widths.rs +12 -0
  96. hashsigs-0.2.1/tests/compile_fail/mismatched_widths.rs +6 -0
  97. hashsigs-0.2.1/tests/compile_fail/mismatched_widths.stderr +30 -0
  98. hashsigs-0.2.1/tests/compile_fail.rs +12 -0
  99. hashsigs-0.2.1/tests/envelope_vectors.rs +133 -0
  100. hashsigs-0.2.1/tests/generate_shrincs_vectors.rs +396 -0
  101. hashsigs-0.2.1/tests/generate_stateful_gas_vector.rs +232 -0
  102. hashsigs-0.2.1/tests/solidity_account_vectors.rs +259 -0
  103. hashsigs-0.2.1/tests/test_fixtures/account_keys.shrincs-256s-keccak.json +1 -0
  104. hashsigs-0.2.1/tests/test_fixtures/account_keys.shrincs-256s-sha2.json +1 -0
  105. hashsigs-0.2.1/tests/test_fixtures/account_signature_cases.shrincs-256s-keccak.json +1 -0
  106. hashsigs-0.2.1/tests/test_fixtures/account_signature_cases.shrincs-256s-sha2.json +1 -0
  107. hashsigs-0.2.1/tests/test_fixtures/stateful_signer_keys.shrincs-128s-q18-keccak.json +1 -0
  108. hashsigs-0.2.1/tests/test_fixtures/stateful_signer_keys.shrincs-128s-q20-keccak.json +1 -0
  109. hashsigs-0.2.1/tests/test_vectors/shrincs_account_wrapper_vectors.json.gz +0 -0
  110. hashsigs-0.2.1/tests/test_vectors/shrincs_account_wrapper_vectors_128s_q18_keccak.json.gz +0 -0
  111. hashsigs-0.2.1/tests/test_vectors/shrincs_account_wrapper_vectors_128s_q20_keccak.json.gz +0 -0
  112. hashsigs-0.2.1/tests/test_vectors/shrincs_account_wrapper_vectors_256s_sha2.json.gz +0 -0
  113. hashsigs-0.2.1/tests/test_vectors/shrincs_sphincs_128s_q18_keccak.json.gz +0 -0
  114. hashsigs-0.2.1/tests/test_vectors/shrincs_sphincs_128s_q18_sha2.json.gz +0 -0
  115. hashsigs-0.2.1/tests/test_vectors/shrincs_sphincs_128s_q20_keccak.json.gz +0 -0
  116. hashsigs-0.2.1/tests/test_vectors/shrincs_sphincs_128s_q20_sha2.json.gz +0 -0
  117. hashsigs-0.2.1/tests/test_vectors/shrincs_sphincs_256s_keccak.json.gz +0 -0
  118. hashsigs-0.2.1/tests/test_vectors/shrincs_sphincs_256s_sha2.json.gz +0 -0
  119. hashsigs-0.2.1/tests/test_vectors/wotsplus_keccak256.json +1067 -0
  120. hashsigs-0.2.1/tests/test_vectors.rs +107 -0
@@ -0,0 +1,30 @@
1
+ # Cargo audit configuration
2
+ # This file documents known security advisories that we are aware of but cannot
3
+ # immediately fix due to transitive dependencies from third-party crates.
4
+
5
+ [advisories]
6
+ # Known security advisories that we are aware of but cannot immediately fix
7
+ # due to transitive dependencies from third-party crates (primarily Solana).
8
+ ignore = [
9
+ # Timing variability in curve25519-dalek's Scalar29::sub/Scalar52::sub
10
+ # This vulnerability comes from Solana's dependency on ed25519-dalek 1.0.1
11
+ # which uses curve25519-dalek 3.2.0. We are waiting for Solana to update
12
+ # their cryptographic dependencies to newer versions.
13
+ # Risk assessment: Low - This is a timing side-channel attack that would
14
+ # require local access and precise timing measurements to exploit.
15
+ "RUSTSEC-2024-0344",
16
+
17
+ # Double Public Key Signing Function Oracle Attack on ed25519-dalek
18
+ # This vulnerability also comes from Solana's dependency on ed25519-dalek 1.0.1.
19
+ # Risk assessment: Low - This attack requires the ability to get signatures
20
+ # on crafted messages, which is not possible in our use case.
21
+ "RUSTSEC-2022-0093",
22
+
23
+ # Unmaintained crates - these are warnings, not vulnerabilities
24
+ # These come from Solana's transitive dependencies and don't pose immediate
25
+ # security risks, just maintenance concerns.
26
+ "RUSTSEC-2024-0375", # atty is unmaintained
27
+ "RUSTSEC-2024-0388", # derivative is unmaintained
28
+ "RUSTSEC-2024-0436", # paste is unmaintained
29
+ "RUSTSEC-2021-0145" # atty potential unaligned read (unsound)
30
+ ]
@@ -0,0 +1,2 @@
1
+ [target.wasm32-unknown-unknown]
2
+ rustflags = ['--cfg', 'getrandom_backend="wasm_js"']
@@ -0,0 +1,21 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "cargo"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
7
+ # Ignore specific vulnerabilities that we've assessed and documented
8
+ ignore:
9
+ # Timing variability in curve25519-dalek - transitive from Solana
10
+ - dependency-name: "curve25519-dalek"
11
+ versions: ["3.2.0"]
12
+ # Double Public Key Signing Function Oracle Attack - transitive from Solana
13
+ - dependency-name: "ed25519-dalek"
14
+ versions: ["1.0.1"]
15
+ # Unmaintained crates - transitive from Solana, low risk
16
+ - dependency-name: "atty"
17
+ versions: ["0.2.14"]
18
+ - dependency-name: "derivative"
19
+ versions: ["2.2.0"]
20
+ - dependency-name: "paste"
21
+ versions: ["1.0.15"]
@@ -0,0 +1,60 @@
1
+ /target
2
+
3
+ .DS_Store
4
+
5
+ .cache
6
+ test-ledger
7
+ pkg
8
+ node_modules
9
+ tests/test_vectors/shrincs_stateful_k_gas_vector.json
10
+
11
+ # generated wasm-bindgen output + build artifacts for the ts/
12
+ # package (built in CI). ts/src/profiles/ holds one directory per profile,
13
+ # each carrying that profile's wasm-bindgen output, its generated loader pair
14
+ # and entry point, and its inlined base64 -- all written by bin/build-wasm.sh
15
+ # and ts/scripts/gen-*.mjs. ts/src/index.ts is generated too: it re-exports
16
+ # whichever profile bin/packages.sh names as the default. The only
17
+ # hand-written sources under ts/src are api.ts and the tests.
18
+ ts/dist
19
+ ts/src/profiles
20
+ ts/src/index.ts
21
+
22
+ # generated Python package pieces, staged by py/hashsigs_build.py (the PEP 517
23
+ # backend) before it hands off to maturin: the compiled per-profile extensions,
24
+ # the profile modules that bind them, and the package roots that re-export the
25
+ # default. The hand-written sources under py/python/hashsigs are _api.py,
26
+ # _errors.py and py.typed.
27
+ py/python/hashsigs/_ext/
28
+ py/python/hashsigs/profiles/
29
+ py/python/hashsigs/__init__.py
30
+ # The root extension. A local `maturin develop` drops it beside the sources
31
+ # rather than in _ext/ above, so `git add -A` would otherwise commit a binary.
32
+ py/python/hashsigs/_hashsigs*.so
33
+ py/python/hashsigs/_hashsigs*.pyd
34
+
35
+ # Python bytecode and test caches.
36
+ __pycache__/
37
+ *.py[cod]
38
+ .pytest_cache/
39
+
40
+ # local prompt/planning scratch - not committed
41
+ _prompt_planning/
42
+
43
+ # Beads / Dolt files (added by bd init)
44
+ .dolt/
45
+ .beads/**/*.db
46
+ .beads-credential-key
47
+ .beads/proxieddb/
48
+ .beads.gate.lock
49
+
50
+ # Agent/tooling workspaces and instructions (local only)
51
+ .beads/
52
+ .agents/
53
+ .claude/
54
+ .codex/
55
+ CLAUDE.md
56
+
57
+ # Writable cargo home used by CI (must not collide with committed .cargo/)
58
+ .cargo-home/
59
+ .rustcheck/
60
+ .serena/
@@ -0,0 +1,13 @@
1
+ [*.{md,txt,rst}]
2
+ # SHRINCS/SPHINCS+ build-profile names ("128s", "256s", "q18", "q20") match
3
+ # Google.Units' digit+letter regex (it reads "128s" as "128 seconds"), but
4
+ # they are profile identifiers, not measurements. Disabling avoids degrading
5
+ # the profile names to satisfy a false positive.
6
+ Google.Units = NO
7
+
8
+ # "backend" is the term PEP 517 itself uses: the `build-backend` key in
9
+ # pyproject.toml names the module that builds the distribution. Microsoft's
10
+ # A-Z list prefers "back end", which would not match the specification, the
11
+ # configuration key, or the module name. Keeping the precise term beats
12
+ # satisfying a style list written for a different domain.
13
+ Microsoft.Avoid = NO
@@ -0,0 +1,158 @@
1
+ # Changelog
2
+
3
+ This file records changes to this project, in the
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) format.
5
+
6
+ ## Unreleased
7
+
8
+ ### Added
9
+
10
+ - Explicit-leaf stateful signing on the wasm surface: `shrincsSignAtLeaf`
11
+ (commitment-bound, like `shrincsSign`) and `shrincsSignStatefulRawAt`
12
+ (signs the message as-is, for callers whose canonical hashes already bind
13
+ the commitment). Both are non-mutating -- no leaf counter advances, and the
14
+ caller owns leaf-reuse discipline, for signers whose used-leaf state is
15
+ authoritative elsewhere (an on-chain bitmap). `shrincsVerifyStatefulRaw` is
16
+ the raw verify counterpart. `decodeStatefulEnvelope` and
17
+ `decodeStatelessSignature` decode the ABI signature envelopes into typed
18
+ fields in pure TS, from the node and browser entries alike.
19
+
20
+ - `profileName()` on the wasm surface, returning the SHRINCS profile the loaded
21
+ binary carries. Every profile binary exports the same function names, so this
22
+ is how a caller confirms it loaded the profile it imported.
23
+ - `@quip.network/hashsigs-wasm` ships every profile, each on its own subpath
24
+ export: `@quip.network/hashsigs-wasm/128s-q18` and the five siblings. The
25
+ package root stays the default profile, so a bare import is unchanged. Each
26
+ subpath carries its own wasm binary, built by a `bin/build-wasm.sh` loop, so
27
+ a browser consumer downloads one profile rather than six -- the browser build
28
+ inlines the wasm as base64, where no bundler can drop the profiles nobody
29
+ imported. A shipped binary is 133-147 KB, or 178-196 KB base64.
30
+ `ts/src/api.ts` holds the profile-independent surface, and the per-profile
31
+ loaders and entry points are generated from the profile list by
32
+ `ts/scripts/gen-profile-entries.mjs`.
33
+ - The `hashsigs` PyPI distribution has a signing API. It previously exposed
34
+ only `__version__`. `hashsigs.shrincs` and `hashsigs.sphincs_plus_c` cover
35
+ keygen, stateful and stateless signing, verification, key import and export,
36
+ and stateful-chain reset, over decomposed key objects rather than opaque
37
+ blobs. Every failure raises `HashSigsError` with a stable `code`.
38
+ - Every SHRINCS profile ships in that one distribution, each as its own module:
39
+ `from hashsigs.profiles import p128s_q18`, and five siblings. The package
40
+ root stays the default profile. Each module carries its own compiled
41
+ extension under `hashsigs._ext`, built from a crate in `py/profiles/`,
42
+ because one Cargo package builds at most one cdylib. Importing a profile
43
+ maps only that profile's code, at the cost of a wheel roughly six times the
44
+ size of a single-profile build.
45
+ - Two SHRINCS profiles, `shrincs-128s-q18-sha2` and `shrincs-128s-q20-sha2`,
46
+ behind the `profile-128s-q18-sha2` and `profile-128s-q20-sha2` features.
47
+ Each is the exact numeric twin of the keccak profile of the same name and
48
+ differs only in the scheme hash suite (SHA-256 instead of keccak-256) and in
49
+ the profile identity string. Both carry committed SPHINCS golden vectors and
50
+ run the library suite in CI. Their ERC-7913 adapter tests are held back until
51
+ the matching account-wrapper vectors, which are generated in
52
+ hashsigs-solidity, are copied across.
53
+
54
+ ### Changed
55
+
56
+ - The FORS message digest binds to the profile. Both digest regimes hash
57
+ `P::PROFILE_ID` into the preimage, which is now
58
+ `H("fors-digest" || PROFILE_ID || pkSeed || hypertreeRoot || randomizer ||
59
+ counter || message [|| i])`. Without it, two profiles that share a hash suite
60
+ derive the same leaf indices for a message. This changes the wire format:
61
+ signatures from earlier versions do not verify, and this release regenerates
62
+ every committed golden vector. `ShrincsVerifier::version_tag()` and
63
+ `SphincsPlusCVerifier::version_tag()` move from `v1` to `v2`, so a Solidity
64
+ verifier pinned to the old tag rejects a new signature outright instead of
65
+ failing inside the FORS check. Answers external audit issue oak-sol-02.
66
+ - Packaging ships one artifact per ecosystem instead of a base package plus
67
+ one sibling package per profile. `hashsigs-rs`, the `hashsigs` PyPI
68
+ distribution, and `@quip.network/hashsigs-wasm` each carry every profile,
69
+ and each profile is imported on its own path. `bin/packages.sh` no longer
70
+ declares `SIBLING_PROFILES`, `PYPI_SIBLINGS`, or `NPM_SIBLINGS`; it declares
71
+ `PROFILES` instead. All three ecosystems now work this way.
72
+ - The six `profile-*` Cargo features (`profile-256s`, `profile-256s-sha2`,
73
+ `profile-128s-q18`, `profile-128s-q20`, `profile-128s-q18-sha2`,
74
+ `profile-128s-q20-sha2`) are additive. Enabling more than
75
+ one now compiles more than one profile into the same build, instead of
76
+ build.rs panicking on two. `cargo test --all-features` compiles and tests
77
+ every profile in one build.
78
+ - The wasm surface is generic over the profile. `src/wasm/core.rs` holds every
79
+ operation as a function over `P: Profile` plus that profile's two array
80
+ widths, and `src/wasm/export.rs` carries the macro that stamps those out as
81
+ concrete `#[wasm_bindgen]` items. `#[wasm_bindgen]` cannot annotate a generic
82
+ function, so the export boundary is monomorphized by macro instead. The
83
+ exported names and behavior do not change. The core verifies through the
84
+ generic free functions rather than the `ShrincsVerifier` and
85
+ `SphincsPlusCVerifier` facades, which name the build-selected profile and
86
+ would otherwise pin every verify to it.
87
+ - A `Profile` trait and per-profile types are now public, under
88
+ `hashsigs_rs::profiles`, such as `hashsigs_rs::profiles::p256s::Shrincs`.
89
+ `hashsigs_rs::Shrincs` now follows the profile the build binds to, rather
90
+ than always naming the `256s` profile. When more than one profile feature is
91
+ enabled, a fixed priority order decides which one that is. Name a profile
92
+ module's own alias to pin one explicitly.
93
+
94
+ - The PyPI distribution builds through `py/hashsigs_build.py`, a PEP 517
95
+ backend that compiles one extension per profile and stages them into the
96
+ package before delegating to maturin. `python -m build` and `pip install .`
97
+ go through it; a bare `maturin build` does not, and produces a wheel whose
98
+ `hashsigs._ext` is empty. The source distribution works: `pip install
99
+ hashsigs --no-binary hashsigs` runs the same backend from the unpacked sdist
100
+ and rebuilds every extension.
101
+ - `pyproject.toml` moved from `py/` to the repository root. maturin resolves
102
+ `include` paths against the directory holding it, and that directory becomes
103
+ the sdist root, while path dependencies are vendored at their
104
+ workspace-relative locations. Rooting the file here makes those agree: the
105
+ profile crates sit at `py/profiles/` in the sdist, the same place they
106
+ occupy in the repository, so their path dependencies back to the core
107
+ resolve.
108
+ - `hashsigs.ERROR_CODES` comes from the Rust `ErrorCode` enum through the root
109
+ extension, rather than a tuple restated in Python.
110
+ - The profile-generic binding core moved from `src/wasm/core.rs` to
111
+ `src/bindings.rs` and is now `#[doc(hidden)] pub`. Both the WebAssembly
112
+ surface and the Python extension crates build on it, and the Python crates
113
+ are separate packages, so they cannot reach a `pub(crate)` module. It is not
114
+ a stable API.
115
+
116
+ ### Removed
117
+
118
+ - `TryFrom<&[u8]>` no longer exists on seven public wire types:
119
+ `wots_c::Signature`, `shrincs::Keys`, `shrincs::Signature`,
120
+ `sphincs_plus_c::LayerSignature`, `fors_c::Entry`, `fors_c::Signature`, and
121
+ `sphincs_plus_c::Signature`. Callers must use the explicit
122
+ `from_bytes::<P>` constructor for the profile they target.
123
+
124
+ ### Fixed
125
+
126
+ - The `hashsigs` wheel carries a `manylinux` platform tag again. The build
127
+ moved from the maturin command line to `python -m build`, which builds the
128
+ wheel from the sdist and so proves the sdist is complete. The two entry
129
+ points disagree on one default. The command line tags the wheel for the
130
+ lowest compatible `manylinux`. The PEP 517 hook it exposes defaults to
131
+ `--compatibility off`, which produces a bare `linux_x86_64` tag. PyPI
132
+ rejects that tag with a 400, because it makes no promise about the glibc the
133
+ extensions need. `py/hashsigs_build.py` now passes `--compatibility pypi`,
134
+ and every build path inherits it. `bin/check-wheel.py` checks the platform
135
+ tag and the extension count. The release job, the merge request gate, and
136
+ `make check-python-dists` all call it, so a wheel PyPI would reject now
137
+ fails on a merge request instead of at upload.
138
+
139
+ - `valid_public_key` rejects a SHRINCS public bundle whose stateful root
140
+ carries nonzero bytes past `P::HASH_TRUNC_LEN`. The 128-bit profiles hold a
141
+ 16-byte root in a 32-byte word and zero the unused suffix. A bundle with a
142
+ dirty suffix is not a key any signer produces, and no stateful signature
143
+ verifies against it. The validator used to check only the encoded length, so
144
+ it accepted such a bundle whenever the commitment matched. Answers external
145
+ audit issue oak-sol-09.
146
+
147
+ - The Rust SHRINCS signing and verification facades bind the full public-key
148
+ commitment into the signed digest, and they use a separate domain tag for the
149
+ stateful adapter and the stateless adapter. The facades used to sign the
150
+ caller hash on its own. A signature over that hash therefore stayed valid
151
+ after a change to the half of the bundle the primitive does not read, so an
152
+ attacker could pair a stateful signature with a substituted stateless half,
153
+ or the reverse. The verifier identity moves to V4, and the compressed
154
+ Solidity interoperability vectors record the caller hash and the bound
155
+ message separately. The old vectors remain as negative tests, which prove the
156
+ V4 boundary rejects the earlier construction. Rust and Solidity now derive
157
+ the same two digests. Answers external audit issues oak-sol-03 and
158
+ oak-sol-06.