Lines Matching refs:index
347 unsigned int i, index, mask = 0xff; in ecp_sm2p256_point_G_mul_by_scalar() local
355 index = k[0] & mask; in ecp_sm2p256_point_G_mul_by_scalar()
356 if (index) { in ecp_sm2p256_point_G_mul_by_scalar()
357 index = index * 8; in ecp_sm2p256_point_G_mul_by_scalar()
358 memcpy(R->X, ecp_sm2p256_precomputed + index, 32); in ecp_sm2p256_point_G_mul_by_scalar()
359 memcpy(R->Y, ecp_sm2p256_precomputed + index + P256_LIMBS, 32); in ecp_sm2p256_point_G_mul_by_scalar()
364 index = (k[i / 8] >> (8 * (i % 8))) & mask; in ecp_sm2p256_point_G_mul_by_scalar()
366 if (index) { in ecp_sm2p256_point_G_mul_by_scalar()
367 index = index + i * 256; in ecp_sm2p256_point_G_mul_by_scalar()
368 index = index * 8; in ecp_sm2p256_point_G_mul_by_scalar()
369 memcpy(Q.X, ecp_sm2p256_precomputed + index, 32); in ecp_sm2p256_point_G_mul_by_scalar()
370 memcpy(Q.Y, ecp_sm2p256_precomputed + index + P256_LIMBS, 32); in ecp_sm2p256_point_G_mul_by_scalar()
384 unsigned int index, mask = 0x0f; in ecp_sm2p256_point_P_mul_by_scalar() local
408 index = (k[i / 16] >> (4 * (i % 16))) & mask; in ecp_sm2p256_point_P_mul_by_scalar()
411 if (index) { in ecp_sm2p256_point_P_mul_by_scalar()
412 memcpy(R, &precomputed[index], sizeof(P256_POINT)); in ecp_sm2p256_point_P_mul_by_scalar()
420 if (index) in ecp_sm2p256_point_P_mul_by_scalar()
421 ecp_sm2p256_point_add(R, R, &precomputed[index]); in ecp_sm2p256_point_P_mul_by_scalar()