Lines Matching refs:ctx

45 	struct tea_ctx *ctx = crypto_tfm_ctx(tfm);  in tea_setkey()  local
47 ctx->KEY[0] = get_unaligned_le32(&in_key[0]); in tea_setkey()
48 ctx->KEY[1] = get_unaligned_le32(&in_key[4]); in tea_setkey()
49 ctx->KEY[2] = get_unaligned_le32(&in_key[8]); in tea_setkey()
50 ctx->KEY[3] = get_unaligned_le32(&in_key[12]); in tea_setkey()
60 struct tea_ctx *ctx = crypto_tfm_ctx(tfm); in tea_encrypt() local
65 k0 = ctx->KEY[0]; in tea_encrypt()
66 k1 = ctx->KEY[1]; in tea_encrypt()
67 k2 = ctx->KEY[2]; in tea_encrypt()
68 k3 = ctx->KEY[3]; in tea_encrypt()
86 struct tea_ctx *ctx = crypto_tfm_ctx(tfm); in tea_decrypt() local
91 k0 = ctx->KEY[0]; in tea_decrypt()
92 k1 = ctx->KEY[1]; in tea_decrypt()
93 k2 = ctx->KEY[2]; in tea_decrypt()
94 k3 = ctx->KEY[3]; in tea_decrypt()
113 struct xtea_ctx *ctx = crypto_tfm_ctx(tfm); in xtea_setkey() local
115 ctx->KEY[0] = get_unaligned_le32(&in_key[0]); in xtea_setkey()
116 ctx->KEY[1] = get_unaligned_le32(&in_key[4]); in xtea_setkey()
117 ctx->KEY[2] = get_unaligned_le32(&in_key[8]); in xtea_setkey()
118 ctx->KEY[3] = get_unaligned_le32(&in_key[12]); in xtea_setkey()
128 struct xtea_ctx *ctx = crypto_tfm_ctx(tfm); in xtea_encrypt() local
134 y += ((z << 4 ^ z >> 5) + z) ^ (sum + ctx->KEY[sum&3]); in xtea_encrypt()
136 z += ((y << 4 ^ y >> 5) + y) ^ (sum + ctx->KEY[sum>>11 &3]); in xtea_encrypt()
146 struct tea_ctx *ctx = crypto_tfm_ctx(tfm); in xtea_decrypt() local
154 z -= ((y << 4 ^ y >> 5) + y) ^ (sum + ctx->KEY[sum>>11 & 3]); in xtea_decrypt()
156 y -= ((z << 4 ^ z >> 5) + z) ^ (sum + ctx->KEY[sum & 3]); in xtea_decrypt()
168 struct xtea_ctx *ctx = crypto_tfm_ctx(tfm); in xeta_encrypt() local
174 y += (z << 4 ^ z >> 5) + (z ^ sum) + ctx->KEY[sum&3]; in xeta_encrypt()
176 z += (y << 4 ^ y >> 5) + (y ^ sum) + ctx->KEY[sum>>11 &3]; in xeta_encrypt()
186 struct tea_ctx *ctx = crypto_tfm_ctx(tfm); in xeta_decrypt() local
194 z -= (y << 4 ^ y >> 5) + (y ^ sum) + ctx->KEY[sum>>11 & 3]; in xeta_decrypt()
196 y -= (z << 4 ^ z >> 5) + (z ^ sum) + ctx->KEY[sum & 3]; in xeta_decrypt()