-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mostly misc cleanups, wireguard dissecting and network packet testing #16
Commits on Feb 24, 2024
-
Configuration menu - View commit details
-
Copy full SHA for cce12ac - Browse repository at this point
Copy the full SHA cce12acView commit details
Commits on Feb 25, 2024
-
Use Network representation for port numbers
Always store port numbers in n2n_sock_t, since they are basically opaque strings - the only time this needs to change is for presentation to a human. This should fix some observed errors with the data contained within network packets.
Configuration menu - View commit details
-
Copy full SHA for e938e78 - Browse repository at this point
Copy the full SHA e938e78View commit details -
Configuration menu - View commit details
-
Copy full SHA for e82a1e4 - Browse repository at this point
Copy the full SHA e82a1e4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3e188b8 - Browse repository at this point
Copy the full SHA 3e188b8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 622fae8 - Browse repository at this point
Copy the full SHA 622fae8View commit details -
Configuration menu - View commit details
-
Copy full SHA for ff440ac - Browse repository at this point
Copy the full SHA ff440acView commit details -
Configuration menu - View commit details
-
Copy full SHA for 406f90f - Browse repository at this point
Copy the full SHA 406f90fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 64bc790 - Browse repository at this point
Copy the full SHA 64bc790View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9983083 - Browse repository at this point
Copy the full SHA 9983083View commit details -
Configuration menu - View commit details
-
Copy full SHA for 359ab0f - Browse repository at this point
Copy the full SHA 359ab0fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ce4c6c - Browse repository at this point
Copy the full SHA 9ce4c6cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3386cb8 - Browse repository at this point
Copy the full SHA 3386cb8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 41d418b - Browse repository at this point
Copy the full SHA 41d418bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1edb03b - Browse repository at this point
Copy the full SHA 1edb03bView commit details -
Configuration menu - View commit details
-
Copy full SHA for ccc661c - Browse repository at this point
Copy the full SHA ccc661cView commit details -
Configuration menu - View commit details
-
Copy full SHA for e0f506c - Browse repository at this point
Copy the full SHA e0f506cView commit details -
Configuration menu - View commit details
-
Copy full SHA for d3d9270 - Browse repository at this point
Copy the full SHA d3d9270View commit details -
Revert "Update test data to match new sock encoding"
This reverts commit e0f506c.
Configuration menu - View commit details
-
Copy full SHA for 0c45984 - Browse repository at this point
Copy the full SHA 0c45984View commit details -
Revert "Fix sock encoding now that we store ports in network order"
This reverts commit 1edb03b.
Configuration menu - View commit details
-
Copy full SHA for 029a4ea - Browse repository at this point
Copy the full SHA 029a4eaView commit details -
Revert "Use Network representation for port numbers"
This reverts commit e938e78. It appears that this breaks federation with n2n supernode. More investigation required.
Configuration menu - View commit details
-
Copy full SHA for a4f4eae - Browse repository at this point
Copy the full SHA a4f4eaeView commit details
Commits on Feb 26, 2024
-
Configuration menu - View commit details
-
Copy full SHA for cb1e2e1 - Browse repository at this point
Copy the full SHA cb1e2e1View commit details -
Configuration menu - View commit details
-
Copy full SHA for d6bca21 - Browse repository at this point
Copy the full SHA d6bca21View commit details -
Configuration menu - View commit details
-
Copy full SHA for d29e3ac - Browse repository at this point
Copy the full SHA d29e3acView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2dee74d - Browse repository at this point
Copy the full SHA 2dee74dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2e40291 - Browse repository at this point
Copy the full SHA 2e40291View commit details -
Dont use encode functions when not needed
The wire encode_* functions are intended to build the packets that will be sent on the wire. These uses of encode_mac() were for structures that would then be passed to another encode_* function, thus they are not building wire structs. Additionally, the encode_mac() degenerates into a string copy, so just do that.
Configuration menu - View commit details
-
Copy full SHA for 4101d9b - Browse repository at this point
Copy the full SHA 4101d9bView commit details -
No need to encode unstructured data
Since these 64bit writes are entirely unstructured random data, they have no difference between their in memory or on the wire encoding. They are also not used in the decode step, so are just acting as a nonce. Removing their use allows cleaner separation of the wire protocol definitions.
Configuration menu - View commit details
-
Copy full SHA for cd615d5 - Browse repository at this point
Copy the full SHA cd615d5View commit details -
Configuration menu - View commit details
-
Copy full SHA for a99390f - Browse repository at this point
Copy the full SHA a99390fView commit details -
Ensure the transform tests using stable nonces
Add a function to the random number generator to reseed with a fixed and known seed - this allows us to run any tests that consume random numbers with a known and expected result. Specifically, the transform functions use a prefix of randomness that is basically serving as a nonce. This was previously stable because we didnt seed the random number generator, but adding any new transform functions in the middle would have perturbed the following results - so we use the stable default before each transform. This came to light as the result of changing to use native host ordering for the random nonce bytes - which disturbed the encrypted output.
Configuration menu - View commit details
-
Copy full SHA for 70a011d - Browse repository at this point
Copy the full SHA 70a011dView commit details -
Revert "Do check the build deps before trying to build"
This reverts commit d6bca21. The github ubuntu builder doesnt have the right packages installed - even though there is a `mk-build-deps -i` command run before the `make dpkg` - this is probably because it is cross-compiling and only the native packages are installed. ``` env -u CFLAGS dpkg-buildpackage -rfakeroot -us -uc --host-type i686-linux-gnu dpkg-buildpackage: info: source package n3n dpkg-buildpackage: info: source version 3.1.1-815-g70a011d-1 dpkg-buildpackage: info: source distribution UNRELEASED dpkg-buildpackage: info: source changed by <builder@example.com> dpkg-source --before-build . dpkg-buildpackage: info: host architecture i386 dpkg-checkbuilddeps: error: Unmet build dependencies: libcap-dev libzstd-dev python3 uncrustify dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting dpkg-buildpackage: warning: (Use -d flag to override.) ```
Configuration menu - View commit details
-
Copy full SHA for 51e0ba8 - Browse repository at this point
Copy the full SHA 51e0ba8View commit details
Commits on Feb 27, 2024
-
Configuration menu - View commit details
-
Copy full SHA for eee0f92 - Browse repository at this point
Copy the full SHA eee0f92View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5a114bd - Browse repository at this point
Copy the full SHA 5a114bdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 63e8113 - Browse repository at this point
Copy the full SHA 63e8113View commit details
Commits on Feb 28, 2024
-
Configuration menu - View commit details
-
Copy full SHA for ca310fd - Browse repository at this point
Copy the full SHA ca310fdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7ab01ad - Browse repository at this point
Copy the full SHA 7ab01adView commit details -
Configuration menu - View commit details
-
Copy full SHA for 66a5a64 - Browse repository at this point
Copy the full SHA 66a5a64View commit details -
Configuration menu - View commit details
-
Copy full SHA for 54748ec - Browse repository at this point
Copy the full SHA 54748ecView commit details -
Configuration menu - View commit details
-
Copy full SHA for 491fc19 - Browse repository at this point
Copy the full SHA 491fc19View commit details -
Configuration menu - View commit details
-
Copy full SHA for ad8f9be - Browse repository at this point
Copy the full SHA ad8f9beView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6842829 - Browse repository at this point
Copy the full SHA 6842829View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6ef1333 - Browse repository at this point
Copy the full SHA 6ef1333View commit details -
Configuration menu - View commit details
-
Copy full SHA for ac10aca - Browse repository at this point
Copy the full SHA ac10acaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3977e33 - Browse repository at this point
Copy the full SHA 3977e33View commit details -
Configuration menu - View commit details
-
Copy full SHA for d8393c2 - Browse repository at this point
Copy the full SHA d8393c2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4ce132f - Browse repository at this point
Copy the full SHA 4ce132fView commit details
Commits on Feb 29, 2024
-
Configuration menu - View commit details
-
Copy full SHA for b61c213 - Browse repository at this point
Copy the full SHA b61c213View commit details -
Configuration menu - View commit details
-
Copy full SHA for e845a2f - Browse repository at this point
Copy the full SHA e845a2fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2ce3a32 - Browse repository at this point
Copy the full SHA 2ce3a32View commit details
Commits on Mar 6, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 531aff3 - Browse repository at this point
Copy the full SHA 531aff3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1e95cf8 - Browse repository at this point
Copy the full SHA 1e95cf8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 81c9885 - Browse repository at this point
Copy the full SHA 81c9885View commit details
Commits on Mar 7, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 3f376a3 - Browse repository at this point
Copy the full SHA 3f376a3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 921ae47 - Browse repository at this point
Copy the full SHA 921ae47View commit details -
Configuration menu - View commit details
-
Copy full SHA for a5e0657 - Browse repository at this point
Copy the full SHA a5e0657View commit details -
Configuration menu - View commit details
-
Copy full SHA for 225bb0e - Browse repository at this point
Copy the full SHA 225bb0eView commit details -
Configuration menu - View commit details
-
Copy full SHA for e1699f6 - Browse repository at this point
Copy the full SHA e1699f6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 521de7f - Browse repository at this point
Copy the full SHA 521de7fView commit details
Commits on Mar 9, 2024
-
Configuration menu - View commit details
-
Copy full SHA for da7f635 - Browse repository at this point
Copy the full SHA da7f635View commit details -
Configuration menu - View commit details
-
Copy full SHA for 72bdde6 - Browse repository at this point
Copy the full SHA 72bdde6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4081718 - Browse repository at this point
Copy the full SHA 4081718View commit details -
Avoid showing known warning compiling speck
The speck code has been generating warnings at compile time for as long as I can remember. Whilst it may be a valid warning, it does not appear to have random uninitialised data in the Y[2] as the unit tests are producing stable results. Ideally, this warning would be fixed. The simple fix of initialising the variable could slow down the encryption routine. So - before trying that - there should be an automated encryption performance test added. There is also a plan to make more accessible optimised versions of the crypto routines, which would require refactoring this code, so it may unearth more warnings or shift the message in a way that helps to diagnose things. For the moment, take the simple path of ignoring that warning for this one file. ``` In file included from /usr/lib/gcc/x86_64-linux-gnu/12/include/xmmintrin.h:1316, from /usr/lib/gcc/x86_64-linux-gnu/12/include/immintrin.h:31, from /home/hamish/r/n3n/include/speck.h:75, from src/speck.c:25: In function ‘_mm_unpackhi_epi64’, inlined from ‘speck_encrypt_xor.isra’ at src/speck.c:587:9: /usr/lib/gcc/x86_64-linux-gnu/12/include/emmintrin.h:1024:19: warning: ‘Y[2]’ may be used uninitialized [-Wmaybe-uninitialized] 1024 | return (__m128i)__builtin_ia32_punpckhqdq128 ((__v2di)__A, (__v2di)__B); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/speck.c: In function ‘speck_encrypt_xor.isra’: src/speck.c:540:16: note: ‘Y[2]’ was declared here 540 | u128 X[4], Y[4], Z[4]; \ | ^ src/speck.c:587:9: note: in expansion of macro ‘Encrypt_Dispatcher’ 587 | Encrypt_Dispatcher(128); | ^~~~~~~~~~~~~~~~~~ ```
Configuration menu - View commit details
-
Copy full SHA for 8cc64b3 - Browse repository at this point
Copy the full SHA 8cc64b3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 65a4aad - Browse repository at this point
Copy the full SHA 65a4aadView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5b72e55 - Browse repository at this point
Copy the full SHA 5b72e55View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9676c68 - Browse repository at this point
Copy the full SHA 9676c68View commit details -
Configuration menu - View commit details
-
Copy full SHA for 80e974a - Browse repository at this point
Copy the full SHA 80e974aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 26d6e99 - Browse repository at this point
Copy the full SHA 26d6e99View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4a0e593 - Browse repository at this point
Copy the full SHA 4a0e593View commit details