Lines Matching refs:curve

69 			 unsigned int *d, uECC_Curve curve)  in uECC_make_key_with_d()  argument
81 if (EccPoint_compute_public_key(_public, _private, curve)) { in uECC_make_key_with_d()
85 BITS_TO_BYTES(curve->num_n_bits), in uECC_make_key_with_d()
88 curve->num_bytes, in uECC_make_key_with_d()
90 uECC_vli_nativeToBytes(public_key + curve->num_bytes, in uECC_make_key_with_d()
91 curve->num_bytes, in uECC_make_key_with_d()
92 _public + curve->num_words); in uECC_make_key_with_d()
102 int uECC_make_key(uint8_t *public_key, uint8_t *private_key, uECC_Curve curve) in uECC_make_key() argument
119 uECC_vli_mmod(_private, _random, curve->n, BITS_TO_WORDS(curve->num_n_bits)); in uECC_make_key()
122 if (EccPoint_compute_public_key(_public, _private, curve)) { in uECC_make_key()
126 BITS_TO_BYTES(curve->num_n_bits), in uECC_make_key()
129 curve->num_bytes, in uECC_make_key()
131 uECC_vli_nativeToBytes(public_key + curve->num_bytes, in uECC_make_key()
132 curve->num_bytes, in uECC_make_key()
133 _public + curve->num_words); in uECC_make_key()
145 uint8_t *secret, uECC_Curve curve) in uECC_shared_secret() argument
155 wordcount_t num_words = curve->num_words; in uECC_shared_secret()
156 wordcount_t num_bytes = curve->num_bytes; in uECC_shared_secret()
162 BITS_TO_BYTES(curve->num_n_bits)); in uECC_shared_secret()
172 carry = regularize_k(_private, _private, tmp, curve); in uECC_shared_secret()
177 if (!uECC_generate_random_int(p2[carry], curve->p, num_words)) { in uECC_shared_secret()
184 EccPoint_mult(_public, _public, p2[!carry], initial_Z, curve->num_n_bits + 1, in uECC_shared_secret()
185 curve); in uECC_shared_secret()
188 r = !EccPoint_isZero(_public, curve); in uECC_shared_secret()