simpletcp

Crate for simple and secure TCP communication

Encryption

All traffic is encrypted with 256-bit AES-CBC

Initialization

  1. Server generates RSA key and sends it to client
  2. Client generates AES key, encrypts it with server key and send it to the server
  3. From now, all communication is encrypted with 256-bit AES in CBC mode

Usage

``` //Connect let mut client = TcpStream::connect("127.0.0.1:4234").unwrap();

//Wait until connection is initialized client.waituntilready().unwrap();

//Build message let mut msg = Message::new(); msg.writef64(1.23455); msg.writebuffer(&[3, 1, 4, 56]);

//Send message client.write(&msg).unwrap(); ```

See examples