p2ps-0.2.0 has been yanked.
p2ps
p2ps is a Rust library designed to make it easy to establish a secure connection between two peers using the Diffie-Hellman algorithm.
Usage example (see tests for better understanding)
Peer A
use TcpListener;
use Seconn;
let listener = bind.await?;
let = listener.accept.await?;
let mut p2ps_conn = listen_handshake.await?;
Peer B
use TcpStream;
use Seconn;
let stream = connect.await?;
let mut p2ps_conn = send_handshake.await?;
now both peers can use their p2ps_conn to share data
Peer A
let data = b"Hello, peer B!";
p2ps_conn.write.await?;
Peer B
let decrypted_data = p2ps_conn.read.await?;
println!;
Loking for Contributors & Ideas
This project is in active development, and I need help! Contributions are welcome, whether it's improving the implementation, fixing bugs, or adding new features. Feel free to open issues, submit pull requests, and share any new ideas that could improve the project.
License
This project is licensed under the MIT License – see the LICENSE file for details.