Lines Matching refs:C1_len
116 size_t C1_len = 0; in sm2_ltc_pke_decrypt() local
150 res = sm2_bytes_to_point(C1, <c_key.dp, src, src_len, &C1_len); in sm2_ltc_pke_decrypt()
221 if (src_len <= C1_len + TEE_SM3_HASH_SIZE) { in sm2_ltc_pke_decrypt()
226 C2_len = src_len - C1_len - TEE_SM3_HASH_SIZE; in sm2_ltc_pke_decrypt()
247 dst[i] = src[C1_len + i] ^ t[i]; in sm2_ltc_pke_decrypt()
256 eom[i - out_len] = src[C1_len + i] ^ t[i]; in sm2_ltc_pke_decrypt()
286 if (consttime_memcmp(u, src + C1_len + C2_len, TEE_SM3_HASH_SIZE)) { in sm2_ltc_pke_decrypt()
346 size_t C1_len = 0; in sm2_ltc_pke_encrypt() local
469 C1_len = *dst_len; in sm2_ltc_pke_encrypt()
470 res = sm2_point_to_bytes(dst, &C1_len, C1); in sm2_ltc_pke_encrypt()
474 if (*dst_len < C1_len + src_len + TEE_SM3_HASH_SIZE) { in sm2_ltc_pke_encrypt()
475 *dst_len = C1_len + src_len + TEE_SM3_HASH_SIZE; in sm2_ltc_pke_encrypt()
482 dst[i + C1_len] = src[i] ^ t[i]; in sm2_ltc_pke_encrypt()
501 res = crypto_hash_final(ctx, dst + C1_len + src_len, TEE_SM3_HASH_SIZE); in sm2_ltc_pke_encrypt()
505 *dst_len = C1_len + src_len + TEE_SM3_HASH_SIZE; in sm2_ltc_pke_encrypt()