Lines Matching defs:counter

64 	uint64_t counter;
108 /* ccm_cb is the counter block */
115 * Increment counter. Counter bits are confined
116 * to the bottom 64 bits of the counter block.
118 counter = ntohll(ctx->ccm_cb[1] & ctx->ccm_counter_mask);
119 counter = htonll(counter + 1);
120 counter &= ctx->ccm_counter_mask;
122 (ctx->ccm_cb[1] & ~(ctx->ccm_counter_mask)) | counter;
125 * XOR encrypted counter block with the current clear block.
186 uint64_t counter;
192 /* first counter block start with index 0 */
193 counter = 0;
194 ctx->ccm_cb[1] = (ctx->ccm_cb[1] & ~(ctx->ccm_counter_mask)) | counter;
199 /* calculate XOR of MAC with first counter block */
249 /* calculate the counter mode */
253 /* XOR with counter block */
346 /* XOR with counter block */
370 uint64_t counter;
465 /* Calculate the counter mode, ccm_cb is the counter block */
470 * Increment counter.
473 counter = ntohll(ctx->ccm_cb[1] & ctx->ccm_counter_mask);
474 counter = htonll(counter + 1);
475 counter &= ctx->ccm_counter_mask;
477 (ctx->ccm_cb[1] & ~(ctx->ccm_counter_mask)) | counter;
634 * Format the first block used in CBC-MAC (B0) and the initial counter
635 * block based on formatting functions and counter generation functions
639 * cb0 is the first counter block
677 /* format the counter block */
683 /* copy the nonce value into the counter block */
688 /* Create the mask for the counter field based on the size of nonce */
697 * During calculation, we start using counter block 1, we will
701 * counter block will be used for the counter value.
784 * 1st counter block.
786 * aes_ctx->ccm_iv is used for storing the counter block