Skip to main content

poly1305_blocks

Function poly1305_blocks 

Source
pub fn poly1305_blocks(
    h: &mut [u64; 5],
    rpow: &[[u64; 5]; 4],
    data: &[u8],
) -> usize
Expand description

Absorbs the longest prefix of data that is a whole number of 64-byte groups into the Poly1305 accumulator, with AVX2: four 16-byte blocks (each with the 2^128 bit) per step in four lanes of radix-2^26 limbs, Horner’s rule with r^4 in each lane and a final multiplication of the lanes by r^4, r^3, r^2 and r. h is the accumulator and rpow holds r, r^2, r^3, r^4, all as five 26-bit limbs (limbs a little above 2^26 are fine; the result has the same form). Returns the number of bytes absorbed: 0 without AVX2. Constant time.