summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove less than useful comment.jsing2025-06-281-8/+1
|
* Add CLMUL and MMX to machine dependent CPU capabilities for i386.jsing2025-06-282-4/+10
| | | | ok tb@
* Add CLMUL to machine dependent CPU capabilities for amd64.jsing2025-06-282-4/+7
| | | | ok tb@
* Simplify EVP AES-GCM implementation and remove AES-NI specific code.jsing2025-06-273-175/+31
| | | | | | | | | | | | Like CTR, the mode implementation for GCM has two variants - rather than using multiple variants (one for AES-NI, another for non-AES-NI), consistently use CRYPTO_gcm128_{en,de}crypt_ctr32() with the aes_ctr32_encrypt_internal() function added for CTR mode. This lets us remove the AES-NI specific code, AES-NI specific EVP_CIPHER methods and the ctr function pointer from EVP_AES_GCM_CTX. ok tb@
* Move AES-NI from EVP to AES for CTR mode.jsing2025-06-276-76/+95
| | | | | | | | | | | | | | | | | | | | The mode implementation for CTR has two variants - one takes the block function, while the other takes a "ctr32" function. The latter is expected to handle the lower 32 bits of the IV/counter, but is not expected to handle overflow. The AES-NI implementation for CTR currently uses the second variant. Provide aes_ctr32_encrypt_internal() as a function that can be replaced on a machine dependent basis, along with an aes_ctr32_encrypt_generic() function that provides the default implementation and can be used as a fallback. Wire up the AES-NI version for amd64 and i386, change AES_ctr128_encrypt() to use CRYPTO_ctr128_encrypt_ctr32() (which calls aes_ctr32_encrypt_internal()) and remove the various AES-NI specific EVP_CIPHER methods for CTR. Callers of AES_ctr128_encrypt() will now use AES-NI, if available. ok tb@
* Remove unused defines from aes_local.h.jsing2025-06-271-5/+1
| | | | | | | | | MAXKB was added in OpenSSL commit deb2c1a1 and appears to have never been used, while MAXKC (originally RIJNDAEL_MAXKC) stopped being used in that same commit. MAXNR is also unused - AES_MAXNR exists in the public header. ok tb@
* X509_print and friends: switch from BIO_write() to BIO_printf()tb2025-06-251-17/+16
| | | | | | Manually counting letters in const strings is ... suboptimal. ok beck jsing
* Remove AES-NI specific EVP_CIPHER methods for CFB/CFB1/CFB8.jsing2025-06-161-205/+1
| | | | | | These now end up in aesni_encrypt() via AES_encrypt(), when appropriate. ok tb@
* Remove AES-NI specific EVP_CIPHER methods for OFB.jsing2025-06-161-64/+1
| | | | | | These now end up in aesni_encrypt() via AES_encrypt(), when appropriate. ok tb@
* Remove AES-NI specific EVP_CIPHER methods for CBC.jsing2025-06-161-66/+1
| | | | | | | These now end up in aesni_cbc_encrypt() via AES_cbc_encrypt(), when appropriate. ok tb@
* strip the temporary filename when displaying a verification error;sthen2025-06-161-1/+2
| | | | avoids unnecessary diff in output between runs
* crypto_ex_data: use same sizeof idiom as everywhere else in our own codetb2025-06-151-7/+6
| | | | ok beck
* Remove aesni_init_key().jsing2025-06-151-47/+22
| | | | | | | | The various methods can now use the regular init key functions, since the call to AES_set_{en,de}crypt_key() will be routed to the AES-NI implementation, if supported. ok tb@
* Integrate AES-NI into the AES code.jsing2025-06-156-62/+270
| | | | | | | | | | Currently, the AES-NI code is only integrated into EVP - add code to integrate AES-NI into AES. Rename the assembly provided functions and provide C versions for the original names, which check for AES-NI support and dispatch to the appropriate function. This means that the AES_* public API will now use AES-NI, if available. ok tb@
* Provide machine dependent CPU capabilities for i386.jsing2025-06-152-3/+17
| | | | | | This indicates if AES-NI is available via CRYPTO_CPU_CAPS_I386_AES. ok tb@
* Provide CRYPTO_CPU_CAPS_AMD64_AES in machine dependent CPU capabilities.jsing2025-06-152-4/+7
| | | | ok tb@
* Fix signature of BN_zerotb2025-06-141-5/+4
| | | | This was changed a bit more than two years ago.
* The mdoc(7) .Ft macro does not need quoting of its arguments, but aboutschwarze2025-06-1314-86/+86
| | | | | | | 10% of our manual pages using this macro employed useless quoting anyway. Remove these quotes such that they do not incite fear, uncertainty, and doubt in developers who happen to look at these pages. jmc@ and tb@ agree with the direction.
* Bring the DESCRIPTION a bit closer to reality, in particular stopschwarze2025-06-121-7/+31
| | | | | | | | claiming that the "add" functions add anything. Indicate that they are mostly NOOPs nowadays, but without being overly specific. Also, more explicitly discourage abusing OpenSSL_add_all_algorithms(3) for loadiing a configuration file. Guidance and OK tb@.
* EC_GROUP_check: rephrase a sentence so it's a bit less awkwardtb2025-06-111-5/+7
|
* The functions SMIME_read_ASN1(3) and SMIME_write_ASN1(3)schwarze2025-06-113-290/+1
| | | | | are no longer public, so delete their manual pages. OK tb@
* Since the function SMIME_write_ASN1(3) is no longer public, move theschwarze2025-06-112-63/+181
| | | | | | | descriptions of CMS_REUSE_DIGEST, PKCS7_REUSE_DIGEST, SMIME_BINARY, and SMIME_CRLFEOL and some improved wordings from that former page to SMIME_write_CMS(3) and SMIME_write_PKCS7(3), with some further polishing. Feedback and OK tb@.
* pk7_asn1: delete lines containing nothing but a tabtb2025-06-111-7/+1
|
* Lie less below RETURN VALUES, add a related BUGS entry,schwarze2025-06-112-10/+24
| | | | | | and since SMIME_write_ASN1(3) is no longer public, replace the .Xr to it with some other pointers. OK tb@
* SMIME_read_ASN1(3) and SMIME_write_ASN1(3) are no longer public,schwarze2025-06-114-12/+18
| | | | | | so link to SMIME_read_CMS(3), SMIME_read_PKCS7(3), SMIME_write_CMS(3), and/or SMIME_write_PKCS7(3) instead; OK tb@
* SMIME_read_ASN1(3) is no longer public,schwarze2025-06-112-6/+12
| | | | | | so link to SMIME_read_CMS(3) or SMIME_read_PKCS7(3) instead, and sprinkle a few other .Xrs that may be helpful; OK tb@
* Explain why we still need OPENSSL_init() (autoconf)tb2025-06-111-1/+5
|
* Remove BF_PTRtb2025-06-1114-109/+3
| | | | | | | | | | | | In bf_local.h r1.2, openssl/opensslconf.h was pulled out of the HEADER_BF_LOCL_H header guard, so BF_PTR was never defined from opensslfeatures.h. Thus, alpha, mips64, sparc64 haven't used the path that is supposedly optimized for them. On the M3k the speed gain of bf-cbc with BF_PTR is roughly 5%, so not really great. This is blowfish, so I don't think we want to carry complications for alpha and mips64 only. ok jsing kenjiro
* err.c: fix previous: 8 spaces -> tabtb2025-06-101-2/+2
|
* Fix comment: unsigned int, not just inttb2025-06-091-2/+2
|
* one DES_LONG hid in arch/sh/opensslconf.htb2025-06-091-8/+0
|
* Move (mostly) MI constants to proper headerstb2025-06-0918-416/+36
| | | | | | | | | | | | | | | | | Most of the constants here are only defined if a specific header is in scope. So move the machine-independent macros to those headers and lose the header guards. Most of these should actually be typedefs but let's change this when we're bumping the major since this technically has ABI impact. IDEA_INT RC2_INT and RC4_INT are always unsigned int DES_LONG is always unsigned int except on i386 This preserves the existing situation on OpenBSD. If you're using portable on i386 with a compiler that does not define __i386__, there's an ABI break. ok jsing
* Make OPENSSL_IA32_SSE2 the default for i386 and remove the flag.jsing2025-06-098-23/+9
| | | | | | | | | | | | | | | | | The OPENSSL_IA32_SSE2 flag controls whether a number of the perlasm scripts generate additional implementations that use SSE2 functionality. In all cases except ghash, the code checks OPENSSL_ia32cap_P for SSE2 support, before trying to run SSE2 code. For ghash it generates a CLMUL based implementation in addition to different MMX version (one MMX version hides behind OPENSSL_IA32_SSE2, the other does not), however this does not appear to actually use SSE2. We also disable AES-NI on i386 if OPENSSL_IA32_SSE2. On OpenBSD, we've always defined OPENSSL_IA32_SSE2 so this is effectively a no-op. The only change is that we now check MMX rather than SSE2 for the ghash MMX implementation. ok bcook@ beck@
* Remove GNU assembler version check.jsing2025-06-091-4/+1
| | | | | | | | GNU assembler version 2.19 was released in 2014, so it does not seem unreasonable to expect that we have an assembler that supports AVX. Furthermore, the current check fails on LLVM. ok bcook@ beck@
* Stop defining OPENSSL_IA32_SSE2 on amd64.jsing2025-06-091-2/+1
| | | | | | This no longer does anything on this architecture. ok bcook@ beck@
* Retire the manual pages OPENSSL_load_builtin_modules(3) and OBJ_NAME_add(3)schwarze2025-06-097-456/+25
| | | | | because these functions no longer exist. OK tb@
* EVP_cleanup(3) is no longer relevant here since it no longer has any effect.schwarze2025-06-091-3/+2
| | | | OK tb@
* This file is no longer relevant because the function CONF_module_add()schwarze2025-06-091-73/+0
| | | | | | | is no longer public. Even though ASN1_add_oid_module() still exists as an internal function, this file contains more misleading (DSO, OPENSSL_load_builtin_modules) than useful information, so delete it. OK tb@
* mention that SSL_load_error_strings(3) lives in libssl;schwarze2025-06-081-1/+3
| | | | "sounds good" tb@
* .Lb libcrypto ; OK tb@schwarze2025-06-08411-822/+1233
|
* remove some "intentionally undocumented" comments regarding stuffschwarze2025-06-089-37/+27
| | | | | that no longer exists, and add .Lb; OK tb@
* add the missing .In line and add .Lb libcrypto ; OK tb@schwarze2025-06-082-4/+8
|
* Remove ${MULTIPLE_OF_EIGHT}_BIT*tb2025-06-0813-144/+0
| | | | | | | | These are unused internally and very few things look at them, none of which should really matter to us, except possibly free pascal on Windows. sizeof has been available since forever... ok jsing
* More code clean up.jsing2025-06-081-10/+9
| | | | | Fix some things that got missed in the last pass - the majority is use of post-increment rather than unnecessary pre-increment.
* Remove more mess related to arm assembly.jsing2025-06-081-23/+1
|
* Garbage collect DES_PTRtb2025-06-0813-78/+0
| | | | pointed out by/ok jsing
* Remove DES_RISC*tb2025-06-0813-715/+0
| | | | | | | | | | | | | | | codesearch.debian.net only shows some legacy openssl patches plus binkd (a FidoNet mailer) as sole potential user. net-snmp and a strongswan DES plugin bundle some opt-in libdes/openssl legacy things. If this should break any of this, I don't think we need to care. If you're really going to use DES you can also use non bleeding edge libressl. We can remove the big 'default values' block because one of DES_RISC1, DES_RISC2, DES_UNROLL is always defined (you can ignore DES_PTR for this), so this is dead support code for mostly dead platforms. ok kenjiro
* do_PVK_body: Unconditionally free enctmptb2025-06-071-3/+3
| | | | | | | | | | enctmp is only allocated if saltlen > 0, so there is no harm in checking for that, but it's also pointless. Unconfuses smatch who thinks there might be a memory leak: pem/pvkfmt.c:808 do_PVK_body() warn: possible memory leak of 'enctmp' found by jsg
* Fix smatch warning in asn1_primitive_print()tb2025-06-071-2/+2
| | | | | | | | Remove unnecessary and inconsistent NULL check for 'it', which the only caller, asn1_item_print_ctx(), already dereferenced. found by jsg ok kenjiro
* crypto_ex_data: fix allocation size of classes_newtb2025-06-071-2/+2
| | | | | | | | | classes_new is an array of pointers to struct crypto_ex_data, not an array of struct crypto_ex_data_index, so this overallocated by 240 or 480 bytes on ILP32 or LP64, respectively. found by jsg using smatch ok jsing