Lines Matching refs:uint8_t
29 (b)[(i)] = (uint8_t)((n) >> 24); \
30 (b)[(i) + 1] = (uint8_t)((n) >> 16); \
31 (b)[(i) + 2] = (uint8_t)((n) >> 8); \
32 (b)[(i) + 3] = (uint8_t)((n)); \
43 static const uint8_t SboxTable[16][16] = {
95 static uint8_t sm4Sbox(uint8_t inch) in sm4Sbox()
97 uint8_t *tab = (uint8_t *)SboxTable; in sm4Sbox()
105 uint8_t a[4]; in sm4Lt()
106 uint8_t b[4]; in sm4Lt()
127 uint8_t a[4]; in sm4CalciRK()
128 uint8_t b[4]; in sm4CalciRK()
140 static void sm4_setkey(uint32_t SK[32], const uint8_t key[16]) in sm4_setkey()
163 static void sm4_one_round(uint32_t sk[32], const uint8_t input[16], in sm4_one_round()
164 uint8_t output[16]) in sm4_one_round()
186 void sm4_setkey_enc(struct sm4_context *ctx, const uint8_t key[16]) in sm4_setkey_enc()
192 void sm4_setkey_dec(struct sm4_context *ctx, const uint8_t key[16]) in sm4_setkey_dec()
203 void sm4_crypt_ecb(struct sm4_context *ctx, size_t length, const uint8_t *input, in sm4_crypt_ecb()
204 uint8_t *output) in sm4_crypt_ecb()
216 void sm4_crypt_cbc(struct sm4_context *ctx, size_t length, uint8_t iv[16], in sm4_crypt_cbc()
217 const uint8_t *input, uint8_t *output) in sm4_crypt_cbc()
220 uint8_t temp[16]; in sm4_crypt_cbc()
227 output[i] = (uint8_t)(input[i] ^ iv[i]); in sm4_crypt_cbc()
240 output[i] = (uint8_t)(output[i] ^ iv[i]); in sm4_crypt_cbc()
249 void sm4_crypt_ctr(struct sm4_context *ctx, size_t length, uint8_t ctr[16], in sm4_crypt_ctr()
250 const uint8_t *input, uint8_t *output) in sm4_crypt_ctr()
253 uint8_t temp[16]; in sm4_crypt_ctr()
261 output[i] = (uint8_t)(input[i] ^ ctr[i]); in sm4_crypt_ctr()
274 uint8_t tt = 0; in xts_multi()
275 uint8_t t = 0; in xts_multi()
287 static void xor_128(const uint8_t a[16], const uint8_t b[16], uint8_t c[16]) in xor_128()
296 struct sm4_context *ctx_dk, size_t len, uint8_t *iv, in sm4_crypt_xts()
297 const uint8_t *input, uint8_t *output) in sm4_crypt_xts()
299 uint8_t tweak[16] = { }; in sm4_crypt_xts()
300 uint8_t tweak1[16] = { }; in sm4_crypt_xts()
301 uint8_t ct[16] = { }; in sm4_crypt_xts()