INNER CODE UNIT · Rust

batch_verify_parallel

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

pub fn batch_verify_parallel(
    tp: &Threadpool,
    pubkeys: &[EthBlsPubKey],
    messages: &Vec<Vec<u8>>,
    signatures: &[EthBlsSignature],
    secure_random_bytes: &[u8; 32],
) -> 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_batch_verify_parallel(
            tp.get_private_context(),
            pubkeys.as_ptr() as *const ctt_eth_bls_pubkey,
            spans.as_ptr() as *const ctt_span,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…