ndigits            58 crypto/ecc.c   static u64 *ecc_alloc_digits_space(unsigned int ndigits)
ndigits            60 crypto/ecc.c   	size_t len = ndigits * sizeof(u64);
ndigits            73 crypto/ecc.c   static struct ecc_point *ecc_alloc_point(unsigned int ndigits)
ndigits            80 crypto/ecc.c   	p->x = ecc_alloc_digits_space(ndigits);
ndigits            84 crypto/ecc.c   	p->y = ecc_alloc_digits_space(ndigits);
ndigits            88 crypto/ecc.c   	p->ndigits = ndigits;
ndigits           109 crypto/ecc.c   static void vli_clear(u64 *vli, unsigned int ndigits)
ndigits           113 crypto/ecc.c   	for (i = 0; i < ndigits; i++)
ndigits           118 crypto/ecc.c   bool vli_is_zero(const u64 *vli, unsigned int ndigits)
ndigits           122 crypto/ecc.c   	for (i = 0; i < ndigits; i++) {
ndigits           137 crypto/ecc.c   static bool vli_is_negative(const u64 *vli, unsigned int ndigits)
ndigits           139 crypto/ecc.c   	return vli_test_bit(vli, ndigits * 64 - 1);
ndigits           143 crypto/ecc.c   static unsigned int vli_num_digits(const u64 *vli, unsigned int ndigits)
ndigits           151 crypto/ecc.c   	for (i = ndigits - 1; i >= 0 && vli[i] == 0; i--);
ndigits           157 crypto/ecc.c   static unsigned int vli_num_bits(const u64 *vli, unsigned int ndigits)
ndigits           162 crypto/ecc.c   	num_digits = vli_num_digits(vli, ndigits);
ndigits           174 crypto/ecc.c   void vli_from_be64(u64 *dest, const void *src, unsigned int ndigits)
ndigits           179 crypto/ecc.c   	for (i = 0; i < ndigits; i++)
ndigits           180 crypto/ecc.c   		dest[i] = get_unaligned_be64(&from[ndigits - 1 - i]);
ndigits           184 crypto/ecc.c   void vli_from_le64(u64 *dest, const void *src, unsigned int ndigits)
ndigits           189 crypto/ecc.c   	for (i = 0; i < ndigits; i++)
ndigits           195 crypto/ecc.c   static void vli_set(u64 *dest, const u64 *src, unsigned int ndigits)
ndigits           199 crypto/ecc.c   	for (i = 0; i < ndigits; i++)
ndigits           204 crypto/ecc.c   int vli_cmp(const u64 *left, const u64 *right, unsigned int ndigits)
ndigits           208 crypto/ecc.c   	for (i = ndigits - 1; i >= 0; i--) {
ndigits           223 crypto/ecc.c   		      unsigned int ndigits)
ndigits           228 crypto/ecc.c   	for (i = 0; i < ndigits; i++) {
ndigits           239 crypto/ecc.c   static void vli_rshift1(u64 *vli, unsigned int ndigits)
ndigits           244 crypto/ecc.c   	vli += ndigits;
ndigits           255 crypto/ecc.c   		   unsigned int ndigits)
ndigits           260 crypto/ecc.c   	for (i = 0; i < ndigits; i++) {
ndigits           275 crypto/ecc.c   		    unsigned int ndigits)
ndigits           280 crypto/ecc.c   	for (i = 0; i < ndigits; i++) {
ndigits           297 crypto/ecc.c   		   unsigned int ndigits)
ndigits           302 crypto/ecc.c   	for (i = 0; i < ndigits; i++) {
ndigits           318 crypto/ecc.c   	     unsigned int ndigits)
ndigits           323 crypto/ecc.c   	for (i = 0; i < ndigits; i++) {
ndigits           378 crypto/ecc.c   		     unsigned int ndigits)
ndigits           387 crypto/ecc.c   	for (k = 0; k < ndigits * 2 - 1; k++) {
ndigits           390 crypto/ecc.c   		if (k < ndigits)
ndigits           393 crypto/ecc.c   			min = (k + 1) - ndigits;
ndigits           395 crypto/ecc.c   		for (i = min; i <= k && i < ndigits; i++) {
ndigits           410 crypto/ecc.c   	result[ndigits * 2 - 1] = r01.m_low;
ndigits           415 crypto/ecc.c   		      unsigned int ndigits)
ndigits           420 crypto/ecc.c   	for (k = 0; k < ndigits; k++) {
ndigits           431 crypto/ecc.c   	for (++k; k < ndigits * 2; k++)
ndigits           435 crypto/ecc.c   static void vli_square(u64 *result, const u64 *left, unsigned int ndigits)
ndigits           441 crypto/ecc.c   	for (k = 0; k < ndigits * 2 - 1; k++) {
ndigits           444 crypto/ecc.c   		if (k < ndigits)
ndigits           447 crypto/ecc.c   			min = (k + 1) - ndigits;
ndigits           471 crypto/ecc.c   	result[ndigits * 2 - 1] = r01.m_low;
ndigits           478 crypto/ecc.c   			const u64 *mod, unsigned int ndigits)
ndigits           482 crypto/ecc.c   	carry = vli_add(result, left, right, ndigits);
ndigits           487 crypto/ecc.c   	if (carry || vli_cmp(result, mod, ndigits) >= 0)
ndigits           488 crypto/ecc.c   		vli_sub(result, result, mod, ndigits);
ndigits           495 crypto/ecc.c   			const u64 *mod, unsigned int ndigits)
ndigits           497 crypto/ecc.c   	u64 borrow = vli_sub(result, left, right, ndigits);
ndigits           504 crypto/ecc.c   		vli_add(result, result, mod, ndigits);
ndigits           517 crypto/ecc.c   			      const u64 *mod, unsigned int ndigits)
ndigits           523 crypto/ecc.c   	vli_set(r, product, ndigits * 2);
ndigits           524 crypto/ecc.c   	while (!vli_is_zero(r + ndigits, ndigits)) {
ndigits           525 crypto/ecc.c   		vli_umult(t, r + ndigits, c, ndigits);
ndigits           526 crypto/ecc.c   		vli_clear(r + ndigits, ndigits);
ndigits           527 crypto/ecc.c   		vli_add(r, r, t, ndigits * 2);
ndigits           529 crypto/ecc.c   	vli_set(t, mod, ndigits);
ndigits           530 crypto/ecc.c   	vli_clear(t + ndigits, ndigits);
ndigits           531 crypto/ecc.c   	while (vli_cmp(r, t, ndigits * 2) >= 0)
ndigits           532 crypto/ecc.c   		vli_sub(r, r, t, ndigits * 2);
ndigits           533 crypto/ecc.c   	vli_set(result, r, ndigits);
ndigits           551 crypto/ecc.c   			       const u64 *mod, unsigned int ndigits)
ndigits           560 crypto/ecc.c   	vli_set(m, mod, ndigits);
ndigits           561 crypto/ecc.c   	vli_clear(m + ndigits, ndigits);
ndigits           563 crypto/ecc.c   	vli_set(r, product, ndigits);
ndigits           565 crypto/ecc.c   	vli_set(q, product + ndigits, ndigits);
ndigits           566 crypto/ecc.c   	vli_clear(r + ndigits, ndigits);
ndigits           567 crypto/ecc.c   	carry = vli_is_negative(r, ndigits);
ndigits           569 crypto/ecc.c   		r[ndigits - 1] &= (1ull << 63) - 1;
ndigits           570 crypto/ecc.c   	for (i = 1; carry || !vli_is_zero(q, ndigits); i++) {
ndigits           573 crypto/ecc.c   		vli_umult(qc, q, c2, ndigits);
ndigits           575 crypto/ecc.c   			vli_uadd(qc, qc, mod[0], ndigits * 2);
ndigits           576 crypto/ecc.c   		vli_set(q, qc + ndigits, ndigits);
ndigits           577 crypto/ecc.c   		vli_clear(qc + ndigits, ndigits);
ndigits           578 crypto/ecc.c   		carry = vli_is_negative(qc, ndigits);
ndigits           580 crypto/ecc.c   			qc[ndigits - 1] &= (1ull << 63) - 1;
ndigits           582 crypto/ecc.c   			vli_sub(r, r, qc, ndigits * 2);
ndigits           584 crypto/ecc.c   			vli_add(r, r, qc, ndigits * 2);
ndigits           586 crypto/ecc.c   	while (vli_is_negative(r, ndigits * 2))
ndigits           587 crypto/ecc.c   		vli_add(r, r, m, ndigits * 2);
ndigits           588 crypto/ecc.c   	while (vli_cmp(r, m, ndigits * 2) >= 0)
ndigits           589 crypto/ecc.c   		vli_sub(r, r, m, ndigits * 2);
ndigits           591 crypto/ecc.c   	vli_set(result, r, ndigits);
ndigits           600 crypto/ecc.c   			  unsigned int ndigits)
ndigits           608 crypto/ecc.c   	int shift = (ndigits * 2 * 64) - vli_num_bits(mod, ndigits);
ndigits           614 crypto/ecc.c   		for (i = 0; i < ndigits; ++i) {
ndigits           619 crypto/ecc.c   		vli_set(mod_m + word_shift, mod, ndigits);
ndigits           625 crypto/ecc.c   		for (j = 0; j < ndigits * 2; ++j) {
ndigits           633 crypto/ecc.c   		vli_rshift1(mod_m, ndigits);
ndigits           634 crypto/ecc.c   		mod_m[ndigits - 1] |= mod_m[ndigits] << (64 - 1);
ndigits           635 crypto/ecc.c   		vli_rshift1(mod_m + ndigits, ndigits);
ndigits           637 crypto/ecc.c   	vli_set(result, v[i], ndigits);
ndigits           650 crypto/ecc.c   			     unsigned int ndigits)
ndigits           654 crypto/ecc.c   	const u64 *mu = mod + ndigits;
ndigits           656 crypto/ecc.c   	vli_mult(q, product + ndigits, mu, ndigits);
ndigits           657 crypto/ecc.c   	if (mu[ndigits])
ndigits           658 crypto/ecc.c   		vli_add(q + ndigits, q + ndigits, product + ndigits, ndigits);
ndigits           659 crypto/ecc.c   	vli_mult(r, mod, q + ndigits, ndigits);
ndigits           660 crypto/ecc.c   	vli_sub(r, product, r, ndigits * 2);
ndigits           661 crypto/ecc.c   	while (!vli_is_zero(r + ndigits, ndigits) ||
ndigits           662 crypto/ecc.c   	       vli_cmp(r, mod, ndigits) != -1) {
ndigits           665 crypto/ecc.c   		carry = vli_sub(r, r, mod, ndigits);
ndigits           666 crypto/ecc.c   		vli_usub(r + ndigits, r + ndigits, carry, ndigits);
ndigits           668 crypto/ecc.c   	vli_set(result, r, ndigits);
ndigits           678 crypto/ecc.c   	const unsigned int ndigits = 3;
ndigits           681 crypto/ecc.c   	vli_set(result, product, ndigits);
ndigits           683 crypto/ecc.c   	vli_set(tmp, &product[3], ndigits);
ndigits           684 crypto/ecc.c   	carry = vli_add(result, result, tmp, ndigits);
ndigits           689 crypto/ecc.c   	carry += vli_add(result, result, tmp, ndigits);
ndigits           693 crypto/ecc.c   	carry += vli_add(result, result, tmp, ndigits);
ndigits           695 crypto/ecc.c   	while (carry || vli_cmp(curve_prime, result, ndigits) != 1)
ndigits           696 crypto/ecc.c   		carry -= vli_sub(result, result, curve_prime, ndigits);
ndigits           706 crypto/ecc.c   	const unsigned int ndigits = 4;
ndigits           709 crypto/ecc.c   	vli_set(result, product, ndigits);
ndigits           716 crypto/ecc.c   	carry = vli_lshift(tmp, tmp, 1, ndigits);
ndigits           717 crypto/ecc.c   	carry += vli_add(result, result, tmp, ndigits);
ndigits           723 crypto/ecc.c   	carry += vli_lshift(tmp, tmp, 1, ndigits);
ndigits           724 crypto/ecc.c   	carry += vli_add(result, result, tmp, ndigits);
ndigits           731 crypto/ecc.c   	carry += vli_add(result, result, tmp, ndigits);
ndigits           738 crypto/ecc.c   	carry += vli_add(result, result, tmp, ndigits);
ndigits           745 crypto/ecc.c   	carry -= vli_sub(result, result, tmp, ndigits);
ndigits           752 crypto/ecc.c   	carry -= vli_sub(result, result, tmp, ndigits);
ndigits           759 crypto/ecc.c   	carry -= vli_sub(result, result, tmp, ndigits);
ndigits           766 crypto/ecc.c   	carry -= vli_sub(result, result, tmp, ndigits);
ndigits           770 crypto/ecc.c   			carry += vli_add(result, result, curve_prime, ndigits);
ndigits           773 crypto/ecc.c   		while (carry || vli_cmp(curve_prime, result, ndigits) != 1)
ndigits           774 crypto/ecc.c   			carry -= vli_sub(result, result, curve_prime, ndigits);
ndigits           784 crypto/ecc.c   			  const u64 *curve_prime, unsigned int ndigits)
ndigits           791 crypto/ecc.c   		if (curve_prime[ndigits - 1] == -1ull) {
ndigits           793 crypto/ecc.c   					 ndigits);
ndigits           795 crypto/ecc.c   		} else if (curve_prime[ndigits - 1] == 1ull << 63 &&
ndigits           796 crypto/ecc.c   			   curve_prime[ndigits - 2] == 0) {
ndigits           798 crypto/ecc.c   					  ndigits);
ndigits           801 crypto/ecc.c   		vli_mmod_barrett(result, product, curve_prime, ndigits);
ndigits           805 crypto/ecc.c   	switch (ndigits) {
ndigits           824 crypto/ecc.c   		       const u64 *mod, unsigned int ndigits)
ndigits           828 crypto/ecc.c   	vli_mult(product, left, right, ndigits);
ndigits           829 crypto/ecc.c   	vli_mmod_slow(result, product, mod, ndigits);
ndigits           835 crypto/ecc.c   			      const u64 *curve_prime, unsigned int ndigits)
ndigits           839 crypto/ecc.c   	vli_mult(product, left, right, ndigits);
ndigits           840 crypto/ecc.c   	vli_mmod_fast(result, product, curve_prime, ndigits);
ndigits           845 crypto/ecc.c   				const u64 *curve_prime, unsigned int ndigits)
ndigits           849 crypto/ecc.c   	vli_square(product, left, ndigits);
ndigits           850 crypto/ecc.c   	vli_mmod_fast(result, product, curve_prime, ndigits);
ndigits           859 crypto/ecc.c   			unsigned int ndigits)
ndigits           866 crypto/ecc.c   	if (vli_is_zero(input, ndigits)) {
ndigits           867 crypto/ecc.c   		vli_clear(result, ndigits);
ndigits           871 crypto/ecc.c   	vli_set(a, input, ndigits);
ndigits           872 crypto/ecc.c   	vli_set(b, mod, ndigits);
ndigits           873 crypto/ecc.c   	vli_clear(u, ndigits);
ndigits           875 crypto/ecc.c   	vli_clear(v, ndigits);
ndigits           877 crypto/ecc.c   	while ((cmp_result = vli_cmp(a, b, ndigits)) != 0) {
ndigits           881 crypto/ecc.c   			vli_rshift1(a, ndigits);
ndigits           884 crypto/ecc.c   				carry = vli_add(u, u, mod, ndigits);
ndigits           886 crypto/ecc.c   			vli_rshift1(u, ndigits);
ndigits           888 crypto/ecc.c   				u[ndigits - 1] |= 0x8000000000000000ull;
ndigits           890 crypto/ecc.c   			vli_rshift1(b, ndigits);
ndigits           893 crypto/ecc.c   				carry = vli_add(v, v, mod, ndigits);
ndigits           895 crypto/ecc.c   			vli_rshift1(v, ndigits);
ndigits           897 crypto/ecc.c   				v[ndigits - 1] |= 0x8000000000000000ull;
ndigits           899 crypto/ecc.c   			vli_sub(a, a, b, ndigits);
ndigits           900 crypto/ecc.c   			vli_rshift1(a, ndigits);
ndigits           902 crypto/ecc.c   			if (vli_cmp(u, v, ndigits) < 0)
ndigits           903 crypto/ecc.c   				vli_add(u, u, mod, ndigits);
ndigits           905 crypto/ecc.c   			vli_sub(u, u, v, ndigits);
ndigits           907 crypto/ecc.c   				carry = vli_add(u, u, mod, ndigits);
ndigits           909 crypto/ecc.c   			vli_rshift1(u, ndigits);
ndigits           911 crypto/ecc.c   				u[ndigits - 1] |= 0x8000000000000000ull;
ndigits           913 crypto/ecc.c   			vli_sub(b, b, a, ndigits);
ndigits           914 crypto/ecc.c   			vli_rshift1(b, ndigits);
ndigits           916 crypto/ecc.c   			if (vli_cmp(v, u, ndigits) < 0)
ndigits           917 crypto/ecc.c   				vli_add(v, v, mod, ndigits);
ndigits           919 crypto/ecc.c   			vli_sub(v, v, u, ndigits);
ndigits           921 crypto/ecc.c   				carry = vli_add(v, v, mod, ndigits);
ndigits           923 crypto/ecc.c   			vli_rshift1(v, ndigits);
ndigits           925 crypto/ecc.c   				v[ndigits - 1] |= 0x8000000000000000ull;
ndigits           929 crypto/ecc.c   	vli_set(result, u, ndigits);
ndigits           938 crypto/ecc.c   	return (vli_is_zero(point->x, point->ndigits) &&
ndigits           939 crypto/ecc.c   		vli_is_zero(point->y, point->ndigits));
ndigits           948 crypto/ecc.c   				      u64 *curve_prime, unsigned int ndigits)
ndigits           954 crypto/ecc.c   	if (vli_is_zero(z1, ndigits))
ndigits           958 crypto/ecc.c   	vli_mod_square_fast(t4, y1, curve_prime, ndigits);
ndigits           960 crypto/ecc.c   	vli_mod_mult_fast(t5, x1, t4, curve_prime, ndigits);
ndigits           962 crypto/ecc.c   	vli_mod_square_fast(t4, t4, curve_prime, ndigits);
ndigits           964 crypto/ecc.c   	vli_mod_mult_fast(y1, y1, z1, curve_prime, ndigits);
ndigits           966 crypto/ecc.c   	vli_mod_square_fast(z1, z1, curve_prime, ndigits);
ndigits           969 crypto/ecc.c   	vli_mod_add(x1, x1, z1, curve_prime, ndigits);
ndigits           971 crypto/ecc.c   	vli_mod_add(z1, z1, z1, curve_prime, ndigits);
ndigits           973 crypto/ecc.c   	vli_mod_sub(z1, x1, z1, curve_prime, ndigits);
ndigits           975 crypto/ecc.c   	vli_mod_mult_fast(x1, x1, z1, curve_prime, ndigits);
ndigits           978 crypto/ecc.c   	vli_mod_add(z1, x1, x1, curve_prime, ndigits);
ndigits           980 crypto/ecc.c   	vli_mod_add(x1, x1, z1, curve_prime, ndigits);
ndigits           982 crypto/ecc.c   		u64 carry = vli_add(x1, x1, curve_prime, ndigits);
ndigits           984 crypto/ecc.c   		vli_rshift1(x1, ndigits);
ndigits           985 crypto/ecc.c   		x1[ndigits - 1] |= carry << 63;
ndigits           987 crypto/ecc.c   		vli_rshift1(x1, ndigits);
ndigits           992 crypto/ecc.c   	vli_mod_square_fast(z1, x1, curve_prime, ndigits);
ndigits           994 crypto/ecc.c   	vli_mod_sub(z1, z1, t5, curve_prime, ndigits);
ndigits           996 crypto/ecc.c   	vli_mod_sub(z1, z1, t5, curve_prime, ndigits);
ndigits           998 crypto/ecc.c   	vli_mod_sub(t5, t5, z1, curve_prime, ndigits);
ndigits          1000 crypto/ecc.c   	vli_mod_mult_fast(x1, x1, t5, curve_prime, ndigits);
ndigits          1002 crypto/ecc.c   	vli_mod_sub(t4, x1, t4, curve_prime, ndigits);
ndigits          1004 crypto/ecc.c   	vli_set(x1, z1, ndigits);
ndigits          1005 crypto/ecc.c   	vli_set(z1, y1, ndigits);
ndigits          1006 crypto/ecc.c   	vli_set(y1, t4, ndigits);
ndigits          1011 crypto/ecc.c   		    unsigned int ndigits)
ndigits          1015 crypto/ecc.c   	vli_mod_square_fast(t1, z, curve_prime, ndigits);    /* z^2 */
ndigits          1016 crypto/ecc.c   	vli_mod_mult_fast(x1, x1, t1, curve_prime, ndigits); /* x1 * z^2 */
ndigits          1017 crypto/ecc.c   	vli_mod_mult_fast(t1, t1, z, curve_prime, ndigits);  /* z^3 */
ndigits          1018 crypto/ecc.c   	vli_mod_mult_fast(y1, y1, t1, curve_prime, ndigits); /* y1 * z^3 */
ndigits          1024 crypto/ecc.c   				unsigned int ndigits)
ndigits          1028 crypto/ecc.c   	vli_set(x2, x1, ndigits);
ndigits          1029 crypto/ecc.c   	vli_set(y2, y1, ndigits);
ndigits          1031 crypto/ecc.c   	vli_clear(z, ndigits);
ndigits          1035 crypto/ecc.c   		vli_set(z, p_initial_z, ndigits);
ndigits          1037 crypto/ecc.c   	apply_z(x1, y1, z, curve_prime, ndigits);
ndigits          1039 crypto/ecc.c   	ecc_point_double_jacobian(x1, y1, z, curve_prime, ndigits);
ndigits          1041 crypto/ecc.c   	apply_z(x2, y2, z, curve_prime, ndigits);
ndigits          1049 crypto/ecc.c   		     unsigned int ndigits)
ndigits          1055 crypto/ecc.c   	vli_mod_sub(t5, x2, x1, curve_prime, ndigits);
ndigits          1057 crypto/ecc.c   	vli_mod_square_fast(t5, t5, curve_prime, ndigits);
ndigits          1059 crypto/ecc.c   	vli_mod_mult_fast(x1, x1, t5, curve_prime, ndigits);
ndigits          1061 crypto/ecc.c   	vli_mod_mult_fast(x2, x2, t5, curve_prime, ndigits);
ndigits          1063 crypto/ecc.c   	vli_mod_sub(y2, y2, y1, curve_prime, ndigits);
ndigits          1065 crypto/ecc.c   	vli_mod_square_fast(t5, y2, curve_prime, ndigits);
ndigits          1068 crypto/ecc.c   	vli_mod_sub(t5, t5, x1, curve_prime, ndigits);
ndigits          1070 crypto/ecc.c   	vli_mod_sub(t5, t5, x2, curve_prime, ndigits);
ndigits          1072 crypto/ecc.c   	vli_mod_sub(x2, x2, x1, curve_prime, ndigits);
ndigits          1074 crypto/ecc.c   	vli_mod_mult_fast(y1, y1, x2, curve_prime, ndigits);
ndigits          1076 crypto/ecc.c   	vli_mod_sub(x2, x1, t5, curve_prime, ndigits);
ndigits          1078 crypto/ecc.c   	vli_mod_mult_fast(y2, y2, x2, curve_prime, ndigits);
ndigits          1080 crypto/ecc.c   	vli_mod_sub(y2, y2, y1, curve_prime, ndigits);
ndigits          1082 crypto/ecc.c   	vli_set(x2, t5, ndigits);
ndigits          1090 crypto/ecc.c   		       unsigned int ndigits)
ndigits          1098 crypto/ecc.c   	vli_mod_sub(t5, x2, x1, curve_prime, ndigits);
ndigits          1100 crypto/ecc.c   	vli_mod_square_fast(t5, t5, curve_prime, ndigits);
ndigits          1102 crypto/ecc.c   	vli_mod_mult_fast(x1, x1, t5, curve_prime, ndigits);
ndigits          1104 crypto/ecc.c   	vli_mod_mult_fast(x2, x2, t5, curve_prime, ndigits);
ndigits          1106 crypto/ecc.c   	vli_mod_add(t5, y2, y1, curve_prime, ndigits);
ndigits          1108 crypto/ecc.c   	vli_mod_sub(y2, y2, y1, curve_prime, ndigits);
ndigits          1111 crypto/ecc.c   	vli_mod_sub(t6, x2, x1, curve_prime, ndigits);
ndigits          1113 crypto/ecc.c   	vli_mod_mult_fast(y1, y1, t6, curve_prime, ndigits);
ndigits          1115 crypto/ecc.c   	vli_mod_add(t6, x1, x2, curve_prime, ndigits);
ndigits          1117 crypto/ecc.c   	vli_mod_square_fast(x2, y2, curve_prime, ndigits);
ndigits          1119 crypto/ecc.c   	vli_mod_sub(x2, x2, t6, curve_prime, ndigits);
ndigits          1122 crypto/ecc.c   	vli_mod_sub(t7, x1, x2, curve_prime, ndigits);
ndigits          1124 crypto/ecc.c   	vli_mod_mult_fast(y2, y2, t7, curve_prime, ndigits);
ndigits          1126 crypto/ecc.c   	vli_mod_sub(y2, y2, y1, curve_prime, ndigits);
ndigits          1129 crypto/ecc.c   	vli_mod_square_fast(t7, t5, curve_prime, ndigits);
ndigits          1131 crypto/ecc.c   	vli_mod_sub(t7, t7, t6, curve_prime, ndigits);
ndigits          1133 crypto/ecc.c   	vli_mod_sub(t6, t7, x1, curve_prime, ndigits);
ndigits          1135 crypto/ecc.c   	vli_mod_mult_fast(t6, t6, t5, curve_prime, ndigits);
ndigits          1137 crypto/ecc.c   	vli_mod_sub(y1, t6, y1, curve_prime, ndigits);
ndigits          1139 crypto/ecc.c   	vli_set(x1, t7, ndigits);
ndigits          1145 crypto/ecc.c   			   unsigned int ndigits)
ndigits          1157 crypto/ecc.c   	carry = vli_add(sk[0], scalar, curve->n, ndigits);
ndigits          1158 crypto/ecc.c   	vli_add(sk[1], sk[0], curve->n, ndigits);
ndigits          1160 crypto/ecc.c   	num_bits = sizeof(u64) * ndigits * 8 + 1;
ndigits          1162 crypto/ecc.c   	vli_set(rx[1], point->x, ndigits);
ndigits          1163 crypto/ecc.c   	vli_set(ry[1], point->y, ndigits);
ndigits          1166 crypto/ecc.c   			    ndigits);
ndigits          1171 crypto/ecc.c   			   ndigits);
ndigits          1173 crypto/ecc.c   			 ndigits);
ndigits          1178 crypto/ecc.c   		   ndigits);
ndigits          1182 crypto/ecc.c   	vli_mod_sub(z, rx[1], rx[0], curve_prime, ndigits);
ndigits          1184 crypto/ecc.c   	vli_mod_mult_fast(z, z, ry[1 - nb], curve_prime, ndigits);
ndigits          1186 crypto/ecc.c   	vli_mod_mult_fast(z, z, point->x, curve_prime, ndigits);
ndigits          1189 crypto/ecc.c   	vli_mod_inv(z, z, curve_prime, point->ndigits);
ndigits          1192 crypto/ecc.c   	vli_mod_mult_fast(z, z, point->y, curve_prime, ndigits);
ndigits          1194 crypto/ecc.c   	vli_mod_mult_fast(z, z, rx[1 - nb], curve_prime, ndigits);
ndigits          1197 crypto/ecc.c   	xycz_add(rx[nb], ry[nb], rx[1 - nb], ry[1 - nb], curve_prime, ndigits);
ndigits          1199 crypto/ecc.c   	apply_z(rx[0], ry[0], z, curve_prime, ndigits);
ndigits          1201 crypto/ecc.c   	vli_set(result->x, rx[0], ndigits);
ndigits          1202 crypto/ecc.c   	vli_set(result->y, ry[0], ndigits);
ndigits          1213 crypto/ecc.c   	unsigned int ndigits = curve->g.ndigits;
ndigits          1215 crypto/ecc.c   	vli_set(result->x, q->x, ndigits);
ndigits          1216 crypto/ecc.c   	vli_set(result->y, q->y, ndigits);
ndigits          1217 crypto/ecc.c   	vli_mod_sub(z, result->x, p->x, curve->p, ndigits);
ndigits          1218 crypto/ecc.c   	vli_set(px, p->x, ndigits);
ndigits          1219 crypto/ecc.c   	vli_set(py, p->y, ndigits);
ndigits          1220 crypto/ecc.c   	xycz_add(px, py, result->x, result->y, curve->p, ndigits);
ndigits          1221 crypto/ecc.c   	vli_mod_inv(z, z, curve->p, ndigits);
ndigits          1222 crypto/ecc.c   	apply_z(result->x, result->y, z, curve->p, ndigits);
ndigits          1237 crypto/ecc.c   	unsigned int ndigits = curve->g.ndigits;
ndigits          1239 crypto/ecc.c   	struct ecc_point sum = ECC_POINT_INIT(sump[0], sump[1], ndigits);
ndigits          1251 crypto/ecc.c   	num_bits = max(vli_num_bits(u1, ndigits),
ndigits          1252 crypto/ecc.c   		       vli_num_bits(u2, ndigits));
ndigits          1257 crypto/ecc.c   	vli_set(rx, point->x, ndigits);
ndigits          1258 crypto/ecc.c   	vli_set(ry, point->y, ndigits);
ndigits          1259 crypto/ecc.c   	vli_clear(z + 1, ndigits - 1);
ndigits          1263 crypto/ecc.c   		ecc_point_double_jacobian(rx, ry, z, curve->p, ndigits);
ndigits          1271 crypto/ecc.c   			vli_set(tx, point->x, ndigits);
ndigits          1272 crypto/ecc.c   			vli_set(ty, point->y, ndigits);
ndigits          1273 crypto/ecc.c   			apply_z(tx, ty, z, curve->p, ndigits);
ndigits          1274 crypto/ecc.c   			vli_mod_sub(tz, rx, tx, curve->p, ndigits);
ndigits          1275 crypto/ecc.c   			xycz_add(tx, ty, rx, ry, curve->p, ndigits);
ndigits          1276 crypto/ecc.c   			vli_mod_mult_fast(z, z, tz, curve->p, ndigits);
ndigits          1279 crypto/ecc.c   	vli_mod_inv(z, z, curve->p, ndigits);
ndigits          1280 crypto/ecc.c   	apply_z(rx, ry, z, curve->p, ndigits);
ndigits          1285 crypto/ecc.c   				   unsigned int ndigits)
ndigits          1290 crypto/ecc.c   	for (i = 0; i < ndigits; i++)
ndigits          1291 crypto/ecc.c   		out[i] = be64_to_cpu(src[ndigits - 1 - i]);
ndigits          1295 crypto/ecc.c   			      const u64 *private_key, unsigned int ndigits)
ndigits          1303 crypto/ecc.c   	if (curve->g.ndigits != ndigits)
ndigits          1307 crypto/ecc.c   	if (vli_cmp(one, private_key, ndigits) != -1)
ndigits          1309 crypto/ecc.c   	vli_sub(res, curve->n, one, ndigits);
ndigits          1310 crypto/ecc.c   	vli_sub(res, res, one, ndigits);
ndigits          1311 crypto/ecc.c   	if (vli_cmp(res, private_key, ndigits) != 1)
ndigits          1317 crypto/ecc.c   int ecc_is_key_valid(unsigned int curve_id, unsigned int ndigits,
ndigits          1323 crypto/ecc.c   	nbytes = ndigits << ECC_DIGITS_TO_BYTES_SHIFT;
ndigits          1328 crypto/ecc.c   	return __ecc_is_key_valid(curve, private_key, ndigits);
ndigits          1344 crypto/ecc.c   int ecc_gen_privkey(unsigned int curve_id, unsigned int ndigits, u64 *privkey)
ndigits          1348 crypto/ecc.c   	unsigned int nbytes = ndigits << ECC_DIGITS_TO_BYTES_SHIFT;
ndigits          1349 crypto/ecc.c   	unsigned int nbits = vli_num_bits(curve->n, ndigits);
ndigits          1353 crypto/ecc.c   	if (nbits < 160 || ndigits > ARRAY_SIZE(priv))
ndigits          1376 crypto/ecc.c   	if (__ecc_is_key_valid(curve, priv, ndigits))
ndigits          1379 crypto/ecc.c   	ecc_swap_digits(priv, privkey, ndigits);
ndigits          1385 crypto/ecc.c   int ecc_make_pub_key(unsigned int curve_id, unsigned int ndigits,
ndigits          1393 crypto/ecc.c   	if (!private_key || !curve || ndigits > ARRAY_SIZE(priv)) {
ndigits          1398 crypto/ecc.c   	ecc_swap_digits(private_key, priv, ndigits);
ndigits          1400 crypto/ecc.c   	pk = ecc_alloc_point(ndigits);
ndigits          1406 crypto/ecc.c   	ecc_point_mult(pk, &curve->g, priv, NULL, curve, ndigits);
ndigits          1412 crypto/ecc.c   	ecc_swap_digits(pk->x, public_key, ndigits);
ndigits          1413 crypto/ecc.c   	ecc_swap_digits(pk->y, &public_key[ndigits], ndigits);
ndigits          1428 crypto/ecc.c   	if (WARN_ON(pk->ndigits != curve->g.ndigits))
ndigits          1436 crypto/ecc.c   	if (vli_cmp(curve->p, pk->x, pk->ndigits) != 1)
ndigits          1438 crypto/ecc.c   	if (vli_cmp(curve->p, pk->y, pk->ndigits) != 1)
ndigits          1442 crypto/ecc.c   	vli_mod_square_fast(yy, pk->y, curve->p, pk->ndigits); /* y^2 */
ndigits          1443 crypto/ecc.c   	vli_mod_square_fast(xxx, pk->x, curve->p, pk->ndigits); /* x^2 */
ndigits          1444 crypto/ecc.c   	vli_mod_mult_fast(xxx, xxx, pk->x, curve->p, pk->ndigits); /* x^3 */
ndigits          1445 crypto/ecc.c   	vli_mod_mult_fast(w, curve->a, pk->x, curve->p, pk->ndigits); /* a·x */
ndigits          1446 crypto/ecc.c   	vli_mod_add(w, w, curve->b, curve->p, pk->ndigits); /* a·x + b */
ndigits          1447 crypto/ecc.c   	vli_mod_add(w, w, xxx, curve->p, pk->ndigits); /* x^3 + a·x + b */
ndigits          1448 crypto/ecc.c   	if (vli_cmp(yy, w, pk->ndigits) != 0) /* Equation */
ndigits          1455 crypto/ecc.c   int crypto_ecdh_shared_secret(unsigned int curve_id, unsigned int ndigits,
ndigits          1467 crypto/ecc.c   	    ndigits > ARRAY_SIZE(priv) || ndigits > ARRAY_SIZE(rand_z)) {
ndigits          1472 crypto/ecc.c   	nbytes = ndigits << ECC_DIGITS_TO_BYTES_SHIFT;
ndigits          1476 crypto/ecc.c   	pk = ecc_alloc_point(ndigits);
ndigits          1482 crypto/ecc.c   	ecc_swap_digits(public_key, pk->x, ndigits);
ndigits          1483 crypto/ecc.c   	ecc_swap_digits(&public_key[ndigits], pk->y, ndigits);
ndigits          1488 crypto/ecc.c   	ecc_swap_digits(private_key, priv, ndigits);
ndigits          1490 crypto/ecc.c   	product = ecc_alloc_point(ndigits);
ndigits          1496 crypto/ecc.c   	ecc_point_mult(product, pk, priv, rand_z, curve, ndigits);
ndigits          1498 crypto/ecc.c   	ecc_swap_digits(product->x, secret, ndigits);
ndigits            46 crypto/ecc.h   	u8 ndigits;
ndigits            49 crypto/ecc.h   #define ECC_POINT_INIT(x, y, ndigits)	(struct ecc_point) { x, y, ndigits }
ndigits            83 crypto/ecc.h   int ecc_is_key_valid(unsigned int curve_id, unsigned int ndigits,
ndigits            98 crypto/ecc.h   int ecc_gen_privkey(unsigned int curve_id, unsigned int ndigits, u64 *privkey);
ndigits           111 crypto/ecc.h   int ecc_make_pub_key(const unsigned int curve_id, unsigned int ndigits,
ndigits           129 crypto/ecc.h   int crypto_ecdh_shared_secret(unsigned int curve_id, unsigned int ndigits,
ndigits           156 crypto/ecc.h   bool vli_is_zero(const u64 *vli, unsigned int ndigits);
ndigits           168 crypto/ecc.h   int vli_cmp(const u64 *left, const u64 *right, unsigned int ndigits);
ndigits           183 crypto/ecc.h   	    unsigned int ndigits);
ndigits           192 crypto/ecc.h   void vli_from_be64(u64 *dest, const void *src, unsigned int ndigits);
ndigits           201 crypto/ecc.h   void vli_from_le64(u64 *dest, const void *src, unsigned int ndigits);
ndigits           212 crypto/ecc.h   		 unsigned int ndigits);
ndigits           226 crypto/ecc.h   		       const u64 *mod, unsigned int ndigits);
ndigits            23 crypto/ecc_curve_defs.h 		.ndigits = 3,
ndigits            49 crypto/ecc_curve_defs.h 		.ndigits = 4,
ndigits            17 crypto/ecdh.c  	unsigned int ndigits;
ndigits            40 crypto/ecdh.c  	unsigned int ndigits;
ndigits            45 crypto/ecdh.c  	ndigits = ecdh_supported_curve(params.curve_id);
ndigits            46 crypto/ecdh.c  	if (!ndigits)
ndigits            50 crypto/ecdh.c  	ctx->ndigits = ndigits;
ndigits            53 crypto/ecdh.c  		return ecc_gen_privkey(ctx->curve_id, ctx->ndigits,
ndigits            56 crypto/ecdh.c  	if (ecc_is_key_valid(ctx->curve_id, ctx->ndigits,
ndigits            75 crypto/ecdh.c  	nbytes = ctx->ndigits << ECC_DIGITS_TO_BYTES_SHIFT;
ndigits           102 crypto/ecdh.c  		ret = crypto_ecdh_shared_secret(ctx->curve_id, ctx->ndigits,
ndigits           108 crypto/ecdh.c  		ret = ecc_make_pub_key(ctx->curve_id, ctx->ndigits,
ndigits           138 crypto/ecdh.c  	return ctx->ndigits << (ECC_DIGITS_TO_BYTES_SHIFT + 1);
ndigits            76 crypto/ecrdsa.c 	unsigned int ndigits = req->dst_len / sizeof(u64);
ndigits            84 crypto/ecrdsa.c 	struct ecc_point cc = ECC_POINT_INIT(s, e, ndigits); /* reuse s, e */
ndigits            96 crypto/ecrdsa.c 	    req->dst_len != ctx->curve->g.ndigits * sizeof(u64) ||
ndigits            97 crypto/ecrdsa.c 	    ctx->pub_key.ndigits != ctx->curve->g.ndigits ||
ndigits           110 crypto/ecrdsa.c 	vli_from_be64(s, sig, ndigits);
ndigits           111 crypto/ecrdsa.c 	vli_from_be64(r, sig + ndigits * sizeof(u64), ndigits);
ndigits           114 crypto/ecrdsa.c 	if (vli_is_zero(r, ndigits) ||
ndigits           115 crypto/ecrdsa.c 	    vli_cmp(r, ctx->curve->n, ndigits) == 1 ||
ndigits           116 crypto/ecrdsa.c 	    vli_is_zero(s, ndigits) ||
ndigits           117 crypto/ecrdsa.c 	    vli_cmp(s, ctx->curve->n, ndigits) == 1)
ndigits           122 crypto/ecrdsa.c 	vli_from_le64(e, digest, ndigits);
ndigits           123 crypto/ecrdsa.c 	if (vli_cmp(e, ctx->curve->n, ndigits) == 1)
ndigits           124 crypto/ecrdsa.c 		vli_sub(e, e, ctx->curve->n, ndigits);
ndigits           125 crypto/ecrdsa.c 	if (vli_is_zero(e, ndigits))
ndigits           129 crypto/ecrdsa.c 	vli_mod_inv(v, e, ctx->curve->n, ndigits);
ndigits           132 crypto/ecrdsa.c 	vli_mod_mult_slow(z1, s, v, ctx->curve->n, ndigits);
ndigits           133 crypto/ecrdsa.c 	vli_sub(_r, ctx->curve->n, r, ndigits);
ndigits           134 crypto/ecrdsa.c 	vli_mod_mult_slow(z2, _r, v, ctx->curve->n, ndigits);
ndigits           139 crypto/ecrdsa.c 	if (vli_cmp(cc.x, ctx->curve->n, ndigits) == 1)
ndigits           140 crypto/ecrdsa.c 		vli_sub(cc.x, cc.x, ctx->curve->n, ndigits);
ndigits           143 crypto/ecrdsa.c 	if (!vli_cmp(cc.x, r, ndigits))
ndigits           194 crypto/ecrdsa.c 	unsigned int ndigits;
ndigits           228 crypto/ecrdsa.c 	    ctx->curve->g.ndigits * sizeof(u64) != ctx->digest_len)
ndigits           236 crypto/ecrdsa.c 	    ctx->key_len != ctx->curve->g.ndigits * sizeof(u64) * 2)
ndigits           239 crypto/ecrdsa.c 	ndigits = ctx->key_len / sizeof(u64) / 2;
ndigits           240 crypto/ecrdsa.c 	ctx->pub_key = ECC_POINT_INIT(ctx->_pubp[0], ctx->_pubp[1], ndigits);
ndigits           241 crypto/ecrdsa.c 	vli_from_le64(ctx->pub_key.x, ctx->key, ndigits);
ndigits           242 crypto/ecrdsa.c 	vli_from_le64(ctx->pub_key.y, ctx->key + ndigits * sizeof(u64),
ndigits           243 crypto/ecrdsa.c 		      ndigits);
ndigits           259 crypto/ecrdsa.c 	return ctx->pub_key.ndigits * sizeof(u64);
ndigits            53 crypto/ecrdsa_defs.h 		.ndigits = 256 / 64,
ndigits            86 crypto/ecrdsa_defs.h 		.ndigits = 256 / 64,
ndigits           123 crypto/ecrdsa_defs.h 		.ndigits = 256 / 64,
ndigits           172 crypto/ecrdsa_defs.h 		.ndigits = 512 / 64,
ndigits           217 crypto/ecrdsa_defs.h 		.ndigits = 512 / 64,
ndigits           380 lib/bitmap.c   	int c, old_c, totaldigits, ndigits, nchunks, nbits;
ndigits           389 lib/bitmap.c   		ndigits = totaldigits;
ndigits           430 lib/bitmap.c   		if (ndigits == totaldigits)
ndigits            44 net/bluetooth/ecdh_helper.c static inline void swap_digits(u64 *in, u64 *out, unsigned int ndigits)
ndigits            48 net/bluetooth/ecdh_helper.c 	for (i = 0; i < ndigits; i++)
ndigits            49 net/bluetooth/ecdh_helper.c 		out[i] = __swab64(in[ndigits - 1 - i]);
ndigits           268 scripts/mod/file2alias.c 	int ndigits;
ndigits           285 scripts/mod/file2alias.c 	for (ndigits = 0 ; ndigits < sizeof(bcdDevice_lo) * 2 ; ndigits++) {
ndigits           286 scripts/mod/file2alias.c 		clo = (devlo >> (ndigits << 2)) & 0xf;
ndigits           287 scripts/mod/file2alias.c 		chi = ((devhi > 0x9999 ? 0x9999 : devhi) >> (ndigits << 2)) & 0xf;
ndigits           302 scripts/mod/file2alias.c 	for (ndigits = sizeof(bcdDevice_lo) * 2 - 1; devlo <= devhi; ndigits--) {
ndigits           310 scripts/mod/file2alias.c 		if (devlo == devhi || !ndigits) {
ndigits           311 scripts/mod/file2alias.c 			do_usb_entry(symval, devlo, ndigits, clo, chi, max, mod);
ndigits           319 scripts/mod/file2alias.c 				     ndigits, clo, max, max, mod);
ndigits           325 scripts/mod/file2alias.c 				     ndigits, 0x0, chi, max, mod);