Skip to main content

Encwork

RSA-encrypted networking library.

What is it for?

Encwork is designed to be a safe networking system that will generate new keys for each session. It can be used for CLI's or command line tools, general networking that should be encrypted, or throwaway chats.

How is it secured?

Encwork uses 4096-bit RSA keys (size changable, 4096 recommended) for every message other than for the public key exchange, which cannot be encrypted and does not need to be.
This should not be a problem, as no computer can get the private key from the public key, and the keys are recreated for every new session.

How does it work?

P2P

Each machine will set up a server socket, and a client socket. The client will try to connect to a specified target, while the server accepts connections and checks if the origin is the target. If it's not, it'll kill the connection and wait for the target to connect. Once both peers have confirmed the targets, they will exchange public keys and be ready to communicate.

Server-Based

There will be one machine running a server, and multiple clients can connect to it. The server talks to each client individually, but Encwork provides enough freedom that you could set up a system that allows users to talk to each other. The server will store all client's public keys & sockets in a dictionary, so all clients still have different keys that don't cross paths.

Requirements

Python v3.6+
If you don't already have it, download it here.
cryptography>=2.8
Download it using pip install "cryptography>=2.8", or download the wheel here and use pip install (.whl file).

Installation

PyPI

To get the module through PyPi: pip install encwork.

GitHub (Pulled Repo)

To install the module by pulling the repo: python setup.py install.

Usage

While Encwork comes with demonstration files such as p2p_example.py, client_example.py and server_example.py, they are only meant to demonstrate how Encwork works. You can get the module to build your own UI that will work with any other program that uses Encwork, including the example one.

The p2p_example.py file

Run it as any other python script, using python or python3 p2p_example.py. It's a very short piece of code, as it just uses functions from encwork.p2p. Simply give it a target machine and it'll start trying to connect.
Once you see the prompt "Enter a message to send," the connection and key exchange have completed and you are ready to communicate.

The client_example.py and server_example.py files

As explained above, one machine will run the server (server_example.py) and allow clients to connect to it (client_example.py). The example files are for a server that returns ping, for one- and two-way, including encryption/decryption in the time.

Documentation

To see how to use the Encwork module yourself, check out the Documentation.

Release files for encwork 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for encwork 1.0.4
File Size Uploaded
encwork-1.0.4.tar.gz 8.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for encwork 1.0.4
File Interpreter ABI Platform
encwork-1.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 19.4 kB

Release files / encwork-1.0.4.tar.gz

Download URL encwork-1.0.4.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
09e55337728fcc056a6f696409afd7d552015ba2cf73b2187aca218df32f74ab
BLAKE2b-256 checksum
How to use checksums
4fe0d126d00c44fa0795fefb91ef0ceaf6d70138b125c74f5fd03353f12ddbf7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

Release files / encwork-1.0.4-py3-none-any.whl

Download URL encwork-1.0.4-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a377832f86409fdf57972f6931305fc031241ddae85a922f56d0622ce345d8ee
BLAKE2b-256 checksum
How to use checksums
e2fc54a2d6b3e364bfc34cada89253d63c0de82f19aa6cc163af9d69ec14265b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

Release history Release notifications | RSS feed

This release

1.0.4 This release

2 release files

1.0.3

2 release files

1.0.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page