summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ec/ec_print.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Move the point2bn and point2hex API to ec_convert.ctb2024-10-301-143/+0
| | | | discussed with jsing
* Rewrite EC_POINT_bn2point()tb2024-10-301-28/+15
| | | | | | | | | This is slightly asymmetric with EC_POINT_point2bn() and different from the other "print" functions since it has to deal with the asymmetry between BN_bin2bn() and BN_bn2bin() and allocate itself. Still, we can make this substantially shorter than it previously was. ok jsing
* Rewrite BN_hex2point()tb2024-10-301-11/+12
| | | | | | This can do the reverse dance: chain BN_hex2bn() with EC_POINT_bn2point(). ok jsing
* Rewrite EC_POINT_point2hex()tb2024-10-301-34/+10
| | | | | | | | | | | | Instead of doing everything by hand, this can use EC_POINT_point2bn() and chain it with BN_bn2hex(), slashing the number of lines in half. This removes one of the ten remaining "01234567890ABCDEF" strings from libcrypto. Unfortunately, none of the nine others is used in an API that could convert the octet string directly, so we use that ugly detour via a bignum. Still it's better than what was there. ok jsing
* Rewrite EC_POINT_point2bn()tb2024-10-301-17/+11
| | | | | | | | | While it makes little sens to place either one of the uncompressed, the compressed or the hybrid X9.62 octet string encoding of an elliptic curve point into a BIGNUM, it is what this API does. It's ec_point_to_octets() followed by BN_bin2bn(). ok jsing
* ec_print.c: fix includes.tb2024-10-281-2/+6
| | | | It doesn't currently need ec_local.h, but it will soon, so leave it there.
* ec_print.c: Unwrap a linetb2023-11-211-3/+2
|
* Hide symbols in hkdf, evp, err, ecdsa, and ecbeck2023-07-071-1/+5
| | | | | | (part 2 of commit) ok jsing@
* Fix return check for BN_hex2bn()tb2023-06-231-2/+2
| | | | | | | | Purely cosmetic change taking into account the fact that this function returns a length rather than a boolean. This is the last offender in the library. ok jsing
* Always clear EC groups and points on free.jsing2023-03-081-2/+2
| | | | | | | | | | Rather than sometimes clearing, turn the free functions into ones that always clear (as we've done elsewhere). Turn the EC_GROUP_clear_free() and EC_POINT_clear_free() functions into wrappers that call the *_free() version. Do similar for the EC_METHOD implementations, removing the group_clear_finish() and point_clear_finish() hooks in the process. ok tb@
* Call BN_free() instead of BN_clear_free().jsing2023-03-071-2/+2
| | | | | | | BN_clear_free() is a wrapper that calls BN_free() - call BN_free() directly instead. ok tb@
* Make internal header file names consistenttb2022-11-261-2/+2
| | | | | | | | | | | | | | | | Libcrypto currently has a mess of *_lcl.h, *_locl.h, and *_local.h names used for internal headers. Move all these headers we inherited from OpenSSL to *_local.h, reserving the name *_internal.h for our own code. Similarly, move dtls_locl.h and ssl_locl.h to dtls_local and ssl_local.h. constant_time_locl.h is moved to constant_time.h since it's special. Adjust all .c files in libcrypto, libssl and regress. The diff is mechanical with the exception of tls13_quic.c, where #include <ssl_locl.h> was fixed manually. discussed with jsing, no objection bcook
* Fix an annoying quirk in the EC codetb2022-11-191-9/+9
| | | | | | Dealing with elliptic curves makes some people think that it would be kind of neat to multiply types with variable names. Sometimes. Only in function definitions.
* handle the (impossible) situation of a size_t - 1 buffer fromderaadt2014-12-031-2/+2
| | | | | EC_POINT_point2oct so that later allocation does not overflow with miod
* Spotted another opportunity to use reallocarray().deraadt2014-12-031-2/+2
| | | | ok miod
* tags as requested by miod and teduderaadt2014-06-121-1/+1
|
* malloc() result does not need a cast.deraadt2014-06-071-1/+1
| | | | ok miod
* knf approximationtedu2014-05-061-68/+51
|
* Change library to use intrinsic memory allocation functions instead ofbeck2014-04-171-14/+14
| | | | | | | | OPENSSL_foo wrappers. This changes: OPENSSL_malloc->malloc OPENSSL_free->free OPENSSL_relloc->realloc OPENSSL_freeFunc->free
* import of OpenSSL 0.9.8hdjm2008-09-061-0/+195