Skip to content

Instantly share code, notes, and snippets.

@Frando
Created January 28, 2020 19:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Frando/f60e08cde949790b6f146d59bce0764e to your computer and use it in GitHub Desktop.
Save Frando/f60e08cde949790b6f146d59bce0764e to your computer and use it in GitHub Desktop.

Rust is server

Listening on 127.0.0.1:8000
new connection from 127.0.0.1:52456
start handshaking
initiator: false
keypair public [160, 40, 198, 116, 22, 83, 78, 176, 233, 211, 154, 123, 37, 225, 135, 217, 143, 57, 220, 36, 141, 64, 202, 205, 154, 40, 249, 126, 1, 171, 64, 65] private [70, 92, 38, 45, 171, 60, 30, 169, 236, 96, 53, 30, 116, 242, 201, 22, 175, 223, 80, 0, 165, 119, 101, 25, 94, 101, 160, 229, 78, 174, 14, 64]
local pubkey: [a0, 28, c6, 74, 16, 53, 4e, b0, e9, d3, 9a, 7b, 25, e1, 87, d9, 8f, 39, dc, 24, 8d, 40, ca, cd, 9a, 28, f9, 7e, 1, ab, 40, 41]
local nonce: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
---------
[recv] len 58
[send] len 122
thread 'async-std/executor' panicked at 'called `Result::unwrap()` on an `Err` value: Kind(UnexpectedEof)', /home/bit/Code/rust/simple-hypercore-protocol/src/noise.rs:77:19

(node died with Noise handshake error)

Rust is client

start handshaking
initiator: true
keypair public [160, 40, 198, 116, 22, 83, 78, 176, 233, 211, 154, 123, 37, 225, 135, 217, 143, 57, 220, 36, 141, 64, 202, 205, 154, 40, 249, 126, 1, 171, 64, 65] private [70, 92, 38, 45, 171, 60, 30, 169, 236, 96, 53, 30, 116, 242, 201, 22, 175, 223, 80, 0, 165, 119, 101, 25, 94, 101, 160, 229, 78, 174, 14, 64]
local pubkey: [a0, 28, c6, 74, 16, 53, 4e, b0, e9, d3, 9a, 7b, 25, e1, 87, d9, 8f, 39, dc, 24, 8d, 40, ca, cd, 9a, 28, f9, 7e, 1, ab, 40, 41]
local nonce: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
---------
[send] len 58
[recv] len 122
decrypt result Err(())
thread 'main' panicked at '[error] handshake read: Decrypt', <::std::macros::panic macros>:5:6
stack backtrace:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment