Lines Matching refs:SM4_BLOCK_SIZE
67 memset(&req->iv[SM4_BLOCK_SIZE - l], 0, l); in ccm_format_input()
69 memcpy(info, req->iv, SM4_BLOCK_SIZE); in ccm_format_input()
86 memcpy(&info[SM4_BLOCK_SIZE - l], (u8 *)&len + 4 - l, l); in ccm_format_input()
130 if (len == SM4_BLOCK_SIZE) { in ccm_calculate_auth_mac()
131 if (n < SM4_BLOCK_SIZE) { in ccm_calculate_auth_mac()
137 nblocks = n / SM4_BLOCK_SIZE; in ccm_calculate_auth_mac()
141 ptr += nblocks * SM4_BLOCK_SIZE; in ccm_calculate_auth_mac()
142 n %= SM4_BLOCK_SIZE; in ccm_calculate_auth_mac()
148 l = min(n, SM4_BLOCK_SIZE - len); in ccm_calculate_auth_mac()
168 u8 __aligned(8) ctr0[SM4_BLOCK_SIZE]; in ccm_crypt()
172 memcpy(ctr0, walk->iv, SM4_BLOCK_SIZE); in ccm_crypt()
173 crypto_inc(walk->iv, SM4_BLOCK_SIZE); in ccm_crypt()
181 unsigned int tail = walk->nbytes % SM4_BLOCK_SIZE; in ccm_crypt()
217 u8 __aligned(8) mac[SM4_BLOCK_SIZE]; in ccm_encrypt()
245 u8 __aligned(8) mac[SM4_BLOCK_SIZE]; in ccm_decrypt()
246 u8 authtag[SM4_BLOCK_SIZE]; in ccm_decrypt()
282 .ivsize = SM4_BLOCK_SIZE,
283 .chunksize = SM4_BLOCK_SIZE,
284 .maxauthsize = SM4_BLOCK_SIZE,