INNER CODE UNIT · Rust

aggregate_verify

mratsim/constantine · constantine-rust/constantine-ethereum-bls-sig/src/lib.rs:306

pub fn aggregate_verify(
    pubkeys: &[EthBlsPubKey],
    messages: &Vec<Vec<u8>>,
    aggregate_sig: &EthBlsSignature,
) -> Result<bool, ctt_eth_bls_status> {
    // TODO: do we really have to clone here, just to assign to CttSpan due to a *mut field?
    // Funny irony, that we can hand (nested) pointers from Rust (contrary to Go), but pointer
    // sanity logic makes us have to copy anyway?
    let mut msg = messages.clone();
    let spans = to_span(&mut msg);

    unsafe {
        let status = ctt_eth_bls_aggregate_verify(
            pubkeys.as_ptr() as *const ctt_eth_bls_pubkey,
            spans.as_ptr() as *const ctt_span,
            pubkeys.len() as usize,
            aggregate_sig as *const ctt_eth_bls_signature,
        );

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…