summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rc4 (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Mop up RC4_INDEX.jsing2025-01-271-25/+19
| | | | | | | | | | | | | The RC4_INDEX define switches between base pointer indexing and per-byte pointer increment. This supposedly made a huge difference to performance on x86 at some point, however compilers have improved somewhat since then. There is no change (or effectively no change) in generated assembly on a the majority of LLVM platforms and even when there is some change (e.g. aarch64), there is no noticable performance difference. Simplify the (still messy) macros/code and mop up RC4_INDEX. ok tb@
* Remove #error if OPENSSL_NO_FOO is definedtb2025-01-251-5/+1
| | | | discussed with jsing
* Provide and use crypto_arch.h.jsing2024-08-111-1/+3
| | | | | | | | Provide a per architecture crypto_arch.h - this will be used in a similar manner to bn_arch.h and will allow for architecture specific #defines and static inline functions. Move the HAVE_AES_* and HAVE_RC4_* defines here. ok tb@
* Use static inline for rc4_set_key_internal().jsing2024-03-281-2/+2
|
* Hide symbols in RC4joshua2024-03-281-1/+3
| | | | ok jsing tb beck
* Use C functions for RC4 public API.jsing2024-03-283-19/+44
| | | | | | | | | | | | | | Rather than having public API switch between C and assembly, always use C functions as entry points, which then call an assembly implementation (if available). This makes it significantly easier to deal with symbol aliasing/namespaces and it also means we benefit from vulnerability prevention provided by the C compiler. Rename the assembly generated functions from RC4() to rc4_internal() and RC4_set_key() to rc4_set_key_internal(). Always include rc4.c and change it to use defines that are similar to those used in BN. ok beck@ joshua@ tb@
* Remove unused rc4 parisc assembly.jsing2024-03-271-294/+0
| | | | This is already disabled since it is "about 35% slower than C code".
* Consolidate rc4 code.jsing2024-03-272-98/+31
| | | | Discussed with tb@
* Remove assembly for stitched modes.jsing2024-03-271-515/+0
| | | | | The stitched modes have been removed, so having assembly for them is of little use.
* Remove empty rc4_local.h include.jsing2024-03-273-10/+2
| | | | Discussed with tb@
* Remove private_RC4_set_key() from the public rc4.h header.jsing2024-03-271-2/+1
| | | | This does not exist in libcrypto.
* Replace uses of endbr64 with _CET_ENDBR from cet.htb2024-02-242-4/+4
| | | | | | | | | cet.h is needed for other platforms to emit the relevant .gnu.properties sections that are necessary for them to enable IBT. It also avoids issues with older toolchains on macOS that explode on encountering endbr64. based on a diff by kettenis ok beck kettenis
* Garbage collect rodata only used by RC4_options()tb2023-07-291-5/+0
| | | | build tested by miod
* Remove various ${thing}_optionstb2023-07-286-106/+3
| | | | | | | | | | Various, ancient ciphers exposed some of their innards via an _options() API. Apart from openssl version/speed, only some lua thingie in nmap ever looked at these. Go figure. hppa testing by miod, i386 testing by sthen. Thanks! ok jsing
* Add endbr64 where needed by inspection. Passes regresson tests.deraadt2023-04-252-1/+8
| | | | ok jsing, and kind of tb an earlier version
* Use explicit .text instead of .previous to please Windows/MinGW on amd64tb2023-02-231-1/+1
| | | | ok miod
* Use .section .rodata instead of a plain .rodatatb2023-02-091-1/+1
| | | | | | | | At least gcc 12 on Fedora is very unhappy about a plain .rodata and throws Error: unknown pseudo-op: `.rodata'. So add a .section in front of it to make it happy. ok deraadt miod
* Move all data blocks from .text to .rodata and cleanup up and homogeneize codemiod2023-02-011-11/+15
| | | | | | responsible from getting the proper address of those blocks. ok tb@ jsing@
* Move constants out of text segment into rodata to prepare for xonly supportderaadt2023-01-141-1/+2
| | | | | on amd64. no pic handling is neccessary since amd64 has full reach. ok kettenis
* Move all data tables from .text section to .rodata, and update the code tomiod2023-01-131-12/+9
| | | | | | | fetch them correctly when building PIC. Also drop unused data, and remove --no-execute-only from linker flags. ok jsing@ kettenis@
* spelling fixes; from paul tagliamontejmc2022-12-262-4/+4
| | | | | | | i removed the arithmetics -> arithmetic changes, as i felt they were not clearly correct ok tb
* Make internal header file names consistenttb2022-11-264-9/+9
| | | | | | | | | | | | | | | | 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
* Switch to <endian.h> from <machine/endian.h> for better portability.bcook2021-11-091-2/+3
| | | | ok tb@
* move endian/word size checks from runtime to compile timebcook2017-08-131-33/+33
| | | | ok guenther@
* Replace all uses of magic numbers when operating on OPENSSL_ia32_P[] bymiod2016-11-042-8/+10
| | | | | | | | | | | | | | | meaningful constants in a private header file, so that reviewers can actually get a chance to figure out what the code is attempting to do without knowing all cpuid bits. While there, turn it from an array of two 32-bit ints into a properly aligned 64-bit int. Use of OPENSSL_ia32_P is now restricted to the assembler parts. C code will now always use OPENSSL_cpu_caps() and check for the proper bits in the whole 64-bit word it returns. i386 tests and ok jsing@
* Less S390.jsing2016-09-041-234/+0
| | | | ok deraadt@
* Less IA64.jsing2016-09-041-755/+0
| | | | ok deraadt@
* In the case where len is not a multiple of sizeof(RC4_CHUNK) the RC4 codejsing2015-10-211-63/+1
| | | | | | | | | | | | | | will end up doing a read and write of up to 7 bytes beyond the specified length. This is effectively a non-issue since we read and write back the same data and due to alignment it is within a page boundary. Regardless, avoid this by removing the "special" handling for the remaining length and allow the standard (non-chunk) code to process the remaining bytes, which does not result in overrun. Reported by Pascal Cuoq <cuoq at trust-in-soft.com> - thanks! ok beck@ miod@
* Lob a style(9) grenade in here.jsing2015-10-203-172/+185
|
* Remove old interesting but not useful content.jsing2015-02-101-278/+0
| | | | ok miod@
* deregister; no binary changejsg2014-10-282-7/+7
| | | | ok jsing@ miod@
* Remove private_{Camellia,RC4}_set_key FIPS indirection tentacles, as has beenmiod2014-07-126-73/+14
| | | | done for other symmetric algorithms recently.
* Only import cryptlib.h in the four source files that actually need it.jsing2014-07-111-3/+1
| | | | | | | | Remove the openssl public includes from cryptlib.h and add a small number of includes into the source files that actually need them. While here, also sort/group/tidy the includes. ok beck@ miod@
* Explicitly include <openssl/opensslconf.h> in every file that referencesjsing2014-07-101-1/+2
| | | | | | | | | an OPENSSL_NO_* define. This avoids relying on something else pulling it in for us, plus it fixes several cases where the #ifndef OPENSSL_NO_XYZ is never going to do anything, since OPENSSL_NO_XYZ will never defined, due to the fact that opensslconf.h has not been included. This also includes some miscellaneous sorting/tidying of headers.
* Remove leading underscore from _BYTE_ORDER and _{LITTLE,BIG}_ENDIAN, to bemiod2014-07-091-2/+2
| | | | | more friendly to systems where the underscore flavours may be defined as empty. Found the hard way be bcook@; joint brainstrom with bcook beck and guenther
* remove unused, private version strings except SSL_version_strbcook2014-07-091-3/+1
| | | | | | Also remove unused des_ver.h, which exports some of these strings, but is not installed. ok miod@ tedu@
* tags as requested by miod and teduderaadt2014-06-125-4/+6
|
* c-file-style hints, begone; ok beckderaadt2014-06-111-1/+1
|
* Do not output SOM-specific directives.miod2014-05-011-0/+6
|
* First pass at removing win64 support from the assembly generating Perljsing2014-04-302-241/+0
| | | | | | | scripts. We certainly do not need an identical copy of the win64 exception handler in each script (surely one copy would be sufficient). ok miod@
* typo in commentmiod2014-04-271-1/+1
|
* I'm glad to know that Ultrix CC has a bug optimizing switch() statementsmiod2014-04-231-10/+0
| | | | | lacking an explicit `case 0:' construct. But Ultrix has been dead for more than 15 years, really. Don't give it any reason to move out of its coffin.
* Figure out endianness at compile-time, using _BYTE_ORDER frommiod2014-04-231-7/+3
| | | | | | | <machine/endian.h>, rather than writing 1 to a 32-bit variable and checking whether the first byte is nonzero. tweaks and ok matthew@; ok beck@ tedu@
* Remove meat which either duplicates code found in apps/, or is only of valuemiod2014-04-222-445/+0
| | | | for 20th century historians, and can be put in the Attic.
* OPENSSL_DECLARE_EXIT serves no purpose.deraadt2014-04-171-1/+0
|
* unistd.h is always in the same place; no need to #include the result ofderaadt2014-04-171-1/+1
| | | | a maze of conditional #define's
* we don't use these files for buildingtedu2014-04-151-103/+0
|
* remove FIPS mode support. people who require FIPS can buy something thattedu2014-04-151-3/+0
| | | | | meets their needs, but dumping it in here only penalizes the rest of us. ok beck deraadt
* Moved to regress/lib/libcrypto.miod2014-04-151-242/+0
|
* remove pentium specific benchmark codejsg2014-04-151-73/+0
| | | | ok miod@