aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/noise.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* global: year bumpJason A. Donenfeld2018-01-031-1/+1
|
* global: add SPDX tags to all filesGreg Kroah-Hartman2017-12-091-1/+4
| | | | | | | | | | | | | 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>
* global: switch from timeval to timespecJason A. Donenfeld2017-11-221-3/+3
| | | | | | | | | | | | | | | | | | | This gets us nanoseconds instead of microseconds, which is better, and we can do this pretty much without freaking out existing userspace, which doesn't actually make use of the nano/micro seconds field: zx2c4@thinkpad ~ $ cat a.c void main() { puts(sizeof(struct timeval) == sizeof(struct timespec) ? "success" : "failure"); } zx2c4@thinkpad ~ $ gcc a.c -m64 && ./a.out success zx2c4@thinkpad ~ $ gcc a.c -m32 && ./a.out success This doesn't solve y2038 problem, but timespec64 isn't yet a thing in userspace.
* global: revert checkpatch.pl changesJason A. Donenfeld2017-11-021-1/+1
| | | | | These changes were suggested by checkpatch.pl, but actually cause big problems depending on the options. Revert.
* global: use fewer BUG_ONsJason A. Donenfeld2017-10-311-0/+2
| | | | Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* global: style nitsJason A. Donenfeld2017-10-311-6/+12
|
* global: accept decent check_patch.pl suggestionsJason A. Donenfeld2017-10-311-3/+3
|
* noise: no need to take the RCU lock if we're not dereferencingJason A. Donenfeld2017-10-171-4/+2
|
* noise: handshake constants can be read-only after initJason A. Donenfeld2017-10-171-2/+2
|
* global: add space around variable declarationsJason A. Donenfeld2017-10-031-0/+11
|
* noise: use spinlock for rotating keysJason A. Donenfeld2017-10-021-19/+27
| | | | | This should only really be contended in extremely exceptional cases, so changing from a mutex to a spinlock is likely fine.
* netlink: switch from ioctl to netlink for configurationJason A. Donenfeld2017-10-021-9/+4
|
* queue: entirely rework parallel systemJason A. Donenfeld2017-09-181-1/+1
| | | | | | | | | | This removes our dependency on padata and moves to a different mode of multiprocessing that is more efficient. This began as Samuel Holland's GSoC project and was gradually reworked/redesigned/rebased into this present commit, which is a combination of his initial contribution and my subsequent rewriting and redesigning.
* noise: infer initiator or not from handshake stateJason A. Donenfeld2017-08-041-3/+3
| | | | Suggested-by: Mathias Hall-Andersen <mathias@hall-andersen.dk>
* global: use pointer to net_deviceJason A. Donenfeld2017-07-201-2/+2
| | | | | | DaveM prefers it to be this way per [1]. [1] http://www.spinics.net/lists/netdev/msg443992.html
* main: annotate init/exit functions to save memoryJason A. Donenfeld2017-06-241-1/+1
|
* noise: fix race when replacing handshakeJason A. Donenfeld2017-06-081-9/+19
| | | | | | | | Replacing an entry that's already been replaced is something that could happen when processing handshake messages in parallel, when starting up multiple instances on the same machine. Reported-by: Hubert Goisern <zweizweizwoelf@gmail.com>
* debug: print interface name in dmesgJason A. Donenfeld2017-05-311-2/+2
|
* peer: use iterator macro instead of callbackJason A. Donenfeld2017-05-301-4/+4
|
* noise: precompute static-static ECDH operationJason A. Donenfeld2017-05-301-10/+18
|
* noise: no need to store ephemeral public keyJason A. Donenfeld2017-05-301-6/+6
|
* noise: redesign preshared key modeJason A. Donenfeld2017-05-171-91/+86
|
* locking: always use _bhJason A. Donenfeld2017-04-041-7/+7
| | | | | All locks are potentially between user context and softirq, which means we need to take the _bh variant.
* chacha20poly1305: enforce authtag checking with compilerJason A. Donenfeld2017-03-301-10/+5
|
* curve25519: protect against potential invalid point attacksJason A. Donenfeld2017-03-301-14/+25
|
* Use __read_mostly attribute when possibleJason A. Donenfeld2017-01-131-2/+2
|
* Update copyrightJason A. Donenfeld2017-01-101-1/+1
|
* messages: increase header by 3 bytes for alignmentJason A. Donenfeld2016-12-161-2/+2
|
* noise: update commentsJason A. Donenfeld2016-12-161-8/+8
|
* noise: update to new notationJason A. Donenfeld2016-11-291-2/+2
|
* headers: cleanup noticesJason A. Donenfeld2016-11-211-1/+1
|
* c89: the static keyword is okay in c99, but not in c89Jason A. Donenfeld2016-11-051-15/+15
|
* kref: elide checksJason A. Donenfeld2016-11-021-3/+1
|
* data: do not allow usage of keypair just before hash removalJason A. Donenfeld2016-11-011-0/+10
|
* noise: comment/document the key swappingJason A. Donenfeld2016-10-191-1/+19
|
* Rework headers and includesJason A. Donenfeld2016-09-291-2/+4
|
* c: specify static array size in function paramsJason A. Donenfeld2016-08-021-15/+15
| | | | | | | | | | | | | | | 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.
* tai64n: don't forget to add 2^62, to be in specJason A. Donenfeld2016-07-021-2/+2
|
* nonce: switch to RFC6479 to better support packet reorderingJason A. Donenfeld2016-06-251-1/+1
| | | | | With packets hitting multiple cores, a 64bit backtrack was too small. This algorithm increases our backtrack to 1984bits.
* Initial commitJason A. Donenfeld2016-06-251-0/+565