| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This appears to be about 5% faster than the current perlasm version on a
modern Intel CPU.
While here rename md5_block_asm_data_order to md5_block_data_order, for
consistency with other hashes.
ok tb@
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
ok jsing
|
|
|
|
|
|
|
| |
Instead of doing a weird dance, set the sign on N in BN_RECP_CTX_create().
Since we're not exposing a general purpose calculator API, we can simplify.
ok jsing
|
| |
|
|
|
|
| |
Requested by jsing
|
|
|
|
|
|
|
|
| |
There's no need for BN_mod_mul_reciprocal() to have this complication.
The caller knows when x == y, so place the burden on the caller. This
simplifies both the caller side and the implementation in bn_recp.c.
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@
|
|
|
|
|
|
|
|
|
|
| |
This macro references variable names that are in the consuming function and
are not actually passed to the macro. Expanding it makes the logic clearer.
If we wanted to reduce code the middle six group of rounds could be
implemented using a for loop (which the compiler can then choose to
unroll).
ok tb@
|
|
|
|
|
|
|
|
| |
load_u32_be() and store_u32_be() are not symmetrical, with load_u32_be()
having a rather unexpected indexing interface. Fix up the callers to
perform their own indexing and use crypto_{load,store}_be32toh() instead.
ok tb@
|
|
|
|
| |
ok tb@
|
|
|
|
|
|
|
| |
No caller ever passes y == NULL, so remove the corresponding contortions
and unindent the relevant bits.
ok jsing
|
|
|
|
| |
ok tb@
|
|
|
|
| |
Also print the iteration number and fix some indentation.
|
| |
|
|
|
|
| |
The API will be removed soon. This prepares moving it to its only consumer.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This introduces a BN_RECP_CTX_create() function that allocates and
populates the BN_RECP_CTX in a single call, without taking an unused
BN_CTX argument.
At the same time, make the N and Nr members BIGNUMs on the heap which
are allocated by BN_RECP_CTX_create() and freed by BN_RECP_CTX_free()
and remove the unnecessary flags argument.
Garbage collect the now unused BN_RECP_CTX_{new,init,set}().
ok jsing
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
As far as I can tell, this way of generating "C code" was only used to add
stuff to pretty regress and even prettier speed "app" and otherwise it just
served to make the library maintainer's lives even more miserable.
ok jsing
|
|
|
|
| |
discussed with jsing
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Like most hashes, MD5 needs to keep count of the number of bits in the
message being processed. However, rather than using a 64 bit counter this
is implemented using two 32 bit values (which is exposed in the public
API). Even with this hurdle, we can still use 64 bit math and let the
compiler figure out how to best handle the situation (hopefully avoiding
compiler warnings on 16 bit platforms in the process!). On amd64 this code
now requires two instructions, instead of the previous five.
While here remove a comment that is excessively visible and no longer
completely accurate (and if you're going to redefine types like MD5_WORD
you kinda need to know what you're doing).
ok tb@ (who's going to miss the dear diary style comments)
|
|
|
|
|
|
|
|
| |
This removes the last in-tree dependency on EC_METHOD_get_field_type()
and EC_GROUP_method_of() and removes some dead code which would generate
code that wouldn't compile if it was reachable.
ok jsing
|
| |
|
|
|
|
|
|
|
| |
It doesn't need to have optional arguments anymore, so we can pass
in values and don't need NULL checks and dereferencing.
ok jsing
|
| |
|
|
|
|
| |
ok cc + sha256
|
|
|
|
|
| |
The only caller ensures that the EC_KEY is not NULL and passes the address
of comp_id on its stack, so neither will be NULL.
|
|
|
|
|
|
|
|
|
| |
If we get here, we're in a server and have managed to load the cert.
The public key is therefore a point on a built-in curve, and we know
the group is defined over some prime field. Now it is just a matter of
figuring out whether we support the group in libssl.
ok jsing
|
|
|
|
| |
ok jsing
|