Lines Matching defs:counter
62 /* NOTE: the IV/counter CTR mode is big-endian. The rest of the Camellia code
64 /* increment counter (128-bit int) by 1 */
65 static void Camellia_ctr128_inc(unsigned char *counter)
69 /* Grab bottom dword of counter and increment */
70 c = GETU32(counter + 12);
72 PUTU32(counter + 12, c);
78 /* Grab 1st dword of counter and increment */
79 c = GETU32(counter + 8);
81 PUTU32(counter + 8, c);
87 /* Grab 2nd dword of counter and increment */
88 c = GETU32(counter + 4);
90 PUTU32(counter + 4, c);
96 /* Grab top dword of counter and increment */
97 c = GETU32(counter + 0);
99 PUTU32(counter + 0, c);
102 /* The input encrypted as though 128bit counter mode is being
105 * encrypted counter is kept in ecount_buf. Both *num and
109 * This algorithm assumes that the counter is in the x lower bits
112 * responsability for checking that the counter doesn't overflow
125 assert(in && out && key && counter && num);