Lines Matching refs:GHASH_BLOCK_SIZE
29 #define GHASH_BLOCK_SIZE 16 macro
40 u8 buf[GHASH_BLOCK_SIZE];
84 src += GHASH_BLOCK_SIZE; in ghash_do_update()
87 crypto_xor((u8 *)&dst, in, GHASH_BLOCK_SIZE); in ghash_do_update()
113 #define MAX_BLOCKS (SZ_64K / GHASH_BLOCK_SIZE)
119 unsigned int partial = ctx->count % GHASH_BLOCK_SIZE; in ghash_update()
123 if ((partial + len) >= GHASH_BLOCK_SIZE) { in ghash_update()
128 int p = GHASH_BLOCK_SIZE - partial; in ghash_update()
135 blocks = len / GHASH_BLOCK_SIZE; in ghash_update()
136 len %= GHASH_BLOCK_SIZE; in ghash_update()
146 src += chunk * GHASH_BLOCK_SIZE; in ghash_update()
158 unsigned int partial = ctx->count % GHASH_BLOCK_SIZE; in ghash_final()
163 memset(ctx->buf + partial, 0, GHASH_BLOCK_SIZE - partial); in ghash_final()
191 if (keylen != GHASH_BLOCK_SIZE) in ghash_setkey()
195 memcpy(&key->k, inkey, GHASH_BLOCK_SIZE); in ghash_setkey()
205 .base.cra_blocksize = GHASH_BLOCK_SIZE,
233 u8 key[GHASH_BLOCK_SIZE]; in gcm_setkey()
244 memcpy(&ctx->ghash_key.k, key, GHASH_BLOCK_SIZE); in gcm_setkey()
278 int buf_added = min(count, GHASH_BLOCK_SIZE - *buf_count); in gcm_update_mac()
287 if (count >= GHASH_BLOCK_SIZE || *buf_count == GHASH_BLOCK_SIZE) { in gcm_update_mac()
288 int blocks = count / GHASH_BLOCK_SIZE; in gcm_update_mac()
294 src += blocks * GHASH_BLOCK_SIZE; in gcm_update_mac()
295 count %= GHASH_BLOCK_SIZE; in gcm_update_mac()
309 u8 buf[GHASH_BLOCK_SIZE]; in gcm_calculate_auth_mac()
335 memset(&buf[buf_count], 0, GHASH_BLOCK_SIZE - buf_count); in gcm_calculate_auth_mac()