Yusef Napora
d0ed06d10b
add Makefile for generating protobuf code
2020-01-20 10:30:55 -05:00
Yusef Napora
e616482ec8
use empty prologue
2020-01-11 09:26:45 -05:00
Yusef Napora
192f8eb236
derive session params from Transport
2019-12-12 16:23:49 -05:00
Yusef Napora
eb5f403c33
make Transport and config fields private
2019-12-12 16:23:49 -05:00
Yusef Napora
ff835a9cd9
camelCase field names
2019-12-12 16:23:49 -05:00
Yusef Napora
f360c666bd
move Keypair to its own file
2019-12-12 16:23:17 -05:00
Yusef Napora
8a5063a99d
rm redundant check for num bytes read
2019-12-12 15:51:51 -05:00
Yusef Napora
c67695a72e
don't swallow errors from rand.Read
2019-12-11 19:29:39 -05:00
Yusef Napora
8ab00e7201
rename constructors
2019-12-11 17:25:40 -05:00
Yusef Napora
ca63ecd6bc
use Options to configure transport
...
also, adds NewTransportGenerator for cases when you don't know the
libp2p host key when configuring the Noise transport
2019-12-11 17:25:40 -05:00
Yusef Napora
8349e50943
fix protocol id string
2019-12-11 16:18:19 -05:00
Steven Allen
04be62c1c8
chore: update deps
...
And bump minimum key to 2048.
2019-12-06 21:22:27 -05:00
Yusef Napora
b72caed3da
guard static key cache with mutex
2019-12-06 15:13:51 -05:00
Yusef Napora
1d0d036ac0
rename imports from ChainSafe to libp2p org
2019-12-06 13:28:22 -05:00
Yusef Napora
e360301114
Merge pull request #10 from libp2p/feat/message-chunking
...
Split large payloads into chunks
2019-12-06 12:47:45 -05:00
Yusef Napora
e9237a8341
split large plaintexts into chunks
2019-12-05 12:16:27 -05:00
Yusef Napora
84d5b558b5
add test for large plaintext payloads
2019-12-05 12:14:30 -05:00
Yusef Napora
c3157aaaa1
only set ik_complete = true if IK succeeds
2019-12-05 10:51:37 -05:00
Yusef Napora
423803f233
fix conditional for whether to use IK
2019-12-05 10:51:37 -05:00
Yusef Napora
0a75717944
fix hash function in Noise protocol name
2019-12-05 10:51:37 -05:00
Yusef Napora
fdf4c4428c
use Errorf instead of Error
2019-12-05 10:51:37 -05:00
Yusef Napora
ca9fa6c563
use correct message decoder in XXfallback
2019-12-05 10:51:37 -05:00
Yusef Napora
a7d5094883
check right handshake is used in noise pipes tests
2019-12-05 10:51:37 -05:00
Yusef Napora
c64dd2c19d
fix initiator / responder roles in test setup
2019-12-05 10:51:37 -05:00
Marten Seemann
3b381d806f
close the underlying connection when the handshake fails
2019-11-24 18:07:58 +07:00
Steven Allen
7c0aea2417
Merge pull request #34 from libp2p/no-key-error-check
...
make the error check for not receiving a public key more explicit
2019-11-11 16:06:40 -08:00
noot
ace277ee7c
change xx name string from blake2s to sha256
2019-11-04 15:58:37 -05:00
Hector Sanjuan
0328485c9f
Fix: Connection Closed after handshake
...
The context-cancelled watchdog goroutine may start running way after the
handshake has finished and the associated context has been cancelled (by the
executeDial() function in go-libp2p-swarm usuaully).
This results in the connection being closed right after being stablished.
2019-11-01 21:52:28 +01:00
noot
ba7b4e547c
improve log formatting
2019-08-27 03:47:07 -04:00
noot
edc89c2210
improve log formatting
2019-08-26 18:18:07 -04:00
noot
618ebb896a
fix ik/xx logic, add more tests for ik
2019-08-26 17:27:39 -04:00
noot
062c1b55e6
move keypair generation to constructors, add xxfallback integration test
2019-08-26 16:48:20 -04:00
noot
382b758957
add rw lock, streams functioning
2019-08-26 08:33:22 -04:00
noot
aad1bf223e
Merge branch 'begin-noise' of github.com:ChainSafe/go-libp2p-noise into begin-noise
2019-08-25 03:46:55 -04:00
noot
ce16998805
remove unneeded files
2019-08-25 03:46:24 -04:00
noot
7df7e33044
fix if statement in runHandshake, clean up code
2019-08-25 03:42:29 -04:00
David Ansermino
abb6b8bcfd
Merge branch 'master' into begin-noise
2019-08-25 03:28:08 +02:00
Ed Mazurek
5897e497e4
presentation ( #5 )
2019-08-25 03:26:32 +02:00
noot
048274e445
improve secureSession Read
2019-08-24 20:34:12 -04:00
noot
dece79595f
remove unneeded files
2019-08-24 18:03:50 -04:00
noot
85a35c04f0
send payload from initiator in XX last message
2019-08-24 18:03:22 -04:00
noot
45182a49e8
cleanup code ( #3 )
...
cleanup code, fix ReadSecure and WriteSecure
2019-08-24 22:48:33 +02:00
noot
b7d0e5bc52
remove c.out
2019-08-24 16:05:46 -04:00
noot
2a8a2cb67e
clean up
2019-08-24 16:03:17 -04:00
noot
a1ca411f53
fix ReadSecure and WriteSecure
2019-08-24 15:56:31 -04:00
noot
c01c852045
cleanup code
2019-08-24 15:43:27 -04:00
noot
e40f6b283e
use ipfs/go-log
2019-08-24 15:31:57 -04:00
noot
f3c6167915
ik->kkfallback complete
2019-08-24 15:17:58 -04:00
noot
7c6510e7ce
ephemeral keys passed from ik->xxfallback
2019-08-24 15:11:35 -04:00
noot
2de16d09a8
begin work on moving ephemeral key from ik->xx
2019-08-24 15:01:05 -04:00
noot
f7e9a08e15
add IK test
2019-08-24 14:11:26 -04:00
noot
50b18700de
wip XXfallback
2019-08-24 13:50:00 -04:00
noot
443240dc36
add secure read/writes
2019-08-24 12:29:27 -04:00
noot
fe54e1c0ea
add encrypt and decrypt funcs
2019-08-24 10:31:30 -04:00
noot
42481bec47
add encrypt/decrypt message tests to XX
2019-08-24 09:54:39 -04:00
noot
5c2c243998
ik functional w/ fallback from xx to ik
2019-08-24 09:32:50 -04:00
noot
7823ac99c9
add static key to Transport
2019-08-24 09:24:43 -04:00
noot
736a9fa03d
separate handshakes into files
2019-08-24 08:55:04 -04:00
noot
4fc0d08b32
add length rw to XX messages
2019-08-24 08:23:30 -04:00
noot
dd04220b1d
update IK to export needed types
2019-08-24 06:09:26 -04:00
noot
7d29cd149b
add verification of payload
2019-08-24 06:01:57 -04:00
noot
0239517a98
remove unneeded payload data, check and set remote pubkeys
2019-08-24 05:52:13 -04:00
noot
763a7efc3d
marshal and unmarshal remote pubkey from payload ok
2019-08-24 05:36:32 -04:00
noot
304f2029aa
handshake test for xx passes
2019-08-24 05:18:43 -04:00
noot
64590b093d
initial XX handshake done
2019-08-23 19:44:53 -04:00
noot
58b207ffd6
add encode and decoding funcs for MessageBuffer
2019-08-23 19:00:32 -04:00
noot
83c3fcb8ff
fix spacing
2019-08-23 18:44:19 -04:00
noot
71e20a6513
remove payload in stage 2, add todo
2019-08-23 18:43:26 -04:00
noot
9389119ed7
append noise key to signed payload
2019-08-23 18:37:00 -04:00
noot
7d68b940d4
finish xx handshake test
2019-08-23 18:23:40 -04:00
noot
49e1855de0
begin xx handshake test
2019-08-23 18:11:30 -04:00
noot
dd1d543b4d
add XX test
2019-08-23 17:46:12 -04:00
noot
27919d22af
begin protocol, handshake, change XX.noise.go to export stuff
2019-08-23 17:30:09 -04:00
Marten Seemann
ea13d7a1e9
make the error check for not receiving a public key more explicit
2019-08-01 10:46:07 +07:00
Marten Seemann
cca3e39b3c
Merge pull request #33 from libp2p/expose-pubkey-from-certchain
...
expose the function to derive the peer's public key from the cert chain
2019-08-01 09:17:51 +07:00
Marten Seemann
f7ede37249
expose the function to derive the peer's public key from the cert chain
2019-08-01 08:54:31 +07:00
Marten Seemann
08736ac1f3
set an ALPN value in the tls.Config
2019-07-28 06:49:08 +09:00
Marten Seemann
250af20339
don't use deprecated go-libp2p-crypto.MarshalPublicKey
2019-07-28 06:41:42 +09:00
Raúl Kripalani
c37e733d40
migrate to consolidated types. ( #30 )
2019-05-27 12:00:30 +01:00
Marten Seemann
2684cc16ea
disable session tickets
...
When resuming a session using session tickets, no certificate chain is
presented, and the callbacks needed to verify the peer identity would
not be called.
2019-04-07 14:36:06 +09:00
Marten Seemann
2b073e1ebf
use a prefix when signing the public key
2019-03-14 11:29:54 +09:00
Marten Seemann
5f2940245f
Merge pull request #23 from libp2p/chacha-preference
...
use ChaCha if one of the peers doesn't have AES hardware support
2019-03-14 10:58:42 +09:00
Marten Seemann
a49a4b1ccf
use ChaCha if one of the peers doesn't have AES hardware support
2019-03-14 10:46:49 +09:00
Marten Seemann
a2bf05d881
use the new Protocol Labs PEN for the certificate extension
2019-03-14 09:55:14 +09:00
Raúl Kripalani
afcc2e4cff
fix logging when using secp256k1 key in tests
...
Co-Authored-By: marten-seemann <martenseemann@gmail.com>
2019-03-11 23:06:32 +09:00
Marten Seemann
c6c1a34470
implement the new handshake
2019-03-11 14:56:28 +09:00
Marten Seemann
e31e5a86ca
Merge pull request #17 from libp2p/peer-verification
...
improve peer verification
2019-02-28 10:14:24 +09:00
Marten Seemann
20005517f5
fix package name of tlsdiag
2019-02-28 09:44:58 +09:00
Marten Seemann
e996c4ac2a
rename example to cmd, move to a single .go file
2019-02-28 09:30:59 +09:00
Marten Seemann
e4b8bb72f3
add a command line flag to set the key type
2019-02-28 09:30:59 +09:00
Marten Seemann
7d129c2a6f
add an example server and client
2019-02-28 09:30:59 +09:00
Marten Seemann
ebc4872cb9
fix duplicate import
2019-02-28 09:16:27 +09:00
Steven Allen
92fedfe742
make peer verification use a channel
2019-02-28 08:24:31 +09:00
Marten Seemann
5677418dda
derive and save the server's pub key in tls.Config.VerifyPeerCertificate
2019-02-21 16:33:00 +08:00
Marten Seemann
f799512a97
derive and save the client's pub key in tls.Config.VerifyPeerCertificate
2019-02-21 16:20:12 +08:00
Marten Seemann
1c09b025c0
switch to TLS 1.3
...
TLS 1.3 support was recently made opt-in in Go 1.12, so we need to
explicitly enable it.
2019-02-17 18:23:43 +08:00
Marten Seemann
0b45a8d2fb
make sure to close the connection if the context is already canceled
2019-02-17 18:23:43 +08:00
Marten Seemann
490981871c
improve logging in tests
2019-02-17 18:23:43 +08:00
Marten Seemann
5ecc2f97d3
drop support for Go 1.10
...
TLS 1.3 will require Go >= 1.12, so we don't need any fixes that were
specific to Go 1.10 any more.
2019-02-17 18:23:43 +08:00
Marten Seemann
9f8a324811
remove unneeded marshaling / unmarshaling when generating cert chain
2019-02-17 18:16:33 +08:00
Marten Seemann
10b3e2a265
avoid using interface{} when generating certificates
2019-02-17 11:47:57 +08:00
Marten Seemann
955b8056cb
add support for ECDSA keys
2019-01-11 13:58:57 +07:00
Marten Seemann
eaf15fd98b
simplify returning of context cancellation errors
2018-11-30 09:46:38 +07:00
Marten Seemann
1c0f10c904
return the context cancelation error
2018-11-29 11:29:01 +07:00
Marten Seemann
63843cc17e
close the underlying connection when the context is canceled
2018-11-28 14:15:42 +07:00
Marten Seemann
09e1e2ad8c
fix handshake tests
2018-11-24 16:41:08 +07:00
Marten Seemann
b70779f12c
add a license
2018-11-24 15:34:45 +07:00
Marten Seemann
82f9c87252
initial commit
2018-11-24 15:33:50 +07:00