aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* chacha20-arm: go with Ard's version to optimize for Cortex-A7Jason A. Donenfeld2018-09-216-682/+549
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* chacha20-mips32r2: remove reorder directivesRené van Dorst2018-09-212-106/+68
| | | | | | | | | This requires some minimal rearranging to make work, but for the most part as does the right thing, provided we pass it an optimization flag. Suggested-by: Paul Burton <paul.burton@mips.com> Signed-off-by: René van Dorst <opensource@vdorst.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* chacha20-mips32r2: fix typo to allow reorder againRené van Dorst2018-09-211-1/+1
| | | | | | Reported-by: Paul Burton <paul.burton@mips.com> Signed-off-by: René van Dorst <opensource@vdorst.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* poly1305-mips32r2: remove all reorder directivesRené van Dorst2018-09-212-32/+23
| | | | | | | | | This requires some minimal rearranging to make work, but for the most part as does the right thing, provided we pass it an optimization flag. Suggested-by: Paul Burton <paul.burton@mips.com> Signed-off-by: René van Dorst <opensource@vdorst.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: put SPDX identifier on its own lineJason A. Donenfeld2018-09-2076-152/+152
| | | | | | | The kernel has very specific rules correlating file type with comment type, and also SPDX identifiers can't be merged with other comments. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ratelimiter: disable selftest with KASANJason A. Donenfeld2018-09-201-0/+4
| | | | | | | | | This this relies on instructions taking a "normal" amount of time, we really can't run this with KASAN, especially inside QEMU, so just disable it for KASAN, since it's hard to make it complete on slow systems. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* crypto: do not waste space on selftest itemsJason A. Donenfeld2018-09-203-9458/+10993
| | | | | | | | This unfortunately means we have to define symbols, since we want them in __initconst, but it's better than the other two options (no initconst or wasting space for fixed size buffers). Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* netlink: reverse my christmas treesJason A. Donenfeld2018-09-201-10/+11
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* crypto: explicitly dual licenseJason A. Donenfeld2018-09-2041-41/+41
| | | | | Suggested-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* poly1305: account for simd being toggled off midwayJason A. Donenfeld2018-09-203-26/+131
| | | | | | | | This is a very rare occurance, but we should account for it, so that the calculations aren't wrong. Here we convert from base 2^26 back to base 2^64. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* allowedips: change from BUG_ON to WARN_ONJason A. Donenfeld2018-09-202-3/+3
| | | | | | | | | This is never going to hit anyway, and if it does, it's a development problem that will be caught with the selftests anyway. So don't make Andrew Lunn upset, and just change it to a WARN_ON. Suggested-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* chacha20: prefer crypto_xor_cpy to avoid memmoveJason A. Donenfeld2018-09-202-5/+31
| | | | | Suggested-by: Eric Biggers <ebiggers@kernel.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* poly1305: no need to trick gcc 8.1Jason A. Donenfeld2018-09-191-2/+2
| | | | | | | | This reverts 37f114a73ba37219b00a66f0a51219a696599745, since gcc 8.2 no longer exhibits that bug. Suggested-by: Eric Biggers <ebiggers@kernel.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* blake2s: simplify final functionJason A. Donenfeld2018-09-193-40/+19
| | | | | Suggested-by: Eric Biggers <ebiggers@kernel.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* poly1305: better module descriptionJason A. Donenfeld2018-09-181-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* version: bump snapshotJason A. Donenfeld2018-09-182-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* chacha20: add independent self testJason A. Donenfeld2018-09-182-0/+1188
| | | | | | | This was already tested from the chacha20poly1305 test, but it's useful to be able to test this in isolation too. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* chacha20poly1305: add __init to selftest helper functionsJason A. Donenfeld2018-09-181-3/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* curve25519-arm: only compile if symbols will be usedJason A. Donenfeld2018-09-181-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* chacha20-x86_64: use correct cut off for avx512-vlJason A. Donenfeld2018-09-181-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* poly1305-x86_64: show full struct for stateJason A. Donenfeld2018-09-181-5/+7
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* crypto: allow for disabling simd in zinc modulesJason A. Donenfeld2018-09-186-9/+33
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* chacha20-x86_64: more limited cascadeJason A. Donenfeld2018-09-181-5/+4
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* chacha20poly1305: relax simd between sg chunksJason A. Donenfeld2018-09-181-0/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* crypto: turn Zinc into individual modulesJason A. Donenfeld2018-09-1825-54/+172
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* crypto: do not use -include trickJason A. Donenfeld2018-09-1714-51/+34
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* poly1305-x86_64: don't activate simd for small blocksJason A. Donenfeld2018-09-171-3/+14
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* chacha20-x86_64: don't activate simd for small blocksJason A. Donenfeld2018-09-171-1/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* crypto: pass simd by referenceJason A. Donenfeld2018-09-1717-109/+129
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* chacha20-x86_64: cascade down implementationsJason A. Donenfeld2018-09-171-3/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* poly1305: do not require simd context for archJason A. Donenfeld2018-09-178-22/+14
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* crypto: make MITJason A. Donenfeld2018-09-1639-39/+39
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* qemu: always pull and reset against integration treeJason A. Donenfeld2018-09-161-0/+5
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: remove non-essential inline annotationsJason A. Donenfeld2018-09-165-30/+23
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* send/receive: reduce number of sg entriesJason A. Donenfeld2018-09-162-2/+2
| | | | | | This reduces stack usage to quell warnings on powerpc. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* simd: add __must_check annotationJason A. Donenfeld2018-09-151-2/+2
| | | | | Suggested-by: Andy Lutomirski <luto@amacapital.net> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* chacha20-arm: swap scalar and neon functionsJason A. Donenfeld2018-09-131-697/+697
| | | | | | This brings us closer to the original code. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* poly1305: precompute 5*r in init instead of blocksJason A. Donenfeld2018-09-122-6/+18
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* curve25519-x86_64: remove useless defineJason A. Donenfeld2018-09-121-1/+0
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* chacha20: add constant for words in blockJason A. Donenfeld2018-09-122-2/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* poly1305: rename finish to finalJason A. Donenfeld2018-09-115-13/+13
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* kconfig: make NEON depend on CPU_V7Jason A. Donenfeld2018-09-111-3/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* crypto: make sure UML is properly disabledJason A. Donenfeld2018-09-111-4/+4
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* crypto: do not use compound literals in selftestsJason A. Donenfeld2018-09-112-7704/+7710
| | | | | | | | | gcc can't apply section attributes to compound literals, so we can't mark the actual data as __initconst. We thus waste space instead, but this shouldn't matter much, since it's cleared after init anyway, and because this is only for debugging. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* blake2s-x86_64: fix whitespace errorsJason A. Donenfeld2018-09-101-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* version: bump snapshotJason A. Donenfeld2018-09-102-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* poly1305: switch to donnaJason A. Donenfeld2018-09-103-183/+398
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* poly1305: rewrite self tests from scratchJason A. Donenfeld2018-09-081-1529/+831
| | | | | | This removes the old cruft and makes things a bit more idiomatic. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* compat: move simd.h from crypto to compat since it's going upstreamJason A. Donenfeld2018-09-062-0/+4
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* compat: arch-namespace certain includesJason A. Donenfeld2018-09-065-8/+8
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>