INNER CODE UNIT · Rust

i

AChep/keyguard-app · thirdParty/rust/ocb3-0.1.0-keyguard/src/lib.rs:251

        let mut i = (processed_bytes / 16) + 1;

        // Then, process the remaining blocks.
        for p_i in buffer[processed_bytes..].chunks_exact_mut(16) {
            let p_i = Block::from_mut_slice(p_i);
            // offset_i = offset_{i-1} xor L_{ntz(i)}
            inplace_xor(&mut offset_i, &self.ll[ntz(i)]);
            // checksum_i = checksum_{i-1} xor p_i
            inplace_xor(&mut checksum_i, p_i);
            // c_i = offset_i xor ENCIPHER(K, p_i xor offset_i)
            let c_i = p_i;
            inplace_xor(c_i, &offset_i);
            self.cipher.encrypt_block(c_i);
            inplace_xor(c_i, &offset_i);

            i += 1;
        }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…