Rule
published-digest-generator-scalar-review
Published exact digest determines a scalar used in native generator multiplication whose result survives in a ledger Cell.
Specimen 62 of 96 · Other active opt-ins / Privacy and cryptographic derivations
- Severity
- info
- Confidence
- high
- Maturity
- experimental
- Selection
- Opt-in
- Policy intent
- not required
- Release
- v0.1.1
- Engine facts used
resolved-callsprivate-provenancepublic-sinksdirect-hash-inputsexact-invocation-operands
Selection and scope#
Not selected by default. Select it with --detectors or the detectors list in nightshade.json. Either one replaces profile selection, so list every rule you want.
./.nightshade/node_modules/.bin/nightshade ./contracts --detectors published-digest-generator-scalar-review
./.nightshade/node_modules/.bin/nightshade detector show published-digest-generator-scalar-reviewThe first command runs only this rule; --detectors takes a comma-separated list. The second prints the rule's metadata from your installed version.
Severity is review priority. It does not express exploitability or impact. Confidence is detector metadata, not a probability. All built-in rules are experimental.
Compiler scope: the engine supports the pinned profiles 0.28.0, 0.29.0, 0.30.0, 0.31.1, 0.33.0-rc.2, 0.34.0, 0.35.0-rc.1 and 0.35.0, with ZKIR2 by default. Support for this rule can be narrower; the rule documentation below states any narrower scope.
Corpus checks#
Synthetic corpus checks for this rule in the 0.1.1 proof run. A check counts only with compiler acceptance and complete analysis.
| Positive detected | Corrected quiet | Lookalike quiet | Other negative quiet | Incomplete |
|---|---|---|---|---|
| 4/4 | 4/4 | 4/4 | 6/6 | 0 |
No deviations were recorded for this rule.
These are behavior checks on synthetic fixtures, not a precision or recall estimate. See evaluation.
Rule documentation#
From docs/detectors/published-digest-generator-scalar-review.md at v0.1.1.
Availability: opt-in. Severity: info. Confidence: high.
The rule observes selected native and cast operand/result snapshots in ordinary data flow. Selection enables the observer token; default scans retain their prior transfer paths. Legacy admission checks the resolved canonical native overload consumes Field; modern admission checks the canonical JubjubScalar overload. The legacy trace contains no invented cast. ZKIR 3 captures the ordinary scalar-cast result after its existing transfer; native interpretation and cast semantics are unchanged. Other compiler profiles remain explicitly unsupported when applicable.
Matching uses owned semantic identities and immutable value keys, not function names, witness dependence alone, or wildcard storage paths. Later writes invalidate point survival. Both instruction/reference engines and cached/uncached execution use the shared transfer machinery. Exhausted observation or matching budgets produce incomplete diagnostics. Unsupported profiles produce a selected-rule diagnostic.
A bounded resolved-call walk first checks whether an entry can reach canonical native generator multiplication. Unrelated entries need no scalar observations and are recorded as structurally absent. Renamed native imports and ordinary helpers retain their canonical targets; represented callbacks remain relevant even at zero iterations. Unresolved callable models and exhausted applicability budgets remain incomplete. Relevant entries still require the exact observations and qualified profile. The candidate is appended to the registry, preserving prior rule order.
The finding establishes that the published digest determines the scalar in this exact source recipe. It does not establish encryption use, unsafe enrollment, ciphertext compromise, deployed impact or path feasibility. Root point Cells only; aggregate, collection and exported-return publication/registration patterns are outside the candidate's bounded support. Domain-tagged hashes and independent witness invocations do not match. Other deterministic scalar recipes are outside support.
Preparation, source observation, exact matching, immutable-key work and retained allocations share unchanged 40k entry steps, 256 entry paths and 50k cumulative rule values. Selected facts carry their original limits and spent entry work; matching is aggregated after completion or refusal. Exhausted facts are not retried. No-entrypoint sources skip nonexistent entry preparation and keep their explicit complete label.
Publishing a digest that determines a scalar can be an intentional protocol choice. Review how that scalar is used before treating the source relationship as a privacy or enrollment defect; this rule does not infer encryption or key management intent.
Suppress a match#
If a match is intentional, suppress it on the line before with the exact rule ID and a reason of at least eight characters:
// nightshade-disable-next-line published-digest-generator-scalar-review -- Reason this match is intentionalDiagnostics cannot be suppressed, and an unmatched directive for a selected rule makes analysis incomplete. See configuration for fingerprint suppressions and baselines.