#socket #tcp

secure_socket

A small encrypted wrapper around TCP

9 releases

Uses new Rust 2021

0.0.11 Aug 8, 2022
0.0.10 Aug 8, 2022

#782 in Cryptography

AGPL-3.0-or-later

23KB
534 lines

A wrapper around TCP for sending encrypted data

I created this for a file backup application I've been working on as a hobby project. As such, the API is designed to work with it, and it only. Perhaps I'll come back at a later date and make it more suitable for general use; perhaps not.

CAVEAT EMPTOR:

  • This has never been audited for security.
  • It probably never will be.
  • Seeing as this is a component of a hobby project, I can't guarantee any kind of consistent updates.
  • I've only tested it on 64-bit Linux systems.
  • At the moment it's "slightly" unfinished.

lib.rs:

Create a brand spankin' new Secure Socket.

I believe the arguments are more or less self-explanatory, so I won't bother to explain them. Exchange cryptographic keys. Receive a file

Returns: Result of either filename or error reason. Error mapping:

  • BadData: Client sent gibberish
  • Other: Unable to open file for writing or unable to write to it.

The file name will be in the format "<hostname> <time>.tar.gz"

TODO implement SecureSocket::recv_archive() Send a file over the network

Dependencies

~5MB
~94K SLoC