Lines Matching refs:GHASH_BLOCK_SIZE
30 #define GHASH_BLOCK_SIZE 16 macro
42 u8 buf[GHASH_BLOCK_SIZE];
87 src += GHASH_BLOCK_SIZE; in ghash_do_update()
90 crypto_xor((u8 *)&dst, in, GHASH_BLOCK_SIZE); in ghash_do_update()
116 #define MAX_BLOCKS (SZ_64K / GHASH_BLOCK_SIZE)
122 unsigned int partial = ctx->count % GHASH_BLOCK_SIZE; in ghash_update()
126 if ((partial + len) >= GHASH_BLOCK_SIZE) { in ghash_update()
131 int p = GHASH_BLOCK_SIZE - partial; in ghash_update()
138 blocks = len / GHASH_BLOCK_SIZE; in ghash_update()
139 len %= GHASH_BLOCK_SIZE; in ghash_update()
149 src += chunk * GHASH_BLOCK_SIZE; in ghash_update()
161 unsigned int partial = ctx->count % GHASH_BLOCK_SIZE; in ghash_final()
166 memset(ctx->buf + partial, 0, GHASH_BLOCK_SIZE - partial); in ghash_final()
194 if (keylen != GHASH_BLOCK_SIZE) in ghash_setkey()
198 memcpy(&key->k, inkey, GHASH_BLOCK_SIZE); in ghash_setkey()
208 .base.cra_blocksize = GHASH_BLOCK_SIZE,
236 u8 key[GHASH_BLOCK_SIZE]; in gcm_aes_setkey()
247 memcpy(&ctx->ghash_key.k, key, GHASH_BLOCK_SIZE); in gcm_aes_setkey()
273 int buf_added = min(count, GHASH_BLOCK_SIZE - *buf_count); in gcm_update_mac()
282 if (count >= GHASH_BLOCK_SIZE || *buf_count == GHASH_BLOCK_SIZE) { in gcm_update_mac()
283 int blocks = count / GHASH_BLOCK_SIZE; in gcm_update_mac()
289 src += blocks * GHASH_BLOCK_SIZE; in gcm_update_mac()
290 count %= GHASH_BLOCK_SIZE; in gcm_update_mac()
304 u8 buf[GHASH_BLOCK_SIZE]; in gcm_calculate_auth_mac()
329 memset(&buf[buf_count], 0, GHASH_BLOCK_SIZE - buf_count); in gcm_calculate_auth_mac()