This repository was archived by the owner on Aug 23, 2019. It is now read-only.
Initial development#1
Merged
Merged
Conversation
chore: add more documentation and comments feat: protector now takes a key file buffer instead of the key refactor: clean up decoder fix: use xor streaming for encryption fix: up handshake timeout to 60 seconds for default refactor: clean up unneeded data and update readme
This was referenced Jun 28, 2018
Collaborator
Author
|
@diasdavid I've got an updated suite of interop tests at ipfs/interop#24 that are passing. There are a couple of go tests that are skipped in there right now due to a similar issue I was having with js pull-reader. I have the interop tests using a temporary fork of pull-reader that I have a PR in for to try and resolve the overreading problem that crops up with crypto reads to prevent timeouts from occurring during invalid private network connection attempts. Here's the output of the tests for easy reference. Valid connections will exchange 1024 bytes in each direction. |
Member
|
Seems good to me. |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This adds functionality to create private libp2p connections. A demo is also included demonstrating the interop between go and js working. I've created a WIP PR of interop tests, ipfs/interop#24. The failing tests in the PR are due to pubsub. Viewing the details you can see the private tests are functioning properly.
There is currently an issue with bad private network connections timing out instead of erroring. This is related to dominictarr/pull-reader#5. What happens is that since the private network is invalid, the stream of data coming in is still encrypted. When pull-length-prefixed attempts to determine the byte size of the incoming stream by parsing a varint, the varint is determined from encrypted data so it's wrong. When the incorrect stream size is larger than what's actually available in the buffer, it times out attempting to read what's not there.
I will continue looking into fixing the issue, but wanted to get the private network released, as it functions properly in a correct private network and the current issue doesn't pose a security risk.
Implements: https://github.com/libp2p/specs/blob/b1365bedcd46442074fbf96610f66b0663be088a/pnet/Private-Networks-PSK-V1.md