AesBridge Python
AesBridge is a modern, secure, and cross-language AES encryption library. It offers a unified interface for encrypting and decrypting data across multiple programming languages. Supports GCM, CBC, and legacy AES Everywhere modes.
This is the Python implementation of the core project.
👉 Main repository: https://github.com/mervick/aes-bridge
Features
- 🔐 AES-256 encryption in GCM (recommended) and CBC modes
- 🌍 Unified cross-language design
- 📦 Compact binary format or base64 output
- 🐍 Pure Python with zero dependencies (except
cryptography) - ✅ HMAC Integrity: CBC mode includes HMAC verification
- 🔄 Backward Compatible: Supports legacy AES Everywhere format
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(data, passphrase)
Decrypts a base64-encoded string encrypted with AES-GCM.
GCM Mode (recommended)
-
encrypt_gcm(data, passphrase)
Encrypts a string using AES-GCM. Returns: base64-encoded string. -
decrypt_gcm(data, passphrase)
Decrypts a base64-encoded string encrypted withencrypt_gcm. -
encrypt_gcm_bin(data, passphrase)
Returns encrypted binary data using AES-GCM. -
decrypt_gcm_bin(data, passphrase)
Decrypts binary data encrypted withencrypt_gcm_bin.
CBC Mode
-
encrypt_cbc(data, passphrase)
Encrypts a string using AES-CBC. HMAC is used for integrity verification.
Returns: base64-encoded string. -
decrypt_cbc(data, passphrase)
Decrypts a base64-encoded string encrypted withencrypt_cbcand verifies HMAC. -
encrypt_cbc_bin(data, passphrase)
Returns encrypted binary data using AES-CBC with HMAC. -
decrypt_cbc_bin(data, passphrase)
Decrypts binary data encrypted withencrypt_cbc_binand verifies HMAC.
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(data, passphrase)
Decrypts a string encrypted in the legacy AES Everywhere format.
Metadata
Release files for aes-bridge 2.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aes_bridge-2.0.4.tar.gz | 7.9 kB | With provenance | Details for aes_bridge-2.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aes_bridge-2.0.4-py3-none-any.whl | Python 3 | none | any | Details for aes_bridge-2.0.4-py3-none-any.whl |
Total release size: 19.7 kB
Release files / aes_bridge-2.0.4.tar.gz
| Download URL | aes_bridge-2.0.4.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
72d85d289ac4678adad173c94e938c6061138f29a85462d93505f094acbc9ca1
|
|
BLAKE2b-256 checksum How to use checksums |
5fc1ae7dfb7fbc84d48948e0d2d80878e5046211c98522045055d44332224924
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 22, 2025.
Transparency logRelease files / aes_bridge-2.0.4-py3-none-any.whl
| Download URL | aes_bridge-2.0.4-py3-none-any.whl |
|---|---|
| Size | 11.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a6e3fbd83fbdd9491fd85d578e6b28fb19388676cb1c621442ed3282f51ccb6b
|
|
BLAKE2b-256 checksum How to use checksums |
a1cab2b362c4b606d21bce706944f149bf489e0d00502cdb475a6247a0e1f7bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 22, 2025.
Transparency logSecurity for aes-bridge 2.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for aes_bridge-2.0.4.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 22, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.