diff options
author | Luke Dashjr <luke_github1@dashjr.org> | 2023-06-29 13:48:11 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-29 13:48:11 -0400 |
commit | fbd92f24952d209c313b86b8849c677f19ed1036 (patch) | |
tree | baba60b05f82a9f189f4b7645ad448867c45a550 /bip-0324.mediawiki | |
parent | 6e82728e6bd265d0344f2e4f2f318cbc2700b4f8 (diff) | |
parent | 59915dfc71ddc558f76a72ebd8e84cad184d3143 (diff) |
Merge pull request #1436 from theStack/bip324_handsake_remove_initiating_param
bip-0324: remove `initiating` parameter from `ellswift_create` calls
Diffstat (limited to 'bip-0324.mediawiki')
-rw-r--r-- | bip-0324.mediawiki | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bip-0324.mediawiki b/bip-0324.mediawiki index ced459b..7bd10dc 100644 --- a/bip-0324.mediawiki +++ b/bip-0324.mediawiki @@ -181,11 +181,11 @@ As explained before, these messages are sent to set up the connection: ---------------------------------------------------------------------------------------------------- | Initiator Responder | | | - | x, ellswift_X = ellswift_create(initiating=True) | + | x, ellswift_X = ellswift_create() | | | | --- ellswift_X + initiator_garbage (initiator_garbage_len bytes; max 4095) ---> | | | - | y, ellswift_Y = ellswift_create(initiating=False) | + | y, ellswift_Y = ellswift_create() | | ecdh_secret = v2_ecdh( | | y, ellswift_X, ellswift_Y, initiating=False) | | v2_initialize(initiator, ecdh_secret, initiating=False) | @@ -333,7 +333,7 @@ To establish a v2 encrypted connection, the initiator generates an ephemeral sec <pre> def initiate_v2_handshake(peer, garbage_len): - peer.privkey_ours, peer.ellswift_ours = ellswift_create(initiating=True) + peer.privkey_ours, peer.ellswift_ours = ellswift_create() peer.sent_garbage = rand_bytes(garbage_len) send(peer, peer.ellswift_ours + peer.sent_garbage) </pre> @@ -350,7 +350,7 @@ def respond_v2_handshake(peer, garbage_len): while len(peer.received_prefix) < 12: peer.received_prefix += receive(peer, 1) if peer.received_prefix[-1] != V1_PREFIX[len(peer.received_prefix) - 1]: - peer.privkey_ours, peer.ellswift_ours = ellswift_create(initiating=False) + peer.privkey_ours, peer.ellswift_ours = ellswift_create() peer.sent_garbage = rand_bytes(garbage_len) send(peer, ellswift_Y + peer.sent_garbage) return |