@@ -107,16 +107,16 @@ OPENSSL_EXPORT const BIGNUM *EC_GROUP_get0_order(const EC_GROUP *group);
107107// EC_GROUP_order_bits returns the number of bits of the order of |group|.
108108OPENSSL_EXPORT int EC_GROUP_order_bits (const EC_GROUP * group );
109109
110- // EC_GROUP_get_cofactor sets |*cofactor| to the cofactor of |group| using
111- // |ctx|, if it's not NULL. It returns one on success and zero otherwise .
110+ // EC_GROUP_get_cofactor sets |*cofactor| to the cofactor of |group|. It returns
111+ // one on success and zero otherwise. |ctx| is ignored and may be NULL .
112112OPENSSL_EXPORT int EC_GROUP_get_cofactor (const EC_GROUP * group ,
113113 BIGNUM * cofactor , BN_CTX * ctx );
114114
115115// EC_GROUP_get_curve_GFp gets various parameters about a group. It sets
116116// |*out_p| to the order of the coordinate field and |*out_a| and |*out_b| to
117117// the parameters of the curve when expressed as y² = x³ + ax + b. Any of the
118118// output parameters can be NULL. It returns one on success and zero on
119- // error.
119+ // error. |ctx| is ignored and may be NULL.
120120OPENSSL_EXPORT int EC_GROUP_get_curve_GFp (const EC_GROUP * group , BIGNUM * out_p ,
121121 BIGNUM * out_a , BIGNUM * out_b ,
122122 BN_CTX * ctx );
@@ -169,21 +169,21 @@ OPENSSL_EXPORT int EC_POINT_is_at_infinity(const EC_GROUP *group,
169169
170170// EC_POINT_is_on_curve returns one if |point| is an element of |group| and
171171// and zero otherwise or when an error occurs. This is different from OpenSSL,
172- // which returns -1 on error. If |ctx| is non-NULL, it may be used .
172+ // which returns -1 on error. |ctx| is ignored and may be NULL .
173173OPENSSL_EXPORT int EC_POINT_is_on_curve (const EC_GROUP * group ,
174174 const EC_POINT * point , BN_CTX * ctx );
175175
176176// EC_POINT_cmp returns zero if |a| is equal to |b|, greater than zero if
177- // not equal and -1 on error. If |ctx| is not NULL, it may be used .
177+ // not equal and -1 on error. |ctx| is ignored and may be NULL .
178178OPENSSL_EXPORT int EC_POINT_cmp (const EC_GROUP * group , const EC_POINT * a ,
179179 const EC_POINT * b , BN_CTX * ctx );
180180
181181
182182// Point conversion.
183183
184184// EC_POINT_get_affine_coordinates_GFp sets |x| and |y| to the affine value of
185- // |point| using |ctx|, if it's not NULL . It returns one on success and zero
186- // otherwise .
185+ // |point|. It returns one on success and zero otherwise. |ctx| is ignored and
186+ // may be NULL .
187187//
188188// Either |x| or |y| may be NULL to skip computing that coordinate. This is
189189// slightly faster in the common case where only the x-coordinate is needed.
@@ -200,9 +200,8 @@ OPENSSL_EXPORT int EC_POINT_get_affine_coordinates(const EC_GROUP *group,
200200 BN_CTX * ctx );
201201
202202// EC_POINT_set_affine_coordinates_GFp sets the value of |point| to be
203- // (|x|, |y|). The |ctx| argument may be used if not NULL. It returns one
204- // on success or zero on error. It's considered an error if the point is not on
205- // the curve.
203+ // (|x|, |y|). |ctx| is ignored and may be NULL. It returns one on success or
204+ // zero on error. It's considered an error if the point is not on the curve.
206205//
207206// Note that the corresponding function in OpenSSL versions prior to 1.0.2s does
208207// not check if the point is on the curve. This is a security-critical check, so
@@ -226,7 +225,7 @@ OPENSSL_EXPORT int EC_POINT_set_affine_coordinates(const EC_GROUP *group,
226225// EC_POINT_point2oct serialises |point| into the X9.62 form given by |form|
227226// into, at most, |max_out| bytes at |buf|. It returns the number of bytes
228227// written or zero on error if |buf| is non-NULL, else the number of bytes
229- // needed. The |ctx| argument may be used if not NULL.
228+ // needed. |ctx| is ignored and may be NULL.
230229OPENSSL_EXPORT size_t EC_POINT_point2oct (const EC_GROUP * group ,
231230 const EC_POINT * point ,
232231 point_conversion_form_t form ,
@@ -236,30 +235,31 @@ OPENSSL_EXPORT size_t EC_POINT_point2oct(const EC_GROUP *group,
236235// EC_POINT_point2buf serialises |point| into the X9.62 form given by |form| to
237236// a newly-allocated buffer and sets |*out_buf| to point to it. It returns the
238237// length of the result on success or zero on error. The caller must release
239- // |*out_buf| with |OPENSSL_free| when done.
238+ // |*out_buf| with |OPENSSL_free| when done. |ctx| is ignored and may be NULL.
240239OPENSSL_EXPORT size_t EC_POINT_point2buf (const EC_GROUP * group ,
241240 const EC_POINT * point ,
242241 point_conversion_form_t form ,
243242 uint8_t * * out_buf , BN_CTX * ctx );
244243
245244// EC_POINT_point2cbb behaves like |EC_POINT_point2oct| but appends the
246- // serialised point to |cbb|. It returns one on success and zero on error.
245+ // serialised point to |cbb|. It returns one on success and zero on error. |ctx|
246+ // is ignored and may be NULL.
247247OPENSSL_EXPORT int EC_POINT_point2cbb (CBB * out , const EC_GROUP * group ,
248248 const EC_POINT * point ,
249249 point_conversion_form_t form ,
250250 BN_CTX * ctx );
251251
252252// EC_POINT_oct2point sets |point| from |len| bytes of X9.62 format
253- // serialisation in |buf|. It returns one on success and zero on error. The
254- // |ctx| argument may be used if not NULL. It's considered an error if |buf|
255- // does not represent a point on the curve.
253+ // serialisation in |buf|. It returns one on success and zero on error. |ctx|
254+ // may be NULL. It's considered an error if |buf| does not represent a point on
255+ // the curve.
256256OPENSSL_EXPORT int EC_POINT_oct2point (const EC_GROUP * group , EC_POINT * point ,
257257 const uint8_t * buf , size_t len ,
258258 BN_CTX * ctx );
259259
260260// EC_POINT_set_compressed_coordinates_GFp sets |point| to equal the point with
261261// the given |x| coordinate and the y coordinate specified by |y_bit| (see
262- // X9.62). It returns one on success and zero otherwise.
262+ // X9.62). It returns one on success and zero otherwise. |ctx| may be NULL.
263263OPENSSL_EXPORT int EC_POINT_set_compressed_coordinates_GFp (
264264 const EC_GROUP * group , EC_POINT * point , const BIGNUM * x , int y_bit ,
265265 BN_CTX * ctx );
@@ -268,23 +268,23 @@ OPENSSL_EXPORT int EC_POINT_set_compressed_coordinates_GFp(
268268// Group operations.
269269
270270// EC_POINT_add sets |r| equal to |a| plus |b|. It returns one on success and
271- // zero otherwise. If |ctx| is not NULL, it may be used .
271+ // zero otherwise. |ctx| is ignored and may be NULL .
272272OPENSSL_EXPORT int EC_POINT_add (const EC_GROUP * group , EC_POINT * r ,
273273 const EC_POINT * a , const EC_POINT * b ,
274274 BN_CTX * ctx );
275275
276276// EC_POINT_dbl sets |r| equal to |a| plus |a|. It returns one on success and
277- // zero otherwise. If |ctx| is not NULL, it may be used .
277+ // zero otherwise. |ctx| is ignored and may be NULL .
278278OPENSSL_EXPORT int EC_POINT_dbl (const EC_GROUP * group , EC_POINT * r ,
279279 const EC_POINT * a , BN_CTX * ctx );
280280
281281// EC_POINT_invert sets |a| equal to minus |a|. It returns one on success and
282- // zero otherwise. If |ctx| is not NULL, it may be used .
282+ // zero otherwise. |ctx| is ignored and may be NULL .
283283OPENSSL_EXPORT int EC_POINT_invert (const EC_GROUP * group , EC_POINT * a ,
284284 BN_CTX * ctx );
285285
286286// EC_POINT_mul sets r = generator*n + q*m. It returns one on success and zero
287- // otherwise. If |ctx| is not NULL, it may be used .
287+ // otherwise. |ctx| may be NULL .
288288OPENSSL_EXPORT int EC_POINT_mul (const EC_GROUP * group , EC_POINT * r ,
289289 const BIGNUM * n , const EC_POINT * q ,
290290 const BIGNUM * m , BN_CTX * ctx );
@@ -368,8 +368,8 @@ OPENSSL_EXPORT int EC_GROUP_set_generator(EC_GROUP *group,
368368 const BIGNUM * cofactor );
369369
370370// EC_GROUP_get_order sets |*order| to the order of |group|, if it's not
371- // NULL. It returns one on success and zero otherwise. |ctx| is ignored. Use
372- // |EC_GROUP_get0_order| instead.
371+ // NULL. It returns one on success and zero otherwise. |ctx| is ignored and may
372+ // be NULL. Use |EC_GROUP_get0_order| instead.
373373OPENSSL_EXPORT int EC_GROUP_get_order (const EC_GROUP * group , BIGNUM * order ,
374374 BN_CTX * ctx );
375375
0 commit comments