Skip to main content

Secure encryption/signature library for client-server systems

Project description

PatriotLib 🇷🇺

📦 PatriotLib — это библиотека криптографической защиты, разработанная для защищённой передачи, подписи и расшифровки данных в клиент-серверной архитектуре.

Возможности

  • AES-256 (CBC + HMAC-SHA256) для симметричного шифрования
  • Поддержка ECDH для безопасного обмена ключами
  • Подпись и проверка сообщений (ECDSA P-384)
  • Защита от replay-атак через nonce
  • Полное покрытие юнит-тестами

Установка

pip install patriotlib

Пример использования

Example

from patriotlib.crypto import encrypt, decrypt
from patriotlib.keyexchange import generate_ecdh_keys, derive_shared_key

# ECDH exchange, derive shared key
client_priv, client_pub = generate_ecdh_keys()
server_priv, server_pub = generate_ecdh_keys()
shared_key = derive_shared_key(client_priv, server_pub)

# Encrypt / Decrypt
cipher = await encrypt(shared_key, b"Top Secret")
plain = await decrypt(shared_key, cipher)

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

patriotlib-0.1.1.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

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

patriotlib-0.1.1-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file patriotlib-0.1.1.tar.gz.

File metadata

  • Download URL: patriotlib-0.1.1.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for patriotlib-0.1.1.tar.gz
Algorithm Hash digest
SHA256 bad1e5705791f67de7cc7d702aa872153216ae947673821c18f7f105284c2676
MD5 645982b8bb83d792c6b1f7ecdb2ecceb
BLAKE2b-256 bc06565e7c90bac2c429a428e33bae2ece2cefa2aa3cf22d20de5c8680425845

See more details on using hashes here.

File details

Details for the file patriotlib-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: patriotlib-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for patriotlib-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fb7da21878246987469c4d78d1843eea62fca1b058a21c1bbe9c8b3020f08c7e
MD5 8bbfdccf007721ee37c01ff12b43fc9f
BLAKE2b-256 72bb83d485d597ab1611eaee8232a247cc955b2bf66710c374a9c75a19f94ef3

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