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
Define the 0.30 cryptographic capability policy: which exact hash, signature, commitment, and authorization operations are compiler-supported primitives; which must use identity-pinned external verifiers; and how typed message domains prevent values from being used as authority in the wrong context.
The goal is sufficient cryptographic and authorization coverage for the frozen 0.30 business corpus. It is not to reimplement every Rust cryptographic crate or add a circuit language.
Current boundary
The current branch has executable CKB BLAKE2b and SHA-256 paths, bounded byte/preimage operations, an explicit-message BIP340 route, real multisig integration, and exact-data-hash trusted external EXEC or SPAWN/WAIT. env::sighash_all remains correctly deferred because it does not yet construct the canonical signing message. Raw Address, Script identity, hashes, public keys, signatures, message digests, commitments, proofs, and witness bytes do not yet form one accepted source-level type and conversion contract.
Required decisions
Define distinct types or checked conversions for:
address payloads and decoded Lock Scripts;
complete Script, Script hash, code hash, data hash, and Type Script hash;
raw bytes, canonical transaction preimages, and domain-tagged message digests;
public keys, signatures, signer sets, thresholds, and authorization results;
commitments, authenticated openings, statements, and proof bytes; and
local compiler-proved operations versus trusted-external verifier results.
For every primitive, specify algorithm and version, personalization or domain tag, accepted encodings, key and signature normalization, malleability rules, witness ownership, failure codes, cycle/stack/code-size budgets, and whether verification is native or delegated.
Required 0.30 capability
canonical CKB signing-message construction for the selected standard Lock integration, or an exact standard external Lock boundary where constructing it inside CellScript would duplicate the consensus-adjacent implementation;
domain-separated CKB BLAKE2b and SHA-256 over bounded gathered byte ranges;
exact Script construction and full Script-hash comparison without confusing an address with a complete Script;
signature verification required by the Token, NFT/DOB, multisig, order, and committed-state acceptance fixtures;
exact issuer and signer authority binding with post-signing mutation rejection;
typed external-verifier declarations for larger or protocol-specific cryptography, including exact identity, adapter, applicability, statement, and result enforcement.
Implementation phases
Phase 0 — capability and type matrix
inventory implemented and deferred cryptographic paths;
freeze the algorithms needed by the 0.30 corpus;
define message-domain, Script-identity, key, signature, commitment, opening, statement, proof, and result types;
decide native versus exact external-verifier ownership; and
allocate stable error and evidence classifications.
Phase 1 — frontend and semantic records
add only the required constructors and checked conversions;
reject raw-byte substitution across semantic domains;
retain exact algorithm, domain, source bytes, verifier identity, and enforcement location in typed semantics and ProofPlan; and
update formatter, LSP, VS Code, builders, manifests, and source maps.
Phase 2 — native and delegated lowering
implement or complete the selected native hash/signature/message operations;
bind delegated calls to the exact CellDep, code/data identity, adapter, statement, and zero-success contract;
ensure EXEC terminality and SPAWN/WAIT continuation are reflected in control-flow and claim evidence; and
fail before artifact emission for missing, ambiguous, or unsupported verifier contracts.
Summary
Define the 0.30 cryptographic capability policy: which exact hash, signature, commitment, and authorization operations are compiler-supported primitives; which must use identity-pinned external verifiers; and how typed message domains prevent values from being used as authority in the wrong context.
The goal is sufficient cryptographic and authorization coverage for the frozen 0.30 business corpus. It is not to reimplement every Rust cryptographic crate or add a circuit language.
Current boundary
The current branch has executable CKB BLAKE2b and SHA-256 paths, bounded byte/preimage operations, an explicit-message BIP340 route, real multisig integration, and exact-data-hash trusted external EXEC or SPAWN/WAIT.
env::sighash_allremains correctly deferred because it does not yet construct the canonical signing message. RawAddress, Script identity, hashes, public keys, signatures, message digests, commitments, proofs, and witness bytes do not yet form one accepted source-level type and conversion contract.Required decisions
Define distinct types or checked conversions for:
Script, Script hash, code hash, data hash, and Type Script hash;trusted-externalverifier results.For every primitive, specify algorithm and version, personalization or domain tag, accepted encodings, key and signature normalization, malleability rules, witness ownership, failure codes, cycle/stack/code-size budgets, and whether verification is native or delegated.
Required 0.30 capability
Implementation phases
Phase 0 — capability and type matrix
Phase 1 — frontend and semantic records
Phase 2 — native and delegated lowering
Phase 3 — adversarial evidence
Completion criteria
Address/Script/hash/digest/proof substitution.dev,ci, andbackendgates pass.Non-goals
Dependencies