forked from irungentoo/toxcore
-
Notifications
You must be signed in to change notification settings - Fork 291
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
feat: WIP NoiseIK handshake based on libsodium #2450
Draft
goldroom
wants to merge
145
commits into
TokTok:master
Choose a base branch
from
goldroom:noiseIK_2023_PR
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 98 commits
Commits
Show all changes
145 commits
Select commit
Hold shift + click to select a range
44526aa
Started implementing an XAEAD function based on XChaCha20-Poly1305/li…
goldroom e8af1d3
Added XAEAD functions, added HMAC-SHA512 functions, added HKDF for No…
goldroom f8e28cc
Added HMAC+HKDF functions to crypto_core.h, fixed wrong ). Fixed mino…
goldroom 2ce1787
Continued Noise handshake implementation.
goldroom abfeefa
Adapted create_crypto_handshake() for Noise Initiator and Responder, …
goldroom 8711b20
Fixed noise_handshake_init() which lead to minor adaptions in noise_c…
goldroom d0b9477
Merged noise_create_crypto_handshake() into create_crypto_handshake()…
goldroom 4e25288
Adapted rest of necessary functions for Noise-based handshake.
goldroom b653e8b
Fixed SegFault because of unallocated noise_handshake memory. Added d…
goldroom 6a70bfb
Added debug output. Fixed noise_handshake_init() for Initiator case.
goldroom f02b8a5
Added debugging code to log behavior, fixed bug in . Currently decryp…
goldroom a06a115
NoiseIK handshake and NoiseIK transport encryption working. One CRYPT…
goldroom d4184c5
Cleaned up logging/debugging code. Switched to Tox logger.
goldroom e084bdb
Changed buffer of log message from 1024 to 4096 bytes to be able to l…
goldroom f4ab64e
Cleaned up comments/TODOs.
goldroom 350d515
fix/cleanup: Changed noise_handshake in Crypto_Connection and New_Con…
goldroom 0d5b81a
cleanup: reduced log amount by removing packet debug logging.
goldroom 8462f0c
debug: added debug output to identify UAF issue root cause.
goldroom 3d59d43
Changed noise_handshake to dynamic alloc again in Crypto_Connection.
goldroom 0f3c2b4
fix: fixed ASAN memleaks after noise_handshake calloc in create_crypt…
goldroom f175976
Improvements and added debugging due to test timeouts. Buggy, but mos…
goldroom fdd964d
Fix: Fixed issues when two peers initiate a handshake at the same tim…
goldroom f6c6830
Fix: Added further debug logging and fixed issue in special case of i…
goldroom e2cf7ff
cleanup: small cleanup of debug/logging code.
goldroom 7e03515
change: moved noise_handshake_init() to handle_cookie_response for IN…
goldroom 85f4496
fix: fixed current behavior in handle_crypto_hs(). fixed wrong memzer…
goldroom 46ae442
cleanup: removed unnecessary code.
goldroom be6445a
Implemented different handshake behavior. Currently fails at create_s…
goldroom 721f887
fix/cleanup: fixed connection status bug in accept_crypto_connection(…
goldroom ecd7312
cleanup: Removed unused crypto_hmac512_verify(). Moved generic noise_…
goldroom c80bbb3
fix: fix compiler error due to usage of public/private.
goldroom e052b5d
cleanup/doc: Cleaned up Noise related code in crypto_core. Added Nois…
goldroom 9d861a8
fix: Fixed typos in documentation.
goldroom fb4d415
cleanup/doc: cleaned up comments and added documentation to net_crypt…
goldroom 2634021
merge: merged current master. Resolved conflicts in .
goldroom e8edb9f
fix: missed one curly bracket.
goldroom e0cfc39
fix: fix double free after merge.
goldroom 58d0df4
fix/cleanup: Changed NULL to nullptr, free() to mem_delete(), calloc(…
goldroom e4dbc39
fix: removed dependency for bin2hex_toupper() from create_common.h. A…
goldroom 9733175
fix: minor fixes for CI.
goldroom dc65e97
fix: minor fixes for CI.
goldroom 6a030f0
fix: minor fixes for CI.
goldroom af18b08
fix: minor fixes for CI.
goldroom 91128c6
fix/cleanup: changed crypto_hkdf() to two outputs because output3 is …
goldroom e9dfc41
fix: minor fixes for CI.
goldroom 04f87ed
fix: changed noise_mix_key() to use crypto_scalarmult_curve25519() in…
goldroom f22d074
cleanup: removed unnecessary memcpys and related parameters from hand…
goldroom ce7bb03
feat: Encrypt cookies in Noise handshake packets and authenticate via…
goldroom 063d0c2
cleanup: removed unnecessary TODOs.
goldroom 8d96364
cleanup: moved Noise Split (symmetric key derivation).
goldroom 04326d8
fix/cleanup: minor changes for CI checks.
goldroom 862770d
fix: fix for cimple and MSAN uninitialized value.
goldroom d6a4338
fix: MSAN uninitialized value.
goldroom 663f8cc
fix: for TSAN.
goldroom 7485b14
test: testing changed connection_kill() behavior.
goldroom 73d3ddf
fix: fixed handle_crypto_handshake() and calls because public_key (=r…
goldroom 60fb6ae
fix: fixed call to handle_crypto_handshake().
goldroom a7eccb6
add handshake compatiblilty option
zoff99 dc4492c
cleanup: minor cleanup
goldroom e5606af
Merge branch 'master' into noiseIK_2023_PR
goldroom 3c16f65
fix: fix for ubsan.
goldroom 781828a
fix: fix for ubsan.
goldroom 654f26a
fix: fix for ubsan.
goldroom 04e07e1
Merge branch 'tox_option_fallback' of github.com:zoff99/c-toxcore int…
goldroom 9643bf3
Merge branch 'zoff99-tox_option_fallback' into noiseIK_2023_PR
goldroom 61695d4
fix: fixed noise backwards compatibility option.
goldroom ffa677e
feat: backwards compatibility to non-Noise handshake.
goldroom b78376c
feat: backwards compatibility to non-Noise handshake.
goldroom 254c223
Merge branch 'master' into noiseIK_2023_PR
iphydf d38f6e8
fix merge issue
iphydf 4f16bb2
Restyled by astyle
restyled-commits e8ab0f6
Merge branch 'master' into noiseIK_2023_PR
goldroom 190c038
fix: removed unused OtherCookie from RESPONDER handshake packet.
goldroom 2201b8c
Fix: fixed wrong usages of CRYPTO_PUBLIC_KEY_SIZE to CRYPTO_SECRET_KE…
goldroom a52f2fd
feat: backwards compatibility to non-Noise handshake.
goldroom 075d888
fix: fixed uninitialized variable.
goldroom 688635a
fix: fixed uninitialized variable.
goldroom c16643d
fix: fixed reference to nullptr.
goldroom 01d175a
debug: added debug output.
goldroom 2325cc1
fix: possible fix for wrong non-Noise handshake.
goldroom c64f676
feat: backwards compatibility to non-Noise handshake. Successfully te…
goldroom 4286d4b
fix: fix for backwards compatibility to non-Noise handshake.
goldroom 21b9126
cleanup: stated explicit lengths for Noise function parameters (where…
goldroom 0ee531b
Merge branch 'master' into noiseIK_2023_PR
goldroom 760b4a3
fix: fixed merge issue found by coverage-linux check.
goldroom a467d45
cleanup/fix: changed parameter ordering of crypto_hkdf() to make toks…
goldroom 7847245
fix: fixes for CI.
goldroom 85d12b6
fix: added missing non_null()/nullable() statements to .
goldroom d87f9c1
feat: Implemented Noise_IK_25519_ChaChaPoly_SHA512 instead of Noise_I…
goldroom 34a88d4
fix: fix param for asan/tsan/ubsan.
goldroom 06404d5
fix: changed Noise protocol name to Noise_IK_25519_ChaChaPoly_SHA512.
goldroom f577864
test: trying test vectors from noise-c
goldroom f9ad7c4
Fixed crypto_hkdf() in crypto_core.c and verified with test vectors. …
goldroom 252c443
Added further testing steps. Everything correct (incl. final handshak…
goldroom a47fbbc
Adapted return type of aead/xaead encrypt/decrypt functions and remov…
goldroom 55b3ef5
feat: Added verification of Noise_IK_25519_ChaChaPoly_SHA512 test vec…
goldroom 336c5de
fix: removed logger.h from crypto_core.h and removed logging paramete…
goldroom f7b7097
fix: removed logging param and added newline to crypto_core.c
goldroom 23f2bb2
fix: fixes for CI
goldroom c8566ef
fix: fixes for CI
goldroom bb95f24
fix: fixes for CI
goldroom bbc1c3c
fix: fixes for CI
goldroom 61825f1
fix: fixed bug introduced in crypto_test with CI fixes
goldroom 920ec60
fix: fixed terminating null character, noiseIK test vectors still ver…
goldroom e7e30d2
fix: fixes for CI
goldroom 6e5e90a
Merge branch 'master' into noiseIK_2023_PR
goldroom 1b4e963
feat: Implemented enabling/disabling of backwards compatiblity to non…
goldroom 4b26a5d
fix: fix two tests after adding Tox option to disable backwards compa…
goldroom 11cbf61
cleanup: code cleanup and documentation of net_crypto.c
goldroom cea8d45
cleanup: minor cleanup of comments/documentation
goldroom 341e150
Merge branch 'master' into noiseIK_2023_PR
iphydf a2da318
cleanup: code cleanup and documentation of net_crypto.c
goldroom d7b6814
docs: Added doc and TODOs.
goldroom 841ba31
refactor: Implemented Noise_IK_25519_ChaChaPoly_BLAKE2s instead of No…
goldroom c8130b8
fix: added static
goldroom 39736cb
fix: fixed include, not sure where that came from
goldroom 2c65128
Merge branch 'master' into noiseIK_2023_PR
goldroom 87e6350
fix: fixes after master merge
goldroom cabca2a
fix: formatting after merge, ASAN caught memory leak in crypto_test.c
goldroom fa59b7b
feat: started implementation of (possible) new cookie functionality.
goldroom b3d73e2
fix: fixes for CI.
goldroom fdb0163
feat: implementation of (possible) new cookie functionality.
goldroom 3440302
feat: implementation of (possible) new cookie mechanism.
goldroom 44e58f7
feat: implementation of possible new cookie mechanism. Currently brok…
goldroom 7ec460f
fix: added debug output and fixed NoiseIK cookie implementation issue…
goldroom 5ac12e7
fix: fixed typo
goldroom 8c5b5c8
Revert "fix: fixed typo"
goldroom db6571a
Revert "fix: added debug output and fixed NoiseIK cookie implementati…
goldroom cead98b
Revert "feat: implementation of possible new cookie mechanism. Curren…
goldroom 9817f28
Revert "feat: implementation of (possible) new cookie mechanism."
goldroom 5e17a87
Revert "feat: implementation of (possible) new cookie functionality."
goldroom c780c61
Revert "fix: fixes for CI."
goldroom 04c4a38
Revert "feat: started implementation of (possible) new cookie functio…
goldroom d4f7f73
refactor: minor refactoring and documentation (based on reverted cook…
goldroom 9932efb
Merge branch 'master' into noiseIK_2023_PR
goldroom 25311c7
chore: added Noise compatibility option again after master merge.
goldroom 3060956
fix: cannot have const Net_Crypto in handle_packet_crypto_hs() here …
goldroom 76acc47
chore: cleanup and documentation of crypto_core.
goldroom ee4e7c2
refactor: removed base nonces from NoiseIK handshake packets to use (…
goldroom 0ecbd3b
fix: fixed friend_connection after New_Connection refactoring.
goldroom 34b931c
chore: cleanup and documentation.
goldroom cbf09c5
fix: fix for CI
goldroom e2e65c2
cleanup: minor cleanup
goldroom 5a82583
cleanup: minor cleanup
goldroom 8bdcac4
fix: fixed two issues because of noise_handshake memzero in backwards…
goldroom File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,6 +77,9 @@ build/ | |
# VScode | ||
.vscode/ | ||
|
||
# Tests via Zoff | ||
.localrun/ | ||
|
||
# Netbeans | ||
nbproject | ||
|
||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you forgot the todo :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intentionally, as a some other TODOs ;)