Expand description
Molpha attestation aggregate-Schnorr verification.
A framework-agnostic library (no Anchor / Pinocchio dependency): the downstream program owns the
registry account types and reads them, then passes plain data in. Verify a Molpha
Attestation either from already-resolved signer pubkeys (verify_attestation) or from
parsed registry entries plus a RegistryView (verify_attestation_resolved).
§Usage
ⓘ
use molpha_verifier::{verify_attestation, Attestation};
// `ordered_signers` are the signing nodes' (x, y) pubkeys in ascending signers_bitmap bit order.
verify_attestation(&attestation, node_count, redundancy_buffer, &ordered_signers)?;Re-exports§
pub use error::AttestationError;pub use payload::Attestation;pub use payload::AttestationPayload;pub use payload::SchnorrSignature;pub use verify::reconstruct_coalition_key;pub use verify::reconstruct_coalition_key_compressed;pub use verify::verify_aggregate_over_hash;pub use verify::verify_attestation;pub use verify::verify_attestation_compressed;pub use verify::SignerXy;pub use bitmap::bitmap_is_subset_u256;pub use bitmap::bitmap_load;pub use bitmap::derive_group_bitmap;pub use bitmap::effective_selection_size;pub use bitmap::for_each_set_bit_u256;pub use coalition::CoalitionAccumulator;pub use message::compute_message_hash;pub use message::MESSAGE_PREFIX;pub use scalar::eth_address_from_uncompressed_pubkey;pub use scalar::evm_schnorr_ecdsa_inputs;pub use scalar::secp256k1_scalar_is_valid_nonzero;pub use selection::derive_selection_bitmap;pub use selection::SELECTION_SEED_PREFIX;pub use onchain::*;pub use state::*;
Modules§
- bitmap
- EVM-compatible
uint256bitmap operations and deterministic selection-group derivation. - coalition
- Incremental coalition-key accumulation (
Σ signer pubkeys) over secp256k1. - error
- Error type for attestation verification.
- message
- EVM-compatible attestation message hash.
- onchain
- Signer resolution and high-level verification over already-parsed registry data.
- payload
- Plain attestation payload and signature structs.
- scalar
- secp256k1 scalar arithmetic and the EVM Schnorr→ECDSA recovery trick.
- selection
- Deterministic selection-bitmap derivation for a
(source_id, registry_version, timestamp)round. - state
- Plain, framework-agnostic inputs to signer resolution.
- verify
- High-level attestation verification over caller-supplied signer pubkeys.