Lines Matching refs:mctx

49 	struct michael_mic_desc_ctx *mctx = shash_desc_ctx(desc);  in michael_init()  local
51 mctx->pending_len = 0; in michael_init()
52 mctx->l = ctx->l; in michael_init()
53 mctx->r = ctx->r; in michael_init()
62 struct michael_mic_desc_ctx *mctx = shash_desc_ctx(desc); in michael_update() local
64 if (mctx->pending_len) { in michael_update()
65 int flen = 4 - mctx->pending_len; in michael_update()
68 memcpy((u8 *)&mctx->pending + mctx->pending_len, data, flen); in michael_update()
69 mctx->pending_len += flen; in michael_update()
73 if (mctx->pending_len < 4) in michael_update()
76 mctx->l ^= le32_to_cpu(mctx->pending); in michael_update()
77 michael_block(mctx->l, mctx->r); in michael_update()
78 mctx->pending_len = 0; in michael_update()
82 mctx->l ^= get_unaligned_le32(data); in michael_update()
83 michael_block(mctx->l, mctx->r); in michael_update()
89 mctx->pending_len = len; in michael_update()
90 memcpy(&mctx->pending, data, len); in michael_update()
99 struct michael_mic_desc_ctx *mctx = shash_desc_ctx(desc); in michael_final() local
100 u8 *data = (u8 *)&mctx->pending; in michael_final()
103 switch (mctx->pending_len) { in michael_final()
105 mctx->l ^= 0x5a; in michael_final()
108 mctx->l ^= data[0] | 0x5a00; in michael_final()
111 mctx->l ^= data[0] | (data[1] << 8) | 0x5a0000; in michael_final()
114 mctx->l ^= data[0] | (data[1] << 8) | (data[2] << 16) | in michael_final()
118 michael_block(mctx->l, mctx->r); in michael_final()
120 michael_block(mctx->l, mctx->r); in michael_final()
122 put_unaligned_le32(mctx->l, out); in michael_final()
123 put_unaligned_le32(mctx->r, out + 4); in michael_final()
132 struct michael_mic_ctx *mctx = crypto_shash_ctx(tfm); in michael_setkey() local
137 mctx->l = get_unaligned_le32(key); in michael_setkey()
138 mctx->r = get_unaligned_le32(key + 4); in michael_setkey()