Skip to main content

CryptoServe Auto-Protect - Automatic encryption for third-party libraries

Project description

cryptoserve-auto

Automatic encryption for data flowing through third-party libraries.

The Problem

Your application uses hundreds of dependencies. Each may send sensitive data to external services. When quantum computing breaks classical encryption, these dependencies become attack vectors.

The Solution

One line of code automatically protects all outbound sensitive data:

import cryptoserve_auto
cryptoserve_auto.protect()

# Now all outbound requests are automatically protected
import requests
requests.post("https://api.vendor.com/users", json={
    "name": "John Doe",
    "email": "john@example.com",  # Auto-encrypted
    "ssn": "123-45-6789",         # Auto-encrypted
})

Installation

pip install cryptoserve-auto

How It Works

  1. Intercepts outbound calls from popular libraries (requests, httpx, boto3)
  2. Detects sensitive fields using patterns and field names
  3. Encrypts data with quantum-ready algorithms before transmission
  4. Logs all protected data flows for audit visibility

Configuration

import cryptoserve_auto

cryptoserve_auto.protect(
    # What to protect
    libraries=["requests", "httpx"],  # Default: all supported
    patterns=["pii", "financial"],     # Default: all patterns

    # How to protect
    encryption_key=key,                # Required: your encryption key
    mode="encrypt",                    # "encrypt" | "tokenize" | "log_only"

    # Behavior
    fail_open=True,                    # On error: pass through (True) or block (False)
    async_logging=True,                # Non-blocking audit logging
)

Supported Libraries

Library What's Protected
requests POST/PUT/PATCH body data
httpx POST/PUT/PATCH body data
urllib3 Request bodies

More coming: boto3, stripe, psycopg2, sqlalchemy, redis

Sensitive Field Detection

Automatic patterns:

  • SSN: XXX-XX-XXXX
  • Credit cards: XXXX-XXXX-XXXX-XXXX
  • Emails: user@domain.com
  • Phone numbers

Field name detection:

  • ssn, social_security, tax_id
  • email, phone, address
  • password, secret, api_key
  • credit_card, card_number

Custom patterns:

cryptoserve_auto.protect(
    custom_patterns={
        "employee_id": r"EMP-\d{6}",
    },
    custom_fields=["internal_id"],
)

Escape Hatch

# Temporarily disable protection
with cryptoserve_auto.unprotected():
    requests.post(url, json=data)  # Not intercepted

Audit Logging

All protected data flows are logged:

{
  "timestamp": "2025-12-29T10:30:00Z",
  "library": "requests",
  "destination": "api.vendor.com",
  "fields_protected": ["email", "ssn"],
  "algorithm": "AES-256-GCM"
}

Performance

Operation Overhead
Field detection ~5μs per field
Encryption ~50μs per KB
Total request overhead <1ms

License

Apache 2.0

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

cryptoserve_auto-0.1.0.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

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

cryptoserve_auto-0.1.0-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

Details for the file cryptoserve_auto-0.1.0.tar.gz.

File metadata

  • Download URL: cryptoserve_auto-0.1.0.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for cryptoserve_auto-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ea34d704fd7d39b0ef134efb68c3ef74854c5e6ef9330af15b7cfaa6e6137b11
MD5 efeb01cad3fee6853377cd269100fe4c
BLAKE2b-256 249de92f917d88c5dbf338a434184fd907d1872841062329dcab9ac317ed13f7

See more details on using hashes here.

File details

Details for the file cryptoserve_auto-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cryptoserve_auto-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9cf4d1d9b7bdac62241c8782d1211395c5928099c0d9f38a193b56796246c734
MD5 624ef574d40a33886c9a79bb21b531b4
BLAKE2b-256 35ecee745979ed04e38d32b22b672898f4a8f3c2fdac89f3d2aecf0d187540f0

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