mirror of
https://github.com/luxfi/pq-profile-ids.git
synced 2026-10-30 15:21:52 +00:00
Flip `_refuseUnderStrictPQ` from deny-list to allow-list semantics.
Under `PROFILE_QUASAR_STRICT_PQ`, a verifier is admissible iff its
`policyId()` is in `{POLICY_STARK_FRI_SHA3_PQ, POLICY_MLDSA65_FIPS204}`.
A spoofed verifier returning an unknown bytes32 from `policyId()` (not
classical, not PQ) is now refused — the previous deny-list let any
unrecognised value pass.
Replace the early-return-on-zero-address branch with an explicit
revert (`VerifierUnsetUnderStrictPQ`) under strict-PQ. A zero
verifier under strict-PQ is a silent no-op state and was exactly the
attack vector Red flagged: admin + setActiveProfile(STRICT_PQ, 0)
disabled the gate while keeping the profile bytes32 set. Now refused.
Classical-compat still allows address(0) — that profile's gate is a
no-op by design.
Adds three tests:
- testStrictPQ_RefusesZeroAddress
- testClassicalCompat_AllowsZeroAddress
- testStrictPQ_RefusesSpoofedPolicy
Removes the obsolete testUnconfiguredSlot_IsNoOp (asserted old behaviour).
Forge: 14 passed / 14 total.
Closes Red HIGH cluster #2/#5/#8 at the foundation layer.
Version: 0.1.0 → 0.1.1.
31 lines
753 B
JSON
31 lines
753 B
JSON
{
|
|
"name": "@luxfi/pq-profile-ids",
|
|
"version": "0.1.1",
|
|
"description": "Canonical PQ profile and proof-policy identifiers for Lux. Solidity surface (PQProfileIDs library + OnlyStrictPQ modifier).",
|
|
"license": "MIT OR Apache-2.0",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/luxfi/pq-profile-ids.git"
|
|
},
|
|
"homepage": "https://github.com/luxfi/pq-profile-ids",
|
|
"bugs": {
|
|
"url": "https://github.com/luxfi/pq-profile-ids/issues"
|
|
},
|
|
"author": "Lux Industries Inc <[email protected]>",
|
|
"main": "src/index.sol",
|
|
"files": [
|
|
"src/**/*.sol",
|
|
"README.md",
|
|
"KAT.md"
|
|
],
|
|
"keywords": [
|
|
"lux",
|
|
"post-quantum",
|
|
"strict-pq",
|
|
"policy-gate",
|
|
"solidity",
|
|
"go",
|
|
"typescript"
|
|
]
|
|
}
|