Lines Matching refs:counter
147 uint64_t counter; in gcm_mode_encrypt_contiguous_blocks() local
184 counter = ntohll(ctx->gcm_cb[1] & counter_mask); in gcm_mode_encrypt_contiguous_blocks()
185 counter = htonll(counter + 1); in gcm_mode_encrypt_contiguous_blocks()
186 counter &= counter_mask; in gcm_mode_encrypt_contiguous_blocks()
187 ctx->gcm_cb[1] = (ctx->gcm_cb[1] & ~counter_mask) | counter; in gcm_mode_encrypt_contiguous_blocks()
269 uint64_t counter; in gcm_encrypt_final() local
280 counter = ntohll(ctx->gcm_cb[1] & counter_mask); in gcm_encrypt_final()
281 counter = htonll(counter + 1); in gcm_encrypt_final()
282 counter &= counter_mask; in gcm_encrypt_final()
283 ctx->gcm_cb[1] = (ctx->gcm_cb[1] & ~counter_mask) | counter; in gcm_encrypt_final()
335 uint64_t counter; in gcm_decrypt_incomplete_block() local
343 counter = ntohll(ctx->gcm_cb[1] & counter_mask); in gcm_decrypt_incomplete_block()
344 counter = htonll(counter + 1); in gcm_decrypt_incomplete_block()
345 counter &= counter_mask; in gcm_decrypt_incomplete_block()
346 ctx->gcm_cb[1] = (ctx->gcm_cb[1] & ~counter_mask) | counter; in gcm_decrypt_incomplete_block()
418 uint64_t counter; in gcm_decrypt_final() local
449 counter = ntohll(ctx->gcm_cb[1] & counter_mask); in gcm_decrypt_final()
450 counter = htonll(counter + 1); in gcm_decrypt_final()
451 counter &= counter_mask; in gcm_decrypt_final()
452 ctx->gcm_cb[1] = (ctx->gcm_cb[1] & ~counter_mask) | counter; in gcm_decrypt_final()