aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/curve25519.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* global: bump copyrightJason A. Donenfeld2020-01-021-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wg: add back source formerly shared with kernel moduleJason A. Donenfeld2019-12-261-2/+2
| | | | | | | | | | We used to reach back into parent directories for this, but with the repo split, we now require our own copy. We use -idirafter in case system headers are installed for the wireguard.h netlink definitions. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wg: fight compiler slightly harderJason A. Donenfeld2019-02-051-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* noise: store clamped key instead of raw keyJason A. Donenfeld2019-02-031-1/+0
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: normalize -> clampJason A. Donenfeld2019-01-231-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: update copyrightJason A. Donenfeld2019-01-071-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wg: curve25519: handle unaligned loads/stores safelyJason A. Donenfeld2018-12-201-4/+18
| | | | | Reported-by: Chris Hewitt <chris@chrishewitt.net> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wg: use libc's endianness macro if no compiler macroJason A. Donenfeld2018-10-091-0/+10
| | | | | | | This lets us be compiled with ancient gcc. Reported-by: Jeff Brandt <jeff@jeffcolo.net> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* crypto: clean up remaining .h->.cJason A. Donenfeld2018-10-071-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* crypto: make constant naming scheme consistentJason A. Donenfeld2018-09-251-3/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: put SPDX identifier on its own lineJason A. Donenfeld2018-09-201-2/+2
| | | | | | | 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>
* crypto: import zincJason A. Donenfeld2018-09-031-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* crypto: use unaligned helpersJason A. Donenfeld2018-08-281-0/+3
| | | | | | | | This is not useful for WireGuard, but for the general use case we probably want it this way, and the speed difference is mostly lost in the noise. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: in gnu code, use un-underscored asmJason A. Donenfeld2018-03-021-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wg: do not collide types with libc clashesJason A. Donenfeld2018-02-171-4/+10
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wg: endian.h is not portableJason A. Donenfeld2018-02-051-4/+9
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* curve25519: replace fiat64 with faster hacl64Jason A. Donenfeld2018-02-011-3/+3
| | | | | | | This reverts commit da4ff396cc5d5e0ff21f9ecbc2f951c048c63fff and adds some optimizations to hacl64. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* curve25519: replace hacl64 with fiat64Jason A. Donenfeld2018-02-011-8/+3
| | | | | | | | | | | | For now, it's faster: hacl64: 109782 cycles per call fiat64: 108984 cycles per call It's quite possible this commit will be reverted with nice changes from INRIA, though. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wg: dedup secret normalizationJason A. Donenfeld2018-01-311-7/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wg: share curve25519 implementations with kernelJason A. Donenfeld2018-01-231-1539/+30
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* curve25519-fiat32: uninline certain functionsJason A. Donenfeld2018-01-181-4/+4
| | | | | | | | | | While this has a negative performance impact on x86_64, it has a positive performance impact on smaller machines, which is where we're actually using this code. For example, an A53: Before: fiat32: 228605 cycles per call After: fiat32: 188307 cycles per call Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wg: import new curve25519 implementationsJason A. Donenfeld2018-01-181-1129/+1423
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: year bumpJason A. Donenfeld2018-01-031-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: add SPDX tags to all filesGreg Kroah-Hartman2017-12-091-27/+3
| | | | | | | | | | | | | | It's good to have SPDX identifiers in all files as the Linux kernel developers are working to add these identifiers to all files. Update all files with the correct SPDX license identifier based on the license text of the project or based on the license in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Modified-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: style nitsJason A. Donenfeld2017-10-311-105/+154
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Update copyrightJason A. Donenfeld2017-01-101-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* headers: cleanup noticesJason A. Donenfeld2016-11-211-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* c: specify static array size in function paramsJason A. Donenfeld2016-08-021-5/+5
| | | | | | | | | | | | | | | | | The C standard states: A declaration of a parameter as ``array of type'' shall be adjusted to ``qualified pointer to type'', where the type qualifiers (if any) are those specified within the [ and ] of the array type derivation. If the keyword static also appears within the [ and ] of the array type derivation, then for each call to the function, the value of the corresponding actual argument shall provide access to the first element of an array with at least as many elements as specified by the size expression. By changing void func(int array[4]) to void func(int array[static 4]), we automatically get the compiler checking argument sizes for us, which is quite nice. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Initial commitJason A. Donenfeld2016-06-251-0/+1258
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>