Skip to main content

Packet Security for Stateless Server Transactions

Project description

This module implements the PSSST protocol and provides a very simple interface for client and server endpoints. PSSST is designed to provide a light weight way for clients to securely communicate with servers.

Using the pssst library is very simple. A client is represented by an instance of the PSSSTClient class which is instantiated with the server’s public key and optionally specifies the client’s private key and the cipher suite. A server is represented by an instance of the PSSSTServer class which is instantiated with the server’s private key and optionally specifies the cipher suite. Each of these classes offer only one method.

The PSSSTClient class provides the pack_request() method; this takes the request message as its sole argument and returns a tuple of the encrypted and packed packet and a function that can be used to unpack the reply to that packet.

The PSSSTServer class provides the unpack_request() method; this takes an encrypted request packet as its sole argument and returns a tuple containing the decrypted request message, the authenticated client public key (or None if client authentication is not used) and a function that can be used to pack the reply message into an encrypted packet. Thus a minimal example of a transaction is as follows:

client = pssst.PSSSTClient(server_public_key)
server = pssst.PSSSTServer(server_private_key)

request_message = b"The Magic Words are Squeamish Ossifrage"

# Pack the message with the client and unpack it with the server
request_packet, client_reply_handler = client.pack_request(request_message)
received_request, client_auth_key, server_reply_handler = server.unpack_request(request_packet)

# Echo the request back from the server to the client
reply_packet = server_reply_handler(received_request)
received_reply = client_reply_handler(reply_packet)

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

pssst-0.2.1.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

pssst-0.2.1-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file pssst-0.2.1.tar.gz.

File metadata

  • Download URL: pssst-0.2.1.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.5

File hashes

Hashes for pssst-0.2.1.tar.gz
Algorithm Hash digest
SHA256 826bf64cf19f72b0eb5c819929a07db26e7afa2253704a413b9f5ce0b1318e1e
MD5 e445cd08c5ce33eeea2e0416b8138b69
BLAKE2b-256 90664a936e79feb99859e5f760780e9c2c0fe1e235e62392a74c5123f9b8ba38

See more details on using hashes here.

File details

Details for the file pssst-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: pssst-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.5

File hashes

Hashes for pssst-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c099d08c5285e95290fde6654842bf7f313893aafe315505eb30cfe11a68ff11
MD5 0dec776947df26d265ba6d93d0cdc390
BLAKE2b-256 11b4b5444c832a0a9cbf9dc4a71aa832bfc99582dadb72b4aaad0ecbb130ecb0

See more details on using hashes here.

Supported by

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