Skip to main content

Package for signing and verifying pickle files

Project description

pylotte

Secure Pickle Serialization with RSA Signatures

pylotte is a lightweight Python utility that allows you to securely serialize (pickle) Python objects with RSA digital signatures. It ensures the integrity and authenticity of your data by cryptographically signing pickled files and verifying them before loading.


✨ Features

  • 🔐 Sign pickle files using an RSA private key
  • ✅ Verify signatures with the corresponding public key
  • 🛡️ Prevents tampering and ensures data authenticity
  • 📦 Simple and minimal interface

📦 Installation

Install directly from PyPI:

pip install pylotte

🛠 Usage

from pylotte import SignedPickle

# Initialize with RSA key paths
signer = SignedPickle(public_key_path="public.pem", private_key_path="private.pem")

# Data to serialize
data = {"user": "alice", "role": "admin"}

# Securely dump and sign the pickle file
signer.dump_and_sign(data, "data.pkl", "data.sig")

# Load and verify the signed pickle file
loader = SignedPickle(public_key_path="public.pem")
data_loaded = loader.safe_load("data.pkl", "data.sig")

🔐 How It Works

  • dump_and_sign():

    • Pickles your data and saves it to a file.
    • Signs the file contents using an RSA private key.
    • Stores the signature in a separate .sig file.
  • safe_load():

    • Reads the pickled file and its signature.
    • Verifies the signature using the RSA public key.
    • If valid, loads and returns the original data.

🔧 Requirements


📄 License

This project is licensed under the MIT License.


🌐 Links


👤 Author

Developed by Alpamayo Solutions

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

pylotte-0.1.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

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

pylotte-0.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file pylotte-0.1.tar.gz.

File metadata

  • Download URL: pylotte-0.1.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for pylotte-0.1.tar.gz
Algorithm Hash digest
SHA256 ff52ac3fa773ccbb9e6390a50968813a2fc16fb7f4107e308adf8d01f3c7fe0a
MD5 ce00c0c6ef00822ce0360aa88e006211
BLAKE2b-256 2a66fa6a82066514e5b76f39368707c3ec45b26d8e509f24fc322c21953fc889

See more details on using hashes here.

File details

Details for the file pylotte-0.1-py3-none-any.whl.

File metadata

  • Download URL: pylotte-0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for pylotte-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 89691ce15ab8db3f8316adad570152076296ca6c3b00b2d67cba5c1ff6834276
MD5 caceb0fbd78803278bdfa0d145940072
BLAKE2b-256 0d181747fe3161fed5ebe28da72acb48037123a90f35ccd663b6ee53b2a771ce

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