Skip to main content

simes, simple encrypted socket

Project description

simes: Simple Encrypted Socket Library

Overview

simes is a Python library designed to facilitate secure and easy-to-use encrypted communication over sockets. It provides a suite of tools for encrypting and decrypting messages sent over TCP/IP, ensuring that your data remains private and secure during transmission.

Features

  • AES Encryption: Utilizes Advanced Encryption Standard (AES) in CBC mode for strong encryption.
  • Automatic Padding: Handles padding of messages to fit block size requirements.
  • IV Management: Securely generates and manages Initialization Vectors (IVs) for each encryption operation.
  • Key Management: Offers a simple interface for managing encryption keys.
  • Error Handling: Robust error handling for common issues like message size limits and unknown senders.
  • Socket Communication: Seamlessly integrates with Python's socket module for network communications.

Installation

To install simes, you can simply use pip:

pip install simes

Usage

Here's a quick example to get you started with simes:

Encrypting and Sending a Message

import socket
from simes import sendEncryptedJSON

# Setup socket and key
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
key = b'secret_key_16_byte'

# Encrypt and send a message
data = {"message": "Hello, World!"}
sendEncryptedJSON(sock, 'sender_name', data, key)

Receiving and Decrypting a Message

from simes import receiveEncryptedJSON

# Assuming 'sock' is a socket object

keys_dict	= {'sender_name': b'secret_key_16_byte'}

sender, data = receiveEncryptedJSON(sock, keys_dict)
print("Received message from", sender, ":" data)

Check the test directory for more examples.

Contributing

Contributions to simes are welcome!

License

simes is released under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simes-0.1.3.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simes-0.1.3-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file simes-0.1.3.tar.gz.

File metadata

  • Download URL: simes-0.1.3.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.5

File hashes

Hashes for simes-0.1.3.tar.gz
Algorithm Hash digest
SHA256 b6f2b11622e45c94fa1cd8557a403543260f0a785fece632d847a22b7b79c641
MD5 926ce789d39a32c0a9b0989795023bd0
BLAKE2b-256 934482ce8ea662a0275b2915bdfdd48c50bb850f5b33bd9ec37e723a2041ec24

See more details on using hashes here.

File details

Details for the file simes-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: simes-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.5

File hashes

Hashes for simes-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7ce149246a01ad48a655c0e43a545c8f409d5f9e5006585f36e8df94aea1ab5a
MD5 4a1f1baa1b343d2f67bc3e9bf6129fd9
BLAKE2b-256 5ba72f0804afc7be1e65e2a2e2af4392665b4f61ac60b857d939951c860090b8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page