INNER CODE UNIT · Rust

block_size

tlsnotary/tlsn · crates/components/cipher/src/lib.rs:238

    fn block_size(&self) -> usize {
        O::SIZE / 8
    }

    /// Returns the length of the keystream in bytes.
    fn len(&self) -> usize {
        self.block_size() * self.blocks.len()
    }
}

fn flatten_blocks(
    vm: &mut dyn Vm<Binary>,
    blocks: impl IntoIterator<Item = Slice>,
) -> Result<Vector<U8>, CipherError> {
    use mpz_circuits::CircuitBuilder;

    let blocks = blocks.into_iter().collect::<Vec<_>>();
    let len: usize = blocks.iter().map(|block| block.len()).sum();

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…