• Home
  • Raw
  • Download

Lines Matching refs:ctx

30 	u8 ctx[];  member
46 u8 ctx[]; member
55 struct xcbc_tfm_ctx *ctx = crypto_shash_ctx(parent); in crypto_xcbc_digest_setkey() local
56 u8 *consts = PTR_ALIGN(&ctx->ctx[0], alignmask + 1); in crypto_xcbc_digest_setkey()
61 if ((err = crypto_cipher_setkey(ctx->child, inkey, keylen))) in crypto_xcbc_digest_setkey()
64 crypto_cipher_encrypt_one(ctx->child, consts, (u8 *)ks + bs); in crypto_xcbc_digest_setkey()
65 crypto_cipher_encrypt_one(ctx->child, consts + bs, (u8 *)ks + bs * 2); in crypto_xcbc_digest_setkey()
66 crypto_cipher_encrypt_one(ctx->child, key1, (u8 *)ks); in crypto_xcbc_digest_setkey()
68 return crypto_cipher_setkey(ctx->child, key1, bs); in crypto_xcbc_digest_setkey()
75 struct xcbc_desc_ctx *ctx = shash_desc_ctx(pdesc); in crypto_xcbc_digest_init() local
77 u8 *prev = PTR_ALIGN(&ctx->ctx[0], alignmask + 1) + bs; in crypto_xcbc_digest_init()
79 ctx->len = 0; in crypto_xcbc_digest_init()
91 struct xcbc_desc_ctx *ctx = shash_desc_ctx(pdesc); in crypto_xcbc_digest_update() local
94 u8 *odds = PTR_ALIGN(&ctx->ctx[0], alignmask + 1); in crypto_xcbc_digest_update()
98 if ((ctx->len + len) <= bs) { in crypto_xcbc_digest_update()
99 memcpy(odds + ctx->len, p, len); in crypto_xcbc_digest_update()
100 ctx->len += len; in crypto_xcbc_digest_update()
105 memcpy(odds + ctx->len, p, bs - ctx->len); in crypto_xcbc_digest_update()
106 len -= bs - ctx->len; in crypto_xcbc_digest_update()
107 p += bs - ctx->len; in crypto_xcbc_digest_update()
113 ctx->len = 0; in crypto_xcbc_digest_update()
126 ctx->len = len; in crypto_xcbc_digest_update()
137 struct xcbc_desc_ctx *ctx = shash_desc_ctx(pdesc); in crypto_xcbc_digest_final() local
140 u8 *consts = PTR_ALIGN(&tctx->ctx[0], alignmask + 1); in crypto_xcbc_digest_final()
141 u8 *odds = PTR_ALIGN(&ctx->ctx[0], alignmask + 1); in crypto_xcbc_digest_final()
145 if (ctx->len != bs) { in crypto_xcbc_digest_final()
147 u8 *p = odds + ctx->len; in crypto_xcbc_digest_final()
152 rlen = bs - ctx->len -1; in crypto_xcbc_digest_final()
172 struct xcbc_tfm_ctx *ctx = crypto_tfm_ctx(tfm); in xcbc_init_tfm() local
178 ctx->child = cipher; in xcbc_init_tfm()
185 struct xcbc_tfm_ctx *ctx = crypto_tfm_ctx(tfm); in xcbc_exit_tfm() local
186 crypto_free_cipher(ctx->child); in xcbc_exit_tfm()