Lines Matching refs:counter
189 // initial counter is constructed from the given |tag| as required by
280 // writes |in_len| & 15 bytes to |out| + |in_len|, based on an initial counter
289 } counter;
290 OPENSSL_memcpy(&counter, tag, sizeof(counter));
291 counter.c[15] |= 0x80;
292 counter.u32[0] += in_len / 16;
295 aes128gcmsiv_ecb_enc_block(&counter.c[0], &counter.c[0], enc_key_expanded);
297 aes256gcmsiv_ecb_enc_block(&counter.c[0], &counter.c[0], enc_key_expanded);
305 last_bytes_out[i] = last_bytes_in[i] ^ counter.c[i];
599 // |in| to |out|, using the block function |enc_block| with |key| in counter
601 // counter mode code in that the counter is handled little-endian, only the
611 } counter;
613 OPENSSL_memcpy(counter.c, initial_counter, AES_BLOCK_SIZE);
614 counter.c[15] |= 0x80;
618 enc_block(counter.c, keystream, key);
619 counter.w[0]++;
699 uint8_t counter[AES_BLOCK_SIZE];
700 OPENSSL_memset(counter, 0, AES_BLOCK_SIZE - EVP_AEAD_AES_GCM_SIV_NONCE_LEN);
701 OPENSSL_memcpy(counter + AES_BLOCK_SIZE - EVP_AEAD_AES_GCM_SIV_NONCE_LEN,
704 counter[0] = i;
707 gcm_siv_ctx->kgk_block(counter, ciphertext, key);