Lines Matching defs:counter
22 * NOTE: the IV/counter CTR mode is big-endian. The code itself is
26 /* increment counter (128-bit int) by 1 */
27 static void ctr128_inc(unsigned char *counter)
33 c += counter[n];
34 counter[n] = (u8)c;
40 static void ctr128_inc_aligned(unsigned char *counter)
45 if (IS_LITTLE_ENDIAN || ((size_t)counter % sizeof(size_t)) != 0) {
46 ctr128_inc(counter);
50 data = (size_t *)counter;
63 * The input encrypted as though 128bit counter mode is being used. The
65 * used is contained in *num, and the encrypted counter is kept in
68 * that the counter is in the x lower bits of the IV (ivec), and that the
70 * implementation takes NO responsibility for checking that the counter
137 /* increment upper 96 bits of 128-bit counter by 1 */
138 static void ctr96_inc(unsigned char *counter)
144 c += counter[n];
145 counter[n] = (u8)c;
177 * As (*func) operates on 32-bit counter, caller