Lines Matching refs:input
163 static void sm4_one_round(uint32_t sk[32], const uint8_t input[16], in sm4_one_round()
171 GET_UINT32_BE(ulbuf[0], input, 0); in sm4_one_round()
172 GET_UINT32_BE(ulbuf[1], input, 4); in sm4_one_round()
173 GET_UINT32_BE(ulbuf[2], input, 8); in sm4_one_round()
174 GET_UINT32_BE(ulbuf[3], input, 12); in sm4_one_round()
203 void sm4_crypt_ecb(struct sm4_context *ctx, size_t length, const uint8_t *input, in sm4_crypt_ecb() argument
209 sm4_one_round(ctx->sk, input, output); in sm4_crypt_ecb()
210 input += 16; in sm4_crypt_ecb()
217 const uint8_t *input, uint8_t *output) in sm4_crypt_cbc() argument
227 output[i] = (uint8_t)(input[i] ^ iv[i]); in sm4_crypt_cbc()
230 input += 16; in sm4_crypt_cbc()
237 memcpy(temp, input, 16); in sm4_crypt_cbc()
238 sm4_one_round(ctx->sk, input, output); in sm4_crypt_cbc()
242 input += 16; in sm4_crypt_cbc()
250 const uint8_t *input, uint8_t *output) in sm4_crypt_ctr() argument
261 output[i] = (uint8_t)(input[i] ^ ctr[i]); in sm4_crypt_ctr()
266 input += 16; in sm4_crypt_ctr()
297 const uint8_t *input, uint8_t *output) in sm4_crypt_xts() argument
312 xor_128(input, tweak, ct); in sm4_crypt_xts()
322 input += 16; in sm4_crypt_xts()
330 ct[i] = input[i]; in sm4_crypt_xts()
339 xor_128(input, tweak1, ct); in sm4_crypt_xts()
345 ct[i] = input[16 + i]; in sm4_crypt_xts()