Lines Matching refs:i

101     int ret, i, j;  in gcm_gen_table()  local
137 for (i = MBEDTLS_GCM_HTABLE_SIZE/4; i > 0; i >>= 1) { in gcm_gen_table()
138 gcm_gen_table_rightshift(ctx->H[i], ctx->H[i*2]); in gcm_gen_table()
143 for (i = MBEDTLS_GCM_HTABLE_SIZE/2; i > 0; i >>= 1) { in gcm_gen_table()
144 MBEDTLS_PUT_UINT64_BE(ctx->H[i][0], &ctx->H[i][0], 0); in gcm_gen_table()
145 MBEDTLS_PUT_UINT64_BE(ctx->H[i][1], &ctx->H[i][1], 0); in gcm_gen_table()
149 for (i = 2; i < MBEDTLS_GCM_HTABLE_SIZE; i <<= 1) { in gcm_gen_table()
150 for (j = 1; j < i; j++) { in gcm_gen_table()
151 mbedtls_xor_no_simd((unsigned char *) ctx->H[i+j], in gcm_gen_table()
152 (unsigned char *) ctx->H[i], in gcm_gen_table()
253 int i; in gcm_mult_largetable() local
263 for (i = 15; i > 0; i--) { in gcm_mult_largetable()
264 mbedtls_xor_no_simd(u8z, u8z, (uint8_t *) H[x[i]], 16); in gcm_mult_largetable()
274 for (i = 15; i > 0; i--) { in gcm_mult_largetable()
275 mbedtls_xor_no_simd(u8z, u8z, (uint8_t *) H[x[i]], 16); in gcm_mult_largetable()
304 int i = 0; in gcm_mult_smalltable() local
321 for (i = 14; i >= 0; i--) { in gcm_mult_smalltable()
322 lo = x[i] & 0xf; in gcm_mult_smalltable()
323 hi = (x[i] >> 4) & 0xf; in gcm_mult_smalltable()
1022 int i, j, ret; in mbedtls_gcm_self_test() local
1052 for (i = 0; i < MAX_TESTS; i++) { in mbedtls_gcm_self_test()
1055 key_len, i, "enc"); in mbedtls_gcm_self_test()
1061 key_test_data[key_index_test_data[i]], in mbedtls_gcm_self_test()
1076 pt_len_test_data[i], in mbedtls_gcm_self_test()
1077 iv_test_data[iv_index_test_data[i]], in mbedtls_gcm_self_test()
1078 iv_len_test_data[i], in mbedtls_gcm_self_test()
1079 additional_test_data[add_index_test_data[i]], in mbedtls_gcm_self_test()
1080 add_len_test_data[i], in mbedtls_gcm_self_test()
1081 pt_test_data[pt_index_test_data[i]], in mbedtls_gcm_self_test()
1086 iv_len_test_data[i] != 12) { in mbedtls_gcm_self_test()
1095 if (memcmp(buf, ct_test_data[j * 6 + i], in mbedtls_gcm_self_test()
1096 pt_len_test_data[i]) != 0 || in mbedtls_gcm_self_test()
1097 memcmp(tag_buf, tag_test_data[j * 6 + i], 16) != 0) { in mbedtls_gcm_self_test()
1112 key_len, i, "dec"); in mbedtls_gcm_self_test()
1116 key_test_data[key_index_test_data[i]], in mbedtls_gcm_self_test()
1123 pt_len_test_data[i], in mbedtls_gcm_self_test()
1124 iv_test_data[iv_index_test_data[i]], in mbedtls_gcm_self_test()
1125 iv_len_test_data[i], in mbedtls_gcm_self_test()
1126 additional_test_data[add_index_test_data[i]], in mbedtls_gcm_self_test()
1127 add_len_test_data[i], in mbedtls_gcm_self_test()
1128 ct_test_data[j * 6 + i], buf, 16, tag_buf); in mbedtls_gcm_self_test()
1134 if (memcmp(buf, pt_test_data[pt_index_test_data[i]], in mbedtls_gcm_self_test()
1135 pt_len_test_data[i]) != 0 || in mbedtls_gcm_self_test()
1136 memcmp(tag_buf, tag_test_data[j * 6 + i], 16) != 0) { in mbedtls_gcm_self_test()
1151 key_len, i, "enc"); in mbedtls_gcm_self_test()
1155 key_test_data[key_index_test_data[i]], in mbedtls_gcm_self_test()
1162 iv_test_data[iv_index_test_data[i]], in mbedtls_gcm_self_test()
1163 iv_len_test_data[i]); in mbedtls_gcm_self_test()
1169 additional_test_data[add_index_test_data[i]], in mbedtls_gcm_self_test()
1170 add_len_test_data[i]); in mbedtls_gcm_self_test()
1175 if (pt_len_test_data[i] > 32) { in mbedtls_gcm_self_test()
1176 size_t rest_len = pt_len_test_data[i] - 32; in mbedtls_gcm_self_test()
1178 pt_test_data[pt_index_test_data[i]], in mbedtls_gcm_self_test()
1189 pt_test_data[pt_index_test_data[i]] + 32, in mbedtls_gcm_self_test()
1200 pt_test_data[pt_index_test_data[i]], in mbedtls_gcm_self_test()
1201 pt_len_test_data[i], in mbedtls_gcm_self_test()
1206 if (olen != pt_len_test_data[i]) { in mbedtls_gcm_self_test()
1216 if (memcmp(buf, ct_test_data[j * 6 + i], in mbedtls_gcm_self_test()
1217 pt_len_test_data[i]) != 0 || in mbedtls_gcm_self_test()
1218 memcmp(tag_buf, tag_test_data[j * 6 + i], 16) != 0) { in mbedtls_gcm_self_test()
1233 key_len, i, "dec"); in mbedtls_gcm_self_test()
1237 key_test_data[key_index_test_data[i]], in mbedtls_gcm_self_test()
1244 iv_test_data[iv_index_test_data[i]], in mbedtls_gcm_self_test()
1245 iv_len_test_data[i]); in mbedtls_gcm_self_test()
1250 additional_test_data[add_index_test_data[i]], in mbedtls_gcm_self_test()
1251 add_len_test_data[i]); in mbedtls_gcm_self_test()
1256 if (pt_len_test_data[i] > 32) { in mbedtls_gcm_self_test()
1257 size_t rest_len = pt_len_test_data[i] - 32; in mbedtls_gcm_self_test()
1259 ct_test_data[j * 6 + i], 32, in mbedtls_gcm_self_test()
1269 ct_test_data[j * 6 + i] + 32, in mbedtls_gcm_self_test()
1280 ct_test_data[j * 6 + i], in mbedtls_gcm_self_test()
1281 pt_len_test_data[i], in mbedtls_gcm_self_test()
1286 if (olen != pt_len_test_data[i]) { in mbedtls_gcm_self_test()
1296 if (memcmp(buf, pt_test_data[pt_index_test_data[i]], in mbedtls_gcm_self_test()
1297 pt_len_test_data[i]) != 0 || in mbedtls_gcm_self_test()
1298 memcmp(tag_buf, tag_test_data[j * 6 + i], 16) != 0) { in mbedtls_gcm_self_test()