Skip to main content

AesBridge is a modern, secure and cross-language AES encryption library

Project description

AesBridge Python

CI Status

AesBridge is a modern, secure and cross-language AES encryption library that supports GCM and CBC modes

This is the Python implementation of the core project.
👉 Main repository: https://github.com/mervick/aes-bridge

Features

  • 🔒 AES-256 encryption in GCM and CBC modes
  • 🌐 Unified cross-language design
  • 📦 Compact binary format or base64 output
  • 🐍 Pure Python with zero dependencies (except cryptography)

Quick Start

Installation

pip install aes-bridge

Usage

from aes_bridge import encrypt, decrypt

ciphertext = encrypt("My secret message", "MyStrongPass")
plaintext = decrypt(ciphertext, "MyStrongPass")

API Reference

Main Functions (GCM by default)

  • encrypt(data, passphrase)
    Encrypts a string using AES-GCM (default).
    Returns: base64-encoded string.

  • decrypt(ciphertext, passphrase)
    Decrypts a base64-encoded string encrypted with AES-GCM.

CBC Mode

  • encrypt_cbc(data, passphrase)
    Encrypts a string using AES-CBC. HMAC is used for integrity verification.
    Returns: base64-encoded string.

  • decrypt_cbc(ciphertext, passphrase)
    Decrypts a base64-encoded string encrypted with encrypt_cbc and verifies HMAC.

  • encrypt_cbc_bin(data, passphrase)
    Returns encrypted binary data using AES-CBC with HMAC.

  • decrypt_cbc_bin(ciphertext, passphrase)
    Decrypts binary data encrypted with encrypt_cbc_bin and verifies HMAC.

GCM Mode

  • encrypt_gcm(data, passphrase)
    Encrypts a string using AES-GCM. Returns: base64-encoded string.

  • decrypt_gcm(ciphertext, passphrase)
    Decrypts a base64-encoded string encrypted with encrypt_gcm.

  • encrypt_gcm_bin(data, passphrase)
    Returns encrypted binary data using AES-GCM.

  • decrypt_gcm_bin(ciphertext, passphrase)
    Decrypts binary data encrypted with encrypt_gcm_bin.

Legacy Compatibility

⚠️ These functions are kept for backward compatibility only. Their usage is strongly discouraged in new applications.

  • encrypt_legacy(data, passphrase)
    Encrypts a string in the legacy AES Everywhere format.

  • decrypt_legacy(ciphertext, passphrase)
    Decrypts a string encrypted in the legacy AES Everywhere format.

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

aes_bridge-2.0.0.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

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

aes_bridge-2.0.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file aes_bridge-2.0.0.tar.gz.

File metadata

  • Download URL: aes_bridge-2.0.0.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for aes_bridge-2.0.0.tar.gz
Algorithm Hash digest
SHA256 ab2eab4e8aaecbac78257195e118f66bfd454d13370618ebf115ec874c11e1ef
MD5 e80a3264bb1167b165074a3ca1cddd79
BLAKE2b-256 dc9c20105889b2aa92816531c9cdd9e34ae9c55d9852e3244daab7b4d4011e82

See more details on using hashes here.

Provenance

The following attestation bundles were made for aes_bridge-2.0.0.tar.gz:

Publisher: publish-to-pypi.yml on mervick/aes-bridge-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aes_bridge-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: aes_bridge-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for aes_bridge-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 21d9051c9dc9de577fb945e987ac4e7dbada795a94cc2bebe9f885f5b9dfe153
MD5 8d04d36be7f2cf1e7c35f94903ddb1d6
BLAKE2b-256 6e33b2e4a8f83e94d45e66a65896f669941210c8674df9af45eeb820936ce932

See more details on using hashes here.

Provenance

The following attestation bundles were made for aes_bridge-2.0.0-py3-none-any.whl:

Publisher: publish-to-pypi.yml on mervick/aes-bridge-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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