summaryrefslogtreecommitdiff
path: root/engines/asm
Commit message (Collapse)AuthorAgeFilesLines
* Padlock: fix byte swapping assembly for AES-192 and 256ValdikSS2023-01-202-0/+4
| | | | | | | | | | | | | | | | | Byte swapping code incorrectly uses the number of AES rounds to swap expanded AES key, while swapping only a single dword in a loop, resulting in swapped key and partially swapped expanded keys, breaking AES encryption and decryption on VIA Padlock hardware. This commit correctly sets the number of swapping loops to be done. Fixes #20073 CLA: trivial Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20077)
* Unify all assembler file generatorsRichard Levitte2019-09-162-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They now generally conform to the following argument sequence: script.pl "$(PERLASM_SCHEME)" [ C preprocessor arguments ... ] \ $(PROCESSOR) <output file> However, in the spirit of being able to use these scripts manually, they also allow for no argument, or for only the flavour, or for only the output file. This is done by only using the last argument as output file if it's a file (it has an extension), and only using the first argument as flavour if it isn't a file (it doesn't have an extension). While we're at it, we make all $xlate calls the same, i.e. the $output argument is always quoted, and we always die on error when trying to start $xlate. There's a perl lesson in this, regarding operator priority... This will always succeed, even when it fails: open FOO, "something" || die "ERR: $!"; The reason is that '||' has higher priority than list operators (a function is essentially a list operator and gobbles up everything following it that isn't lower priority), and since a non-empty string is always true, so that ends up being exactly the same as: open FOO, "something"; This, however, will fail if "something" can't be opened: open FOO, "something" or die "ERR: $!"; The reason is that 'or' has lower priority that list operators, i.e. it's performed after the 'open' call. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9884)
* Following the license change, modify the boilerplates in engines/Richard Levitte2018-12-062-2/+2
| | | | | | | [skip ci] Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7832)
* Update copyright yearMatt Caswell2018-03-202-2/+2
| | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5689)
* engines/asm/e_padlock*: add support for Zhaoxin's x86 platformJeffZhao2018-03-192-2/+20
| | | | | | | | | | VIA and Shanghai United Investment Co.,Ltd. found Shanghai ZhaoXin, which is a fabless x86 CPU IC design company. ZhaoXin has issued ZX-C, ZX-D x86 processors, which have 'Shanghai' CPU vendor id. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5640)
* Remove filename argument to x86 asm_init.David Benjamin2017-05-111-1/+1
| | | | | | | | | | | | | | | The assembler already knows the actual path to the generated file and, in other perlasm architectures, is left to manage debug symbols itself. Notably, in OpenSSL 1.1.x's new build system, which allows a separate build directory, converting .pl to .s as the scripts currently do result in the wrong paths. This also avoids inconsistencies from some of the files using $0 and some passing in the filename. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3431)
* Remove trailing whitespace from some files.David Benjamin2016-10-101-1/+1
| | | | | | | | | | | | | | | | | | The prevailing style seems to not have trailing whitespace, but a few lines do. This is mostly in the perlasm files, but a few C files got them after the reformat. This is the result of: find . -name '*.pl' | xargs sed -E -i '' -e 's/( |'$'\t'')*$//' find . -name '*.c' | xargs sed -E -i '' -e 's/( |'$'\t'')*$//' find . -name '*.h' | xargs sed -E -i '' -e 's/( |'$'\t'')*$//' Then bn_prime.h was excluded since this is a generated file. Note mkerr.pl has some changes in a heredoc for some help output, but other lines there lack trailing whitespace too. Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
* x86_64 assembly pack: tolerate spaces in source directory name.Andy Polyakov2016-05-291-1/+1
| | | | | | [as it is now quoting $output is not required, but done just in case] Reviewed-by: Richard Levitte <levitte@openssl.org>
* Add OpenSSL copyright to .pl filesRich Salz2016-05-212-2/+16
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix engine/asm/e_padlock-x86.pl for newer semanticsRichard Levitte2016-03-081-0/+5
| | | | Reviewed-by: Andy Polyakov <appro@openssl.org>
* RT2513: Fix typo's paramter-->parameterMartin Olsson2014-08-191-2/+2
| | | | | | | I also found a couple of others (padlock and signinit) and fixed them. Reviewed-by: Emilia Kasper <emilia@openssl.org>
* x86_64 assembly pack: make Windows build more robust.Andy Polyakov2013-01-221-1/+2
| | | | PR: 2963 and a number of others
* x86_64 assembly pack: make it possible to compile with Perl located onAndy Polyakov2012-06-271-1/+1
| | | | | | path with spaces. PR: 2835
* e_padlock-x86[_64].pl: better understanding of prefetch errata and properAndy Polyakov2012-03-192-78/+204
| | | | workaround.
* e_padlock-x86[_64].pl: protection against prefetch errata.Andy Polyakov2011-10-112-17/+73
|
* e_padlock-x86_64.pl: brown-bag bug in stack pointer handling.Andy Polyakov2011-10-091-0/+5
|
* e_padlock-x86[_64].pl: SHA fixes, comply with specification and fix bug.Andy Polyakov2011-10-082-13/+156
|
* e_padlock: add CTR mode.Andy Polyakov2011-10-052-13/+75
|
* e_padlock-x86_64.pl: fix typo.Andy Polyakov2011-10-041-1/+2
|
* e_padlock-x86*.pl: Nano-related update.Andy Polyakov2011-10-042-21/+49
|
* e_padlock-x86.pl: previous C3-specific fix was incomplete.Andy Polyakov2011-10-011-2/+3
|
* e_padlock-x86.pl: make it work on VIA C3 (which doesn't support SSE2).Andy Polyakov2011-10-011-20/+17
|
* Make latest assembler additions (vpaes and e_padlock) work in Windows build.Andy Polyakov2011-09-181-5/+7
|
* engines/asm/e_padlock-x86_64.pl: name it right and fix small bug.Andy Polyakov2011-09-061-1/+1
|
* Padlock engine: make it independent of inline assembler.Andy Polyakov2011-09-062-0/+751