summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Remove ECDH errorstb2023-07-286-123/+3
| | | | | | | Much like the ECDSA errors, the ECDH errors have been unused for a while. Garbage collect them. ok jsing
* Remove some unneeded includes from ecdsa.htb2023-07-281-5/+1
|
* Merge ecdsa.h into ec.htb2023-07-284-186/+70
| | | | | | | | | Move the remaining ECDSA API into ec.h to match OpenSSL 1.1's interface better. In particular, the EC_KEY sign and verify method accessors are moved to the right header. Whether the rest of the ECDSA stuff belongs there is debatable, but that was upstream's choice. ok jsing
* Remove ECDSA_METHODtb2023-07-2813-345/+9
| | | | | | | | After smtpd (in base) and libtls finally switched from ECDSA_METHOD to EC_KEY_METHOD, much of the ECDSA_METHOD code was neutered. Remove the remaining public API as well as numerous tentacles into ENGINE. ok jsing
* Remove ecs_err.ctb2023-07-287-132/+4
| | | | | | | These error codes have been unused for a while, so the public API loading them is pointless. ok jsing
* Place public ECDSA API next to the internal methodstb2023-07-281-51/+48
| | | | | | | | | | It is hard to remember that ECDSA_do_{sign,verify}() call ecdsa_sign_sig(). Especially since the distinction to ECDSA_{sign,verify}() isn't clear from the names. To add to the confusion, the public API is ordered differently than the methods they call. So in this case it seems tidier to place the public API next to the methods. ok jsing
* Remove ECDSA_{do_,}sign_ex()tb2023-07-281-57/+20
| | | | | | | | | | | | | There is no reason to keep these. It is cleaner to keep ECDSA_sign_setup() but remove the logic for passed-in kinv and r. Refuse to cooperate as far as possible. Someone could still implement their own versions of ECDSA_{do_,}_sign_ex() and ECDSA_sign_setup() by leveraging EC_KEY_METHOD_get_sign() and building their own wrappers. We can't make such an implementation of ECDSA_sign_setup() fail, but we make the actual signing fail since we no longer "do the right thing". ok jsing
* Make extended ECDSA signing routines internaltb2023-07-285-25/+14
| | | | | | | | | | | | | | | | | | ECDSA_sign_setup() permits precomputing the values of the inverse of the random k and the corresponding r. These can then be fed into the signing routines ECDSA_{do_,}sign_ex() multiple times if needed. This is not a great idea and the interface adds a lot of unwanted complexity. Not to mention that nothing ever used this correctly - if s works out to 0, a special error code is thrown requesting that the caller provide new kinv and r values. Unsurprisingly, nobody ever checked for that special error code. ok jsing This commit marks the start of a libcrypto major bump. Do not build the tree until I bumped the shlib_version and synced file sets (in about 35 commits).
* Remove ASN1_BIT_STRING_set docotb2023-07-281-42/+2
|
* Remove stale .Xr missed in previoustb2023-07-281-3/+2
|
* Remove ASN1_BIT_STRING_num_asc.3tb2023-07-283-151/+3
|
* Prepare the ssltest for the upcoming bumptb2023-07-271-1/+8
| | | | | | | This is a hack. The test is in rather poor shape and it is hard to tell whether it still does what it is supposed to be doing. Hopefully somemone will rewrite this in a style that doesn't make me squeal on opening this file...
* Remove antiquated options outputtb2023-07-273-44/+7
| | | | | | | | This is uninteresting and rather meaningless except for the implementer. No need to have several hundred lines of code backing half a dozen symbols in the public API for this. ok jsing
* Annotate bogus output as incorrecttb2023-07-271-1/+2
| | | | | | Some people already have way too many simple and not too important diffs in their inbox. This isn't worth kicking something more important out of the queue.
* Fix two mandoc -Tlint warnings left in previoustb2023-07-271-4/+3
|
* Fix typotb2023-07-271-3/+3
|
* Prepare this test for the upcoming bumptb2023-07-261-1/+3
|
* Remove comment containing an outdated pathtb2023-07-261-2/+1
|
* Remove ERR_get_{err_state,string}_table documentationtb2023-07-261-6/+2
|
* Remove BUF_reverse and BUF_strdup documentationtb2023-07-261-53/+2
|
* BN_BLINDING will be made internal-only. Remove its documentationtb2023-07-264-325/+5
|
* BIO_f_asn1 and the prefix/suffix API will be removedtb2023-07-265-244/+14
| | | | | | Remove their documentation and mark some associated constants as intentionally undocumented until they will be removed from public headers.
* Document CMS_SignerInfos_get_version and CMS_get_version which willtb2023-07-262-4/+53
| | | | be added in the upcoming bump.
* Tweak EC_GROUP_check_discriminant()tb2023-07-261-28/+28
| | | | | | | | Make the logic and control flow a bit more explicit and use a single extra variable for computing the discriminant. Call it discriminant, not tmp, tmp_1 or tmp_2. ok jsing
* Unindent a big block in EC_GROUP_get_affine_coordinates()tb2023-07-261-32/+34
|
* Introduce and use ec_encode_scalar()tb2023-07-261-43/+48
| | | | | | | | | | | | This introduces two "inverses" of the ec_decode_scalar() function that take a BIGNUM, reduce it modulo p and then encodes it into the curve's field representation. For setting projective coordinates, we need a specialized helper that deals with the Z_is_one optimization that is used to optimize for calculations in standard affine coordinates of the projective plane. This is used for simplifying EC_POINT_set_Jprojective_coordinates() and for cleaning up and streamlining EC_GROUP_set_curve(). ok jsing
* Garbage collect the unused order in check_discriminant()tb2023-07-261-4/+2
| | | | ok jsing
* Streamline check_discriminant()tb2023-07-261-14/+6
| | | | | | Instead of inlining EC_GROUP_get_curve(), we can simply call it... ok jsing
* Introduce ec_decode_scalar()tb2023-07-261-81/+39
| | | | | | | | | This is a helper that decodes a scalar from field-internal representation to a representation as a BIGNUM in the interval [0, p). This simplifies EC_GROUP_get_curve() and EC_POINT_get_Jprojective_coordinates() to a few obvious lines and prepares cleanup in EC_POINT_get_affine_coordinates(). ok jsing
* Use EC_POINT_set_to_infinity() rather than inlining ittb2023-07-261-6/+4
|
* Remove constructor attribute for OPENSSL_cpuid_setup() on arm/aarch64.jsing2023-07-262-10/+2
| | | | | | | | OPENSSL_cpuid_setup() is invoked via OPENSSL_init_crypto(), whihc is triggered by various entry points to the library. As such, we do not need to invoke it as a constructor. ok tb@
* Fix a few more 0/NULL misspellingstb2023-07-251-8/+8
|
* Use [a,b), not [a,b-1] in a commenttb2023-07-251-2/+2
|
* EC_POINT_is_on_curve() error is -1, not 0.tb2023-07-251-2/+2
| | | | ok miod
* Fix two EC_POINT_is_on_curve() checkstb2023-07-242-4/+4
| | | | | | | This API can fail for various reasons, in which case it returns -1, so you need to check if (EC_POINT_is_on_curve_checks(...) <= 0). ok miod
* Fix EC_POINT_is_on_curve() checks.tb2023-07-241-9/+9
| | | | If not even the idiot who invented this API gets this right...
* Fix a minibug in DH_check()tb2023-07-241-2/+2
| | | | | | Or in the flag, don't overwrite the already set ones. ok jsing
* Remove OPENSSL_cpuid_setup() call from OPENSSL_add_all_algorithms_noconf()jsing2023-07-241-2/+1
| | | | | | | | | | OPENSSL_cpuid_setup() used to need to be called from OPENSSL_add_all_algorithms(), as that was the main entry point. These days we do on demand initialisation and there are various paths that lead to OPENSSL_init_crypto() being called, which in turn calls OPENSSL_cpuid_setup(). ok tb@
* Mark read/write registers as non-overlapping for bn_qwmulw_{addqw_,}addw()jsing2023-07-241-3/+3
| | | | | | This does not cause an issue currently, however if called differently to their current usage, it can lead to an input being overwritten and incorrect results being generated.
* Use C99 initializers for x509_name_fftb2023-07-241-8/+8
|
* remove errstr -stats testtb2023-07-241-3/+1
| | | | reminded by anton
* sprinkle some void between () in function definitionstb2023-07-2313-26/+26
|
* Remove -stats option from openssl(1) errstr.tb2023-07-232-41/+5
| | | | | | This is the only consumer of ERR_get_string_table(), which will go away. ok jsing
* Tweak previous. Should have been 60 instead of 64tb2023-07-221-3/+3
|
* Align argument names of OBJ_add_sigid() with the other functions.tb2023-07-221-2/+2
|
* Rewrite obj_xref.ctb2023-07-224-419/+291
| | | | | | | | | | | | Instead of having two unreadable tables placed in a header generated by a janky perl script from an ugly text file, use a single table inlined in the C file. This table is used to translate between signature algorithm OIDs and pairs of OIDs of a message digest and a cipher. The table has fewer than fifty entries and isn't used in a hot path. Using binary search is overkill. Just do two linear searches, one for each translation. None of the original code remains apart from the API. ok jsing
* No need to call OBJ_sigid_free() in EVP_cleanup() anymore.tb2023-07-221-2/+1
| | | | ok jsing
* Neuter OBJ_add_sigid() and OBJ_sigid_free()tb2023-07-221-93/+11
| | | | | | | | | | These functions will be removed in the upcoming bump. Nothing uses them, so it won't hurt if they become noops. This allows us to garbage collect the sig_app and sigx_app stacks and make a first step towards simplifying the OBJ_bsearch_() dances. Also sprinkle some const correctness... because we can. intermediate step towards a diff that is ok jsing
* Adapt bn_print() for EdDSA key printingtb2023-07-221-7/+40
| | | | | | | | This is essentially a reimplementation of ASN1_buf_print(). The latter was only added for these printing purposes and it will be removed again since nothing uses it. We can then simply remove t_pkey.c in the upcoming bump. ok jsing
* Simplify indent handling in bn_print()tb2023-07-221-6/+3
| | | | variant of a suggestion by jsing