Lines Matching defs:ctx
76 ghash_update_mi(GHASH_CTX *ctx, uint8_t *X, size_t len)
79 uint32_t *s = (uint32_t *)ctx->S;
80 uint32_t *y = (uint32_t *)ctx->Z;
89 ghash_gfmul((uint32_t *)ctx->S, (uint32_t *)ctx->H,
90 (uint32_t *)ctx->S);
96 bcopy(ctx->S, ctx->Z, GMAC_BLOCK_LEN);
104 AES_GMAC_CTX *ctx = xctx;
106 bzero(ctx->ghash.H, GMAC_BLOCK_LEN);
107 bzero(ctx->ghash.S, GMAC_BLOCK_LEN);
108 bzero(ctx->ghash.Z, GMAC_BLOCK_LEN);
109 bzero(ctx->J, GMAC_BLOCK_LEN);
115 AES_GMAC_CTX *ctx = xctx;
117 AES_Setkey(&ctx->K, key, klen - AESCTR_NONCESIZE);
119 bcopy(key + klen - AESCTR_NONCESIZE, ctx->J, AESCTR_NONCESIZE);
121 AES_Encrypt(&ctx->K, ctx->ghash.H, ctx->ghash.H);
127 AES_GMAC_CTX *ctx = xctx;
130 bcopy(iv, ctx->J + AESCTR_NONCESIZE, ivlen);
136 AES_GMAC_CTX *ctx = xctx;
143 (*ghash_update)(&ctx->ghash, (uint8_t *)data,
148 (*ghash_update)(&ctx->ghash, (uint8_t *)blk,
158 AES_GMAC_CTX *ctx = xctx;
163 ctx->J[GMAC_BLOCK_LEN - 1] = 1;
164 AES_Encrypt(&ctx->K, ctx->J, keystream);
166 digest[i] = ctx->ghash.S[i] ^ keystream[i];