You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add hinted P-384 Nitro attestation verification for Fusaka (#28)
* init
* happy path & doc updates
* Make hinted P-384 branch self-contained and review-ready
Vendor the hinted ECDSA384 crypto in-tree and drop the personal-fork
solidity-lib submodule so the repo builds standalone and the audited code
is exactly what deploys:
- src/vendor/{ECDSA384,MemoryUtils}.sol copied from dl-solarity@b947571,
with provenance README + the upstream hinted diff (ECDSA384.hinted.patch)
- repoint imports to relative paths, drop @Solarity remapping & submodule
- exclude src/vendor from forge fmt to keep it byte-identical to upstream
Tighten production hygiene for the human security review:
- rewrite README for the hinted flow (deployment order, cold/warm phases,
off-chain hint generation, verify-not-trust safety model)
- add CI job running the FFI off-chain/Solidity hint parity tests
- add negative tests: expired-cert-on-first-verification, notAfter validity
boundary, out-of-range scalar rejection (r==0, r>=n, s==0, s>lowSmax)
- move CertManagerDemo out of src/ into test/helpers/
- document the warm-cache precondition (NatSpec) on the hinted entrypoints
Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
* Document behavioral gaps, add parser tests, version as v2.0.0-rc.1
Behavioral-gap documentation (no logic change):
- ECDSA384Curve: explain why lowSmax = n-1 (AWS doesn't emit low-S) and the
resulting signature malleability; warn against using the signature as a key
- NitroValidator/P384Verifier NatSpec: integrator responsibilities for
freshness/replay, malleability, and PCR/moduleID policy
- README + design doc: "Security considerations" / "Integrator responsibilities"
- Mark the reverting legacy stubs @deprecated (CertManager, NitroValidator) and
reorder ICertManager to lead with the hinted entrypoints
Test coverage for the parsing layers (the cert/attestation attack surface):
- test/Asn1Decode.t.sol: malformed DER (multi-byte tag, oversized length,
out-of-range length, wrong types, bad timestamps, non-0-padded bitstring) + fuzz
- test/CborDecode.t.sol: unexpected/unsupported/indefinite types, null handling,
truncated length, declared-length-exceeds-buffer + fuzz
- test/LibBytes.t.sol: slice/keccak/readUintN bounds, overflow, round-trip fuzz
(86 tests total, up from 42)
Release hygiene:
- add CHANGELOG.md describing the v2.0.0-rc.1 hinted P-384 release
- README: installation + @nitro-validator remapping guidance
- docs: fix stale leanthebean/solidity-lib fork reference to point at src/vendor
Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
* docs: sync feature doc with current code
- §3: ECDSA384 is vendored at src/vendor, not a solidity-lib submodule
- §8: correct CertManager runtime size (19,394 / margin 5,182)
- §9: add the new coverage (cold-expiry, validity boundary, scalar bounds,
and DER/CBOR/LibBytes malformed-input + fuzz tests)
Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
* docs: add plain-language "Intuition" section to the feature doc
A non-cryptographer's walkthrough of hinted P-384 (factoring analogy +
mod-7 worked example + why it's safe), placed before the formal sections,
with cross-references into §4 so it complements rather than repeats the
spec and soundness argument.
Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
* docs: emphasize the ~384-bit exponent and add per-signature hint table
In the Intuition section: highlight that the on-chain exponent m-2 is
itself a ~384-bit number (~10^115) — the reason the MODEXP step is so
costly — and add the 48-byte hint definition plus the per-signature
hint-bytes / inverse-count table for a cold attestation.
Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
* docs: condense "Preparing calls off-chain" section
Trim §5 to the idea (hints are replayed off-chain, re-checked on-chain, so
the generator is liveness-only and language-agnostic) plus a brief note that
a reference implementation is bundled. Drops the codebase-specific CLI flags,
step-by-step prep lists, JSON schema, and Go/Rust details.
Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
* Address hinted P-384 review feedback
* Update hinted Nitro size table
---------
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments