• Home
  • Raw
  • Download

Lines Matching refs:ctx

29 	u8 ctx[];  member
45 u8 ctx[]; member
54 struct xcbc_tfm_ctx *ctx = crypto_shash_ctx(parent); in crypto_xcbc_digest_setkey() local
55 u8 *consts = PTR_ALIGN(&ctx->ctx[0], alignmask + 1); in crypto_xcbc_digest_setkey()
60 if ((err = crypto_cipher_setkey(ctx->child, inkey, keylen))) in crypto_xcbc_digest_setkey()
63 crypto_cipher_encrypt_one(ctx->child, consts, (u8 *)ks + bs); in crypto_xcbc_digest_setkey()
64 crypto_cipher_encrypt_one(ctx->child, consts + bs, (u8 *)ks + bs * 2); in crypto_xcbc_digest_setkey()
65 crypto_cipher_encrypt_one(ctx->child, key1, (u8 *)ks); in crypto_xcbc_digest_setkey()
67 return crypto_cipher_setkey(ctx->child, key1, bs); in crypto_xcbc_digest_setkey()
74 struct xcbc_desc_ctx *ctx = shash_desc_ctx(pdesc); in crypto_xcbc_digest_init() local
76 u8 *prev = PTR_ALIGN(&ctx->ctx[0], alignmask + 1) + bs; in crypto_xcbc_digest_init()
78 ctx->len = 0; in crypto_xcbc_digest_init()
90 struct xcbc_desc_ctx *ctx = shash_desc_ctx(pdesc); in crypto_xcbc_digest_update() local
93 u8 *odds = PTR_ALIGN(&ctx->ctx[0], alignmask + 1); in crypto_xcbc_digest_update()
97 if ((ctx->len + len) <= bs) { in crypto_xcbc_digest_update()
98 memcpy(odds + ctx->len, p, len); in crypto_xcbc_digest_update()
99 ctx->len += len; in crypto_xcbc_digest_update()
104 memcpy(odds + ctx->len, p, bs - ctx->len); in crypto_xcbc_digest_update()
105 len -= bs - ctx->len; in crypto_xcbc_digest_update()
106 p += bs - ctx->len; in crypto_xcbc_digest_update()
112 ctx->len = 0; in crypto_xcbc_digest_update()
125 ctx->len = len; in crypto_xcbc_digest_update()
136 struct xcbc_desc_ctx *ctx = shash_desc_ctx(pdesc); in crypto_xcbc_digest_final() local
139 u8 *consts = PTR_ALIGN(&tctx->ctx[0], alignmask + 1); in crypto_xcbc_digest_final()
140 u8 *odds = PTR_ALIGN(&ctx->ctx[0], alignmask + 1); in crypto_xcbc_digest_final()
144 if (ctx->len != bs) { in crypto_xcbc_digest_final()
146 u8 *p = odds + ctx->len; in crypto_xcbc_digest_final()
151 rlen = bs - ctx->len -1; in crypto_xcbc_digest_final()
171 struct xcbc_tfm_ctx *ctx = crypto_tfm_ctx(tfm); in xcbc_init_tfm() local
177 ctx->child = cipher; in xcbc_init_tfm()
184 struct xcbc_tfm_ctx *ctx = crypto_tfm_ctx(tfm); in xcbc_exit_tfm() local
185 crypto_free_cipher(ctx->child); in xcbc_exit_tfm()