Mathias Hall-Andersen
74e576a9c2
Fixed inbound job bug (add to sequential queue)
2019-12-06 21:45:21 +01:00
Mathias Hall-Andersen
5a7f762d6c
Moving away from peer threads
2019-12-03 21:49:08 +01:00
Mathias Hall-Andersen
549b2cf5d0
Close socket fd after getmtu ioctl
2019-11-28 09:52:59 +01:00
Mathias Hall-Andersen
68b04e8074
Fetch updated MTU on linux
2019-11-27 22:39:52 +01:00
Mathias Hall-Andersen
04f507556b
Work on netlink IF event code for Linux
2019-11-27 16:59:54 +01:00
Mathias Hall-Andersen
f228b6f98b
Enable up/down from configuration interface
2019-11-25 13:33:00 +01:00
Mathias Hall-Andersen
3bff078e3f
Make IO traits suitable for Tun events (up/down)
2019-11-24 18:41:43 +01:00
Mathias Hall-Andersen
dee23969f5
Daemonization
2019-11-21 17:12:00 +01:00
Mathias Hall-Andersen
92dbb4c46a
Clean dependencies and imports
2019-11-21 11:43:16 +01:00
Mathias Hall-Andersen
3ba0247634
Better compartmentalization of cryptokey router
2019-11-18 13:13:55 +01:00
Mathias Hall-Andersen
b1fbd7fbba
Bug fixes from compliance tests with WireGuard
2019-11-18 12:04:20 +01:00
Mathias Hall-Andersen
64707b0471
Update configuration API
2019-11-17 19:52:40 +01:00
Mathias Hall-Andersen
05710c455f
Update UAPI semantics for remove
2019-11-15 15:32:36 +01:00
Mathias Hall-Andersen
a85725eede
Initial version of full UAPI parser
2019-11-13 15:30:16 +01:00
Mathias Hall-Andersen
5b555a2e17
Work on UAPI serialize device
2019-11-11 23:13:46 +01:00
Mathias Hall-Andersen
2ff044dda9
Implemented UAPI "get" line-parser
2019-11-10 17:57:39 +01:00
Mathias Hall-Andersen
dd85201c15
Removal of secret key in the handshake module
2019-11-08 19:00:12 +01:00
Mathias Hall-Andersen
293914e47b
Implement disable/enable timers
2019-11-06 13:50:38 +01:00
Mathias Hall-Andersen
6ba40f17cb
Work on Up/Down operation on WireGuard device
2019-11-04 13:19:27 +01:00
Mathias Hall-Andersen
a0fa261a8a
Work on UAPI parser
2019-11-03 18:33:49 +01:00
Mathias Hall-Andersen
027d3d24d9
Work on configuration interface
2019-11-02 21:58:04 +01:00
Mathias Hall-Andersen
38cbe50223
Add derived_session
2019-10-31 19:17:20 +01:00
Mathias Hall-Andersen
b25c21885b
Work on timer semantics
2019-10-31 17:11:09 +01:00
Mathias Hall-Andersen
c413417196
Remove unused dependencies
2019-10-30 16:29:31 +01:00
Mathias Hall-Andersen
afc96611a5
Change router job to accommodate keep_key_fresh
2019-10-30 12:01:12 +01:00
Mathias Hall-Andersen
e04a11a8ca
Unified use of make_packet during tests
2019-10-29 16:53:59 +01:00
Mathias Hall-Andersen
4ff328b7da
First full test of pure WireGuard
2019-10-28 14:48:24 +01:00
Mathias Hall-Andersen
3e829c04d1
Fixed Ordering::Acquire -> Ordering::SeqCst typo
2019-10-23 14:14:08 +02:00
Mathias Hall-Andersen
8107973342
Work on pure WireGuard test
2019-10-23 14:00:21 +02:00
Mathias Hall-Andersen
ee3599d550
Moved IO traits into platform module
2019-10-23 12:08:35 +02:00
Mathias Hall-Andersen
3fa928b315
Work on platform specific code (Linux)
2019-10-23 10:32:18 +02:00
Mathias Hall-Andersen
2f3ceab036
Work on porting timer semantics and linux platform
2019-10-16 13:40:40 +02:00
Mathias Hall-Andersen
a08fd4002b
Work on Linux platform code
2019-10-13 22:26:12 +02:00
Mathias Hall-Andersen
6000cbf7e4
Port timer.c from WireGuard
2019-10-11 14:34:16 +02:00
Mathias Hall-Andersen
3d6e8f08a7
Enable adding TUN reader to WG interface
2019-10-11 12:57:24 +02:00
Mathias Hall-Andersen
7ce5415169
Start porting kernel timer semantics
2019-10-09 20:22:16 +02:00
Mathias Hall-Andersen
761c46064d
Restructure IO traits.
2019-10-09 15:08:26 +02:00
Mathias Hall-Andersen
c82d3e554b
Restructure dummy implementations
2019-10-06 13:33:15 +02:00
Mathias Hall-Andersen
edfd2f235a
Added key_confirmed callback
2019-09-28 18:01:55 +02:00
Mathias Hall-Andersen
794933d6dd
Work on peer timers
2019-09-22 21:35:06 +02:00
Mathias Hall-Andersen
5cc1083499
Added zero_key to peer
2019-09-21 17:22:03 +02:00
Mathias Hall-Andersen
6311aa3402
WIP: TUN IO worker
...
Also removed the type parameters from the handshake device.
2019-09-18 15:31:10 +02:00
Mathias Hall-Andersen
dfe4a22920
WIP: Work on handshake worker
2019-09-16 22:33:46 +02:00
Mathias Hall-Andersen
32c030367c
WIP: Handshake queue and workers
2019-09-15 21:10:23 +02:00
Mathias Hall-Andersen
f46762183a
Sent staged packets when key-pair confirmed
2019-09-15 15:15:15 +02:00
Mathias Hall-Andersen
b31becda71
Begin work on the pure Wireguard implemenation
...
Start joining the handshake device and router device in the top-level Wireguard implemenation.
2019-09-14 12:43:09 +02:00
Mathias Hall-Andersen
c3ad827197
Test for confirmation of key using staged packet
2019-09-11 16:36:38 +02:00
Mathias Hall-Andersen
de48bec958
Simplified router tests
2019-09-11 16:28:32 +02:00
Mathias Hall-Andersen
02d9bdcc96
Full inbound/outbound router test
2019-09-10 21:42:21 +02:00
Mathias Hall-Andersen
e371d39052
Begin work on full router interaction unittest
2019-09-08 12:59:35 +02:00
Mathias Hall-Andersen
eae915b2e8
Fixed outbound unittest
2019-09-07 19:19:51 +02:00
Mathias Hall-Andersen
7b61ee4c2d
Write inbound packets to TUN device
2019-09-07 18:38:19 +02:00
Mathias Hall-Andersen
8551e03ee3
Added outbound benchmark
...
Decent performance (~1.5Gb/s on old XPS laptop from 2014),
biggest bottleneck seems to be the heap allocator,
swapping with jemalloc yields 2x performance.
2019-09-05 19:58:12 +02:00
Mathias Hall-Andersen
b45d49201d
Output test number and parameters to debug
2019-09-04 21:44:11 +02:00
Mathias Hall-Andersen
af9c76452f
More extensive outbound test
2019-09-04 21:42:10 +02:00
Mathias Hall-Andersen
310be99fa6
Expanded outbound test
2019-09-04 19:22:47 +02:00
Mathias Hall-Andersen
6d11da441b
Simply passing of JobBuffer ownership
2019-09-04 19:08:13 +02:00
Mathias Hall-Andersen
f55014ef8f
Wake workers when submitting work
2019-09-02 23:32:07 +02:00
Mathias Hall-Andersen
62d71a7a67
Reconsider inorder queueing
2019-09-02 20:22:47 +02:00
Mathias Hall-Andersen
929eadb651
Outbound cryptkey routing
2019-09-01 17:16:01 +02:00
Mathias Hall-Andersen
d16521f4c7
Added Bind trait to router
2019-08-31 21:00:10 +02:00
Mathias Hall-Andersen
46d76b80c6
Reduce number of type parameters in router
...
Merge multiple related type parameters into trait,
allowing for easier refactoring and better maintainability.
2019-08-31 20:25:16 +02:00
Mathias Hall-Andersen
c823af1a9c
Explicitly clear t0 in KDF macro
2019-08-31 15:52:41 +02:00
Mathias Hall-Andersen
7e5852ec26
Fix race condition on response processing
2019-08-31 15:46:18 +02:00
Mathias Hall-Andersen
51179f5433
Better management of key material
2019-08-31 15:03:14 +02:00
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