Commit graph

52 commits

Author SHA1 Message Date
mamoniot
c2125db444
added pub option 2023-03-21 08:25:15 -04:00
mamoniot
984782d779
made the correctness tests less aggressive 2023-03-20 17:32:43 -04:00
mamoniot
7ec194a6d1
ran cargo fmt 2023-03-20 15:29:02 -04:00
mamoniot
f6540e129a
added arc_pool to tetanus 2023-03-20 15:26:15 -04:00
Adam Ierymenko
d0446a965e
Fixes to crypto on macOS, a lot of cleanup, and work on full state replication for V2 VL2 (#1911)
* Move some stuff around in prep for a VL2 rework and identity rework.

* Mix ephemeral keys into "h"

* More topology stuff for VL2.

* Simplify key queue, fix macOS issues with bindings, and no need to cache PSK forever.

* Some more merge fixes.

* A bunch of ZSSP cleanup and optimization. Runs a bit faster now.

* Remove some unused util code.

* scatter gather stuff

* The scatter/gather algorithm works.

* Make OpenSSL init get called automatically at process launch, and some more scatter gather work.

* added support for cloning on EcKey

* Scatter/gather, move SG into VL2 since that is where it will be used, add an array chunker to utils::memory

* Simplify some Rust generic madness.

* docs

* Some cleanup and reorg.

* Bring back AES-GMAC-SIV tests.

* Turns out a Mutex is not really any slower...

---------

Co-authored-by: mamoniot <mamoniot@protonmail.com>
2023-03-14 15:29:20 -04:00
Adam Ierymenko
f66a2a7ef9
Tetanus adam (#1906)
* Move some stuff around in prep for a VL2 rework and identity rework.

* Mix ephemeral keys into "h"

* More topology stuff for VL2.

* Simplify key queue, fix macOS issues with bindings, and no need to cache PSK forever.

* Some more merge fixes.

* A bunch of ZSSP cleanup and optimization. Runs a bit faster now.
2023-03-10 17:03:22 -05:00
Sean OMeara
0c91b75bbd silence compiler warnings about _unused_variables (#1852)
Tetanus noise xk (#1881)

* Noise XK work in progress.

* A whole lot more Noise_XK work... exchange almost done.

* Delete a bunch of commented out old Noise_IK code.

* Add back in send() and a few other things to Noise_XK ZSSP.

* Some p384 experiment in attic

* A ton of ZSSP work, and put MPL on ZSSP.

* updated kbkdf512 to use the modern nist standard

* Parameterize KBKDF on resulting output key size the way NIST likes.

* updated variable comment

* Make the label a const parameter on kbkdf.

* updated variable comment

* Add MPL to utils and other stuff.

* layout tweak

* Some more ZSSP work and a VDF we may use.

* warning removal

* More ZSSP work, add benchmarks for mimcvdf.

* Almost ready to test...

* Build fix.

* Add automatic retransmission in the earliest stages of session init.

* Just about ready to test... wow.

* It opens a session.

* ZSSP basically works...

---------

Co-authored-by: mamoniot <mamoniot@protonmail.com>

Warning removal.

remove old docs

Remove old tests from ZSSP, new test in main() can also be made into a unit test in the future.

Add key_info() to get key information.

Rekeying is now tested and works.

Show key fingerprint.

Factor out memory:: stuff, does not appear to have any real performance benefit.

Rework defragmentation, and it now tolerates very poor link quality pretty well.

Circuit breaker for incoming defrag queue, and ZSSP now works very well even under very poor network conditions.

Format tweak.

ZSSP API updates.

Just a bit of final ZSSP cleanup before moving to another thing.
2023-03-03 13:47:22 -05:00
Adam Ierymenko
3db9603799 Change the header yet again to encrypt everything but the session ID and key index. 2023-01-11 19:31:58 -05:00
Adam Ierymenko
d415f1c31b Add an important assert 2022-12-16 11:10:31 -05:00
Adam Ierymenko
a5dfa45797 Remove unused and possibly unsafe code in memory.rs 2022-12-16 11:09:39 -05:00
mamoniot
fc4eddde74 finished buffer logic refactor 2022-12-14 14:41:14 -05:00
mamoniot
a7fdc82c5b switched to use of safer read and write functions 2022-12-14 12:57:10 -05:00
Brenton Bostick
17d09ee258
fix typos (#1810) 2022-12-13 11:10:27 +01:00
Adam Ierymenko
d0d34e75fd Build fix due to base64 crate API changes. 2022-12-12 13:37:36 -05:00
Adam Ierymenko
567b6027ae A bunch of work on the Postgres controller. 2022-12-09 16:04:25 -05:00
Adam Ierymenko
7c2e0b8507 Windows fixes... not quite ported yet but almost there. 2022-12-05 16:58:33 -05:00
Adam Ierymenko
19d973cfd4 (1) Implement typestate Verified for identity, (2) FileDatabase in controller now works. 2022-11-16 21:41:08 -05:00
Adam Ierymenko
5d9022f815 FileDB and timing fixes. 2022-11-11 18:23:45 -05:00
Adam Ierymenko
6bf978d4de Some cleanup, move some more V1 only fields into V1 credentials struct. 2022-11-11 16:11:02 -05:00
Adam Ierymenko
5772a135f5 More work on controller: FileDB change detection, etc. 2022-11-10 18:25:36 -05:00
Adam Ierymenko
ceaba4f725
Fix some warnings by either factoring out or allowing in one case. 2022-11-03 15:37:12 -04:00
Adam Ierymenko
ee4ce6a8ef
Tons of work: reorg traits to simplify, implement multicast authority stuff, other works in progress. 2022-11-03 11:11:04 -04:00
Adam Ierymenko
3266064549
Fixed name in network configs. 2022-10-28 22:25:03 -04:00
Adam Ierymenko
bc7a9e41bf
V2 network controller now provides a reply that at least parses! 2022-10-28 16:03:06 -04:00
Adam Ierymenko
9e6617b324
More controller work and some ZSSP cleanup. 2022-10-27 15:03:23 -04:00
Adam Ierymenko
8a50427833
A bunch of reorg to partition off V1 stuff for future convenience, and more controller work. 2022-10-26 14:00:07 -04:00
Adam Ierymenko
72f98dea14
cleanup 2022-10-23 11:04:16 -07:00
Adam Ierymenko
ac9bac6efd
docs 2022-10-21 16:51:49 -07:00
Adam Ierymenko
cf7f0b06df
Use a clever little hack to eliminate a great deal of cascading template sprawl from the core. 2022-10-21 16:50:07 -07:00
Adam Ierymenko
dc615e2b04
Tons and tons of work on the controller, and some other cleanup. 2022-10-07 11:53:10 -04:00
Adam Ierymenko
3385953e93
A bunch more work on VL2 config objects. 2022-09-30 13:57:59 -04:00
Adam Ierymenko
5d17c37b65
Remove parking_lot since as of 1.63 Rust std::mutex is usually as good or better. 2022-09-29 15:34:03 -04:00
Adam Ierymenko
b5e1c4f546
A bit more reorg. 2022-09-29 09:45:54 -04:00
Adam Ierymenko
2e469e282a
Docs and cleanup, and implement clone for pooled object if the object implements clone. 2022-09-29 09:13:12 -04:00
Adam Ierymenko
459b195fa4
Reorg some stuff and skeleton of separate controller binary 2022-09-28 14:08:29 -04:00
Adam Ierymenko
a6f09dbec4
Move datadir and make it generic. 2022-09-28 12:04:55 -04:00
Adam Ierymenko
38f8ee808e
A bunch of reorg to consolidate utils, controller work, and rework identity binary marshaling for better backward compability. 2022-09-27 15:46:18 -04:00
Adam Ierymenko
8592cd59e2
Controller stuff and implementing WHOIS 2022-09-23 09:56:38 -04:00
Adam Ierymenko
be000c2046
Centralize import of tokio to control its version and features. 2022-09-22 09:30:37 -04:00
Adam Ierymenko
768ec6e710
Tons more work: (1) remove async again from the core, (2) controller stuff, (3) retrofit other stuff to handle non-async core. 2022-09-21 16:43:47 -04:00
Adam Ierymenko
7ec46540fa
A ton more reorg work and controller work. 2022-09-20 12:10:05 -04:00
Adam Ierymenko
b4edad6bfb
Work in progress: massive reorg to separate concerns a bit more and allow stand-alone controllers etc. 2022-09-15 13:57:21 -04:00
Adam Ierymenko
b8e65b667c
Build fix, cruft simplification. 2022-09-14 11:03:00 -04:00
Adam Ierymenko
04b2adcf5f
Dead code removal, perf stuff 2022-09-14 08:59:33 -04:00
Adam Ierymenko
2649ce7571
A bunch of reorg, and add a safety valve to nuke the send key in ZSSP if it is hard-expired. 2022-09-13 17:27:58 -04:00
Adam Ierymenko
54d6fba6c5
cleanup 2022-09-13 12:45:42 -04:00
Adam Ierymenko
07fc8b2d2b
rustfmt 2022-09-13 10:48:36 -04:00
Adam Ierymenko
32abd20c38
A bunch of reorg and simplification in the network hypervisor. 2022-09-13 10:35:52 -04:00
Adam Ierymenko
98c0575a00
Add ICMP to endpoint, and some ZSSP revisions. 2022-09-09 15:45:22 -04:00
Adam Ierymenko
42f6f016e9
Fix some stuff, perf fixes, and add a check to the ZSSP header to make fragmentation attacks hard even for a MITM. 2022-09-07 13:18:52 -04:00