| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
The last argument is a pointer to the KDF, so use NULL, not 0.
|
|
|
|
|
|
|
|
| |
Reach into the group (p and order are always available) and use
BN_num_bytes() rather than using clumsy and badly named API.
It's shorter and more readable.
ok jsing
|
|
|
|
|
|
|
| |
With the removal of the EC_POINTs_* API, this header features no arrays
anymore, so this noise can go away.
ok miod
|
|
|
|
|
|
|
|
| |
There are three "X9.62 curve over a 239 bit prime field" and the Brainpool
curves are a pair for each field size thanks to their characteristic twist.
Just include the curve name for each of the curves.
discussed with jsing
|
|
|
|
|
|
|
|
|
|
| |
And another one... Completely overengineered for the sake of academic
credentials and only Ruby ever picked this garbage up. Fortunately, it's
no longer used with LibreSSL since we defanged this in 2018. The latest
version of ruby/openssl has completely removed this as part of their post
1.0.x cleanup.
ok jsing
|
|
|
|
|
|
|
| |
There goes another implementation detail that should never have been leaked
out of the library.
ok jsing
|
|
|
|
|
|
|
| |
These have been noops for a while and as usual some Perl module was the
only thing "using" it.
ok jsing
|
|
|
|
|
|
| |
Without EC_GROUP_new(), this API is useless. There's EC_GROUP_dup().
ok jsing
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is an implementation detail and there is no reason to leak it from
the library.
This removes EC_GFp_{mont,simple}_method(), EC_GROUP_{method_of,new}(),
EC_METHOD_get_field_type(), EC_POINT_method_of() from the public API.
EC_GROUP_copy() is now quite useless, so it will go as well.
ok jsing
|
|
|
|
| |
ok jsing
|
|
|
|
|
|
|
|
| |
This removes the penultimate internal call of BN_MONT_CTX_new(). The last
one could be removed at the cost of introducing a BN_MONT_CTX_dup(), which
probably isn't worth it.
ok jsing
|
|
|
|
| |
discussed with jsing
|
|
|
|
| |
ok jsing
|
|
|
|
|
|
|
|
|
|
|
| |
EC_GROUP_method_of() and EC_METHOD_get_field_type() only ever used chained
together as a convoluted means to retrieve the field type of a group. This
is no longer useful since the answer will always be NID_X9_62_prime_field.
EC_POINT_method_of(), EC_GROUP{,_have}_precompute_mult(): exposed by one of
those expose-everything perl XS modules.
ok jsing
|
|
|
|
| |
ok jsing
|
|
|
|
| |
ok jsing
|
|
|
|
|
|
|
| |
This hasn't done anything in a long time. Only dovecot uses an unchecked
call to this. With this we can remove EC_GROUP_precompute_mult().
ok jsing
|
|
|
|
|
|
|
|
| |
At this point the NID is always NID_X9_62_prime_field, so we can use
SN_X9_62_prime_field directly rather than getting the field type from
the method and then converting the nid to an sn with OBJ_nid2sn().
ok jsing
|
|
|
|
|
|
|
| |
The field_type is always NID_X9_62_prime_field, no need to encode and
retrieve this from the group method.
ok jsing
|
|
|
|
| |
ok jsing
|
|
|
|
|
|
|
|
|
| |
There's no need for a separate mul_generator_ct() function pointer - we
really only need mul_single_ct() and mul_double_nonct(). And rather than
calling ec_mul_ct() and having it figure out which point to use, explicitly
pass the generator point when calling mul_single_ct().
ok tb@
|
|
|
|
| |
The API will be removed soon. This prepares moving it to its only consumer.
|
|
|
|
| |
These somehow escaped a prior pass.
|
|
|
|
|
|
|
| |
This helped a bit with readability when we needed to do &group->p, but now
that's no longer needed.
discussed with jsing
|
|
|
|
|
|
|
|
| |
Add wrapper functions that call the methods so that we can get rid of
inconsistent use of ugly function pointers with massively overlong lines
and other ways of reaching into the methods.
ok jsing
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Only EC_KEY_METHOD_{new,free}() need to know about this flag, so make
that more obvious.
|
| |
|
|
|
|
|
| |
Rename ec_is_on_curve() to ec_point_is_on_curve() and ec_cmp() to
ec_point_cmp().
|
|
|
|
|
| |
These were in the middle of the methods responsible for curve operations,
which makes little sense.
|
|
|
|
|
|
|
|
| |
Now that it is method-agnostic, we can remove the method and move the
implementation to the body of the public API function. And another
method goes away. We're soon down to the ones we really need.
discussed with jsing
|
|
|
|
|
|
|
|
|
|
| |
While this is nicely done, it is a bit too clever. We can do the
calculation in the normal domain rather than the Montgomery domain
and this way the method becomes method agnostic. This will be a bit
slower but since a couple of field operations are nothing compared
to the cost of BN_mod_sqrt() this isn't a concern.
ok jsing
|
|
|
|
| |
discussed with jsing
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
EC_POINTs_mul() was only ever used by Ruby and they stopped doing so for
LibreSSL when we incorporated the constant time multiplication work of
Brumley et al and restricted the length of the points array to 1, making
this API effectively useless. The only real reason you want to have an
API to calculate \sum n_i P_i is for ECDSA where you want m * G + n * P.
Whether something like his needs to be in the public API is doubtful.
EC_POINTs_make_affine() is an implementation detail of EC_POINTs_mul().
As such it never really belonged into the public API.
ok jsing
|
|
|
|
| |
ok jsing
|
|
|
|
|
|
|
|
|
|
| |
Whatever the EC_METHOD, this will always be equivalent to getting and
setting the affine coordinates, so this needs no dedicated method.
Also, this is a function that makes no real sense since a caller should
never need to care about this... As always, our favorite language bindings
thought they might have users who care. This time it's Ruby and Perl.
ok jsing
|
| |
|
|
|
|
| |
requested by jsing
|
| |
|
|
|
|
|
|
|
|
|
|
| |
After possibly decoding a and b in EC_GROUP_get_curve(), this is a pure
calculation in GFp and as such doesn't make use of any method-specifics.
Let's perform this calculation directly in the public API implementation
rather than redirecting through the methods and remove yet another method
handler.
ok jsing
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
The degree made some sense when EC2M was a thing in libcrypto. Fortunately
that's not the case anymore. The order handler never made sense.
ok jsing
|
|
|
|
| |
requested by jsing
|
|
|
|
| |
requested by jsing
|