Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

Implement private swarms #102

Open
rklaehn opened this issue Nov 2, 2022 · 4 comments
Open

Implement private swarms #102

rklaehn opened this issue Nov 2, 2022 · 4 comments

Comments

@rklaehn
Copy link
Contributor

rklaehn commented Nov 2, 2022

Use rust-libp2p pnet optionally

https://github.com/libp2p/rust-libp2p/tree/master/transports/pnet

I seem to remember that I wrote this and go tomaka to merge it, but blame does not have me anymore, not even tomaka. 🤷‍♂️

@dignifiedquire
Copy link
Contributor

We need to plan to be able to be part of multiple of these. This might require changes in libp2p.

@rklaehn
Copy link
Contributor Author

rklaehn commented Dec 20, 2022

This is one of the things needed for actyx.com to be able to use iroh-embed as a replacement for ipfs-embed.

@rklaehn
Copy link
Contributor Author

rklaehn commented Dec 21, 2022

So adding this for tcp and websocket is straightforward. Adding it for quic is not.

The issue is that this relies on the socket being AsyncRead and AsyncWrite, which the quic socket is not.

In TCP the private net stuff goes here

  • transport
  • pnet <===
  • muxer

But in quic you already get a muxer thingie out.

    /// upgrade a connection to use pre shared key encryption.
    ///
    /// the upgrade works by both sides exchanging 24 byte nonces and then encrypting
    /// subsequent traffic with XSalsa20
    pub async fn handshake<TSocket>(

        self,
        mut socket: TSocket,
    ) -> Result<PnetOutput<TSocket>, PnetError>

@rkuhn
Copy link

rkuhn commented Dec 21, 2022

cf. libp2p/specs#489

@dignifiedquire dignifiedquire transferred this issue from n0-computer/iroh Feb 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants