summaryrefslogtreecommitdiff
path: root/src/lib/libssl/pqueue.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2025-05-20Simplify err_build_SYS_str_reasonstb1-19/+13
This is currently done in a rather silly way. Shift the index by 1 and avoid weird pointer dances. Rather than relying on static initialization, use code to obviate a comment. ok beck joshua jsing
2025-05-20Fix previous - names use underscores and not hyphens.jsing1-3/+3
2025-05-20Add ML-KEM768 Hybrid Kems to obj_mac.numbeck1-0/+3
ok tb@, joshua@
2025-05-20Add ML-KEM768 Hybrid Kems to objects.txtbeck1-0/+6
ok tb@, joshua@
2025-05-20Don't use the array index as the group_idbeck1-51/+97
This is a precursor to adding new group ids for post quantum stuff which are up in the 4000 range, so using the array index as the group id will be silly. Instead we just add the group id to the structure and we walk the list to find it. This should never be a very large list for us, so no need to do anything cuter than linear search for now. ok jsing@, joshua@
2025-05-20Make MLKEM1024_marshal_private_key consistent with the public_key funcitonsbeck7-66/+68
Even though this should remain internal, make it the same as the public key marshal function, and make the needed fallout changes in regress. ok kenjiro@, tb@
2025-05-20Whitespace nits from tbbeck1-1/+4
ok tb@
2025-05-19Fix up MLKEM768_marshal_private_key to not use a passed in CBBbeck7-53/+54
Even though this should remain internal, make it the same as the public key marshal function, and make the needed fallout changes in regress. This does not yet do the bikeshed of renaming the structure field in the regress ctx, that will wait until a follow on to convert 1024 in a similar manner ok tb@
2025-05-19Remove the boringssl if || ideom from mlkembeck2-34/+46
ok jsing@, joshua@
2025-05-19API changes for ML-KEMbeck9-176/+203
- Get rid of CBB/CBS usage in public api - Make void functions return int that can fail if malloc fails. Along with some fallout and resulting bikeshedding in the regress tests. ok jsing@, tb@
2025-05-19Simplify EVP AES code for ECB.jsing2-33/+46
AES_ecb_encrypt() does not really do ECB - provide an aes_ecb_encrypt_internal that actually does multiple blocks and call this from aes_ecb_cipher(). Provide ECB with its own key initialisation function, which allows aes_init_key() to be simplified considerably. The block function pointer is now unused, so mop this up. ok joshua@ tb@
2025-05-19Remove block128_f function casts.jsing1-8/+20
Provide aes_{en,de}crypt_block128() which have correct function signatures and use these when calling the various mode functions. ok joshua@ tb@
2025-05-19Simplify EVP AES code for OFB.jsing1-7/+19
Provide AES-NI with its own aesni_ofb_cipher() and switch aes_ofb_cipher() to call AES_ofb128_encrypt() directly. ok joshua@ tb@
2025-05-19Simplify EVP AES code for CFB.jsing1-25/+79
Provide AES-NI with its own aesni_cfb*_cipher() functions, which then allows us to change the existing aes_cfb*_cipher() functions to () to call AES_cfb*_encrypt() directly. ok beck@ tb@
2025-05-18EC_POINT_new: wording tweaks in the BUGS sectiontb1-6/+6
2025-05-18Simplify EVP AES code for CTR.jsing1-22/+23
Provide AES-NI with its own aesni_ctr_cipher(), which then allows us to change aes_ctr_cipher() to call AES_ctr128_encrypt() directly. The stream.ctr function pointer is now unused and can be mopped up. ok beck@ tb@
2025-05-18Unifdef AES_CTR_ASM.jsing1-14/+1
This is a remnant from s390x assembly.
2025-05-18Simplify EVP code for AES CBC.jsing1-26/+33
Change aes_cbc_cipher() to call AES_cbc_encrypt() directly, rather than via the stream.cbc function pointer. Remove stream.cbc since it is no longer used. Also provide a separate aes_cbc_init_key() function which makes this standalone and does not require checking mode flags. ok joshua@ tb@
2025-05-18add missing u64/uint64_t conversionbcook1-3/+3
ok jsing@
2025-05-18Use stdint types instead of u64/u32/u8.jsing5-134/+127
No change in generated assembly.
2025-05-18Remove contortions with the rem_4bit table.jsing1-28/+9
Instead of using size_t and a PACK macro, store the entries as uint16_t and then uncondtionally left shift 48 bits. This gives a small performance gain on some architectures and has the advantage of reducing the size of the table from 1024 bits to 256 bits. ok beck@ joshua@ tb@
2025-05-18Inline REDUCE1BIT macro.jsing1-15/+6
The REDUCE1BIT macro is now only used in one place, so just inline it. Additionally we do not need separate 32 bit and 64 bit versions - just use the 64 bit version and let the compiler deal with it (we effectively get the same code on i386). ok beck@ joshua@
2025-05-18bio_dump: only run strncmp if there's something to comparetb1-2/+2
2025-05-18bio_mem: avoid pointer arithmetic on NULLtb1-2/+4
Prompted by a diff by Kenjiro Nakayama ok jsing
2025-05-18rc2: two files escaped the lure of the attic, set these poor souls freetb2-241/+0
2025-05-17Remove TABLE_BITS from gcm128.jsing2-248/+3
TABLE_BITS is always currently defined as 4 - 8 is considered to be insecure due to timing leaks and 1 is considerably slower. Remove code that is not regularly tested, does not serve a lot of purpose and is making clean up harder than it needs to be. ok tb@
2025-05-16Replace GCM_MUL/GHASH defines with static inline functions.jsing1-121/+99
Rather than having defines for GCM_MUL/GHASH (along with the wonder that is GCM_FUNCREF_4BIT) then conditioning on their availability, provide and call gcm_mul()/gcm_ghash() unconditionally. This simplifies all of the call sites. ok tb@
2025-05-16Stop using CRYPTO_gcm128_init() and stack allocated GCM128_CONTEXT.jsing1-16/+16
Since struct gcm128_context is not exposed via a public header, there is no way CRYPTO_gcm128_init() can actually be used properly. Instead, use CRYPTO_gcm128_new() and CRYPTO_gcm128_free_bird()^WCRYPTO_gcm128_release() (naming consistency is apparently hard).
2025-05-14nc: disallow -T with = when arguments are not key=value pairstb1-1/+3
From Ross L Richardson
2025-05-10Increase default PKCS12_SALT_LEN from 8 to 16 bytestb1-2/+2
Currently PKCS12_setup_mac() function uses salt length of 8 bytes / 64 bits when no salt length is specified. Increase this fallback default to 16 bytes / 128 bits, as recommended by NIST SP 800-132. Note this is for interoperability purposes. Some FIPS implementations enforce minimum salt length of 16 bytes. Examples of such FIPS implemenations are Bouncycastle FIPS Java API and Chainguard FIPS Provider for OpenSSL. Also future v3.6 release of OpenSSL will also increase the default salt length to 16 bytes. From Dimitri John Ledkov, thanks
2025-05-10asn_moid: move inclusion of err_local.h to the proper placetb1-2/+2
2025-05-10Sort FOOerror() in ASCII ordertb1-18/+18
2025-05-10Simplify the remaining FOOerror()tb1-26/+28
Redirect through an additional macro that adds the repeated function, file and line macros. Reduces the eyesore and makes the whole thing much more redable. similar to a suggestion by jsing a while back
2025-05-10Remove unused internal FOOerror()tb1-11/+1
pointed out by djm a while back
2025-05-10Remove error macros except PEMerr(), RSAerr() and SSLerr()tb1-37/+4
These three are still used in about half a dozen ports. All the others are unused. ok jsing
2025-05-10ssl_local.h: stop guarding SYSerror() with an #ifdeftb1-3/+1
2025-05-10Move the internal FOOerror() to err_local.htb2-40/+38
These are now only used in libcrypto. They should never have been in a public header in the first place. ok jsing
2025-05-10Use err_local.h rather than err.h in most placestb222-456/+454
ok jsing
2025-05-10ssl_local: provide an SSL-internal version of SYSerror()tb1-1/+4
2025-05-10SSL_error_internal: remove a superfluous pair of parenstb1-3/+2
2025-05-10ssl_local.h: adjust some whitespacetb1-3/+3
2025-05-10const correct SSL_error_internal()tb2-4/+4
2025-05-10cms: disallow AEAD ciphers and AES XTStb1-3/+21
The CMS code doesn't support RFC 5083/5084 authenticated enveloped data and outputs garbage that even itself can't decrypt for a reason that I have not tried to pinpoint. So refuse using AEAD ciphers and AES XTS for enveloped data from the cms "app" and throw an error pointing out that this isn't supported. OpenSSL have since added incorrect support for AuthEnvelopedData (ASN.1 and code review are hard), so doing this right will need both correct and interoperable code, which I doubt anyone will bother to write anytime soon. Reported by Ben Cooper in https://github.com/libressl/portable/issues/1157 ok beck jsing
2025-05-09Garbage collect docs of BIO_dump{,_indent}_{cb,fp}()tb1-35/+3
The _cb() variants were only documented as intentionally undocumented. Be that as it may, they left the building more than a year ago.
2025-05-09bss_log.c: don't rely on err.h pulling in bio.htb1-2/+2
ok jsing
2025-05-09openssl ocsp: switch from X509V3error() to perror()tb1-6/+6
ok jsing
2025-05-05merge the x509name test into x509_name_test.ctb4-73/+125
Remove the old x509name test and its Makefile rule. Its logic has been fully integrated into x509_name_test.c using a new table-driven approach. Each x509 name entry is added and validated step by step, checking both the string representation produced by X509_NAME_print_ex() and the internal RDN set structure. This makes the test easier to extend and maintain, and eliminates the need for an external .expected file or output diff. From Kenjiro Nakayama (with tiny tweaks)
2025-05-04Fix up two markup mistakes with .Fn and .Xrtb1-4/+4
2025-05-04Improve the pqueue testtb3-48/+57
This simplifies the test in portable and makes the whole thing a bit less ugly overall. From Kenjiro Nakayama with minor tweaks by me
2025-05-04sigh. pqueue_find() also needs a const treatmenttb2-4/+4