Commit Graph

164 Commits

Author SHA1 Message Date
Mathias Hall-Andersen 0520b28ac2 Move to RustCrypto AEAD crate for handshake 2019-08-30 19:46:00 +02:00
Mathias Hall-Andersen 6785aa4cb5 Join with worker threads on device drop 2019-08-28 16:27:26 +02:00
Mathias Hall-Andersen 8e1a2cabd3 Renamed confirmed -> initator on keypair
Done to reflect that the property is immutable,
unlike the "confirmed" field on the decryption state.
2019-08-28 12:14:32 +02:00
Mathias Hall-Andersen 10e6436e6b Start worker threads for device 2019-08-28 11:52:08 +02:00
Mathias Hall-Andersen a1b50aca26 Add confirm_key stub 2019-08-27 22:30:24 +02:00
Mathias Hall-Andersen 40533b9ffd Use confirmation status from keypair in dec-state 2019-08-27 22:21:31 +02:00
Mathias Hall-Andersen e5f515098a Work on inbound/outbound consume code 2019-08-27 22:20:22 +02:00
Mathias Hall-Andersen cdbcd55eda Added sealing/opening to the router worker 2019-08-27 21:17:55 +02:00
Mathias Hall-Andersen e28a9274d0 Removed unused sub-module 2019-08-27 11:37:20 +02:00
Mathias Hall-Andersen 3eb7f5e423 Removed unused sub-module 2019-08-27 11:36:33 +02:00
Mathias Hall-Andersen a80e64014c Unbox callback closures
Accepted the more verbose type signatures and added a callback to
request new key-material.
2019-08-27 11:28:20 +02:00
Mathias Hall-Andersen e16151419d Work on callback structure for cryptkey router 2019-08-26 15:01:47 +02:00
Mathias Hall-Andersen 5f3c4d2e27 Update the blake2 crate to fix bug upstream
Included basic sanity check for the HKDF macroes, to avoid regression in future.
2019-08-26 15:00:14 +02:00
Mathias Hall-Andersen 2272e5250f Move to hjul crate
Moved timer code into seperate crate (`hjul').
2019-08-24 23:41:05 +02:00
Mathias Hall-Andersen e88ed5d02d Allow DoS mitigation to take any endpoint impl. 2019-08-23 11:43:29 +02:00
Mathias Hall-Andersen 9528d19cc9 Derieve clone for timer (handle) 2019-08-22 15:46:34 +02:00
Mathias Hall-Andersen 543efad980 Added benchmarks for timer code 2019-08-22 15:29:02 +02:00
Mathias Hall-Andersen c5aba7183d Initial version of timer framework 2019-08-22 14:59:15 +02:00
Mathias Hall-Andersen 9cef264581 Ensure peer threads are stopped on drop 2019-08-20 21:19:53 +02:00
Mathias Hall-Andersen f4da998812 Removed platform mod 2019-08-20 14:34:41 +02:00
Mathias Hall-Andersen 7e727d120b Restructure and job stealing work queue 2019-08-20 14:33:11 +02:00
Mathias Hall-Andersen 31ef3e2871 Implemented keypair_confirm 2019-08-18 15:44:20 +02:00
Mathias Hall-Andersen 78ab1a93e6 Remove peer from cryptkey router on drop 2019-08-17 16:31:08 +02:00
Mathias Hall-Andersen 5aeea9b619 Begin drafting cross-platform interface 2019-08-16 22:00:48 +02:00
Mathias Hall-Andersen 726163b7f1 Layout work on router 2019-08-16 12:33:10 +02:00
Mathias Hall-Andersen 657a1ccb44 Implement add_keypair semantics 2019-08-13 19:42:05 +02:00
Mathias Hall-Andersen 723a1b8e85 Port replay filter and sketch router state 2019-08-12 21:04:19 +02:00
Mathias Hall-Andersen 0e16901261 Work on sketching router interface 2019-08-10 17:09:02 +02:00
Mathias Hall-Andersen a50079552a Kill GC thread on Ratelimiter drop 2019-08-10 16:01:56 +02:00
Mathias Hall-Andersen b33381331f Concurrent rate limiter
The new rate limiter allows multiple simultaneous .allow calls.
Also delegated GC to tokio.
2019-08-07 22:51:58 +02:00
Mathias Hall-Andersen f7f1088123 Added initiation flood protection 2019-08-07 11:29:39 +02:00
Mathias Hall-Andersen a12e6e139c Add rate limiter check to handshake messages. 2019-08-06 13:02:13 +02:00
Mathias Hall-Andersen 8f488882be Prepare for resuse of message buffers for response 2019-08-05 22:08:18 +02:00
Mathias Hall-Andersen c62aca70a3 Multiple mac2 can be checked concurrently 2019-08-05 21:51:16 +02:00
Mathias Hall-Andersen abc8cacf44 Checking of mac2 fields on initiation & response
In addition, moved the rng out.
This will allow allocating one instance per worker,
rather than every call.
2019-08-05 21:37:31 +02:00
Mathias Hall-Andersen baebac5bec Validate mac2 field 2019-08-03 14:45:45 +02:00
Mathias Hall-Andersen fe0c1532d9 Added property-based test for full DoS interaction 2019-08-03 14:36:14 +02:00
Mathias Hall-Andersen 2bdcda067c Remove rust-crypto, move to libsodium bindings 2019-08-02 17:18:37 +02:00
Mathias Hall-Andersen d6e40f9ea6 Unit test for mac1 validation 2019-08-01 13:56:42 +02:00
Mathias Hall-Andersen 0f92468f69 Successfully validate mac1 field 2019-08-01 13:25:50 +02:00
Mathias Hall-Andersen ab98d9dced Make unit tests pass 2019-08-01 11:12:30 +02:00
Mathias Hall-Andersen 1cfd5aea1a Move to nested handshake message structure
Having the nested structure:

    Handshake Message:
        Noise part (zerocopy message)
        MAC footer part (zerocopy message)

Greatly simplifies processing the MAC fields,
since the MAC footer covers the noise part, which can
be accessed as bytes using AsBytes.
2019-07-30 15:28:11 +02:00
Mathias Hall-Andersen f46f36ad29 Begin work on MAC field processing 2019-07-29 12:45:10 +02:00
Mathias Hall-Andersen 2c81abbe79 Restructured for wireguard-rs 2019-07-28 17:09:27 +02:00
Mathias Hall-Andersen 59190dff33 Added ability to remove peer from device 2019-07-26 22:36:24 +02:00
Mathias Hall-Andersen 97e5e1eacc Only impl. fmt for messages in test 2019-07-26 18:45:20 +02:00
Mathias Hall-Andersen 5efb318171 Move parser code to zerocopy 2019-07-26 15:46:24 +02:00
Mathias Hall-Andersen 43b56dfb58 Formatting 2019-07-25 22:04:35 +02:00
Mathias Hall-Andersen 27f8fd8e34 Fixed GenericArray version 2019-07-25 21:43:25 +02:00
Mathias Hall-Andersen 409ba51750 Added opaque identity to output 2019-07-25 18:23:30 +02:00