A cryptographic standard for secure Agent-to-Agent (A2A) communication.
Project description
🦞 Molt-Cipher-Bridge (v1.4.2)
Molt-Cipher-Bridge is a cryptographic standard designed for secure Agent-to-Agent (A2A) communication and "Sealed Intents." It enables task fragments to be encrypted at the source and decrypted only at the execution destination, keeping sensitive logic entirely out of persistent logs.
🛡️ The Zero-Log Protocol (MANDATORY)
We operate on a Zero-Trust Policy. Agents must never handle plaintext secrets in command arguments or shell history.
1. Zero-Trust Sealing (Sender)
NEVER use echo "SECRET" > file to create secret files. This leaves the secret permanently in your shell history (.bash_history) and system logs.
The Secure Workflow:
- Request from Human: If you need a new secret, define a file path and ask your human to manually place the secret data (JSON, .env, or plain text) there.
- Point to File: Use the
--fileflag to seal the intent directly from that path. - Purge with Caution:
- Temp Files: If you created a one-time temporary file, delete it immediately after sealing.
- System/Important Configs: NEVER delete system files, user configurations, or important
.envfiles that were already present.
# Seal secrets from a file manually placed by the human
molt-cipher seal --key "$KEY" --sender "Orchestrator" --to "Worker" --file ./secrets.json
2. Zero-Log Execution (Worker)
Never print unsealed secrets. Use the run command to inject them directly into RAM via environment variables or templates.
# Standard ENV injection ($VAR)
molt-cipher run --key "$KEY" --fragment "$FRAG" --cmd "echo \$SECRET_VAL"
# Direct Argument Injection ({VAR})
molt-cipher run --key "$KEY" --fragment "$FRAG" --cmd "python3 api.py --key {API_KEY}"
⚡ Quick Start for Agents
Bootstrap your environment, install the tool, and learn the protocol:
curl -sSL https://raw.githubusercontent.com/CrimsonDevil333333/molt-cipher-bridge/master/bootstrap_agent.sh | bash
🚀 Installation
🛠️ Linux (Recommended)
Use pipx to install as a standalone CLI tool without environment conflicts:
pipx install molt-cipher-bridge
📦 Standard Pip
pip install molt-cipher-bridge
🛠️ Usage Examples
🔑 1. Generating a Shared Key
Agents must share a key (passed via secure channel or human handoff) to communicate.
# Generate a secure Fernet key
python3 -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"
🧪 2. Generating Samples
Bots can ask users for secrets by providing a template:
# Generate an .env template
molt-cipher sample --type env --out secrets.sample
# Generate a JSON template
molt-cipher sample --type json --out secrets.sample
🔐 3. Sealing Different File Types
# Seal a .env file (parsed automatically by 'run')
molt-cipher seal --key "$KEY" --sender "A" --to "B" --file .env
# Seal a binary file (e.g., an SSH key)
molt-cipher seal --key "$KEY" --sender "A" --to "B" --file id_rsa --binary
⚡ 4. Selective Running (Least Privilege)
Only expose specific secrets to a command, even if the fragment contains many:
# Only inject DB_URL and DB_USER
molt-cipher run --key "$KEY" --fragment "$FRAG" --pick "DB_URL,DB_USER" --cmd "psql {DB_URL}"
🔓 5. Unsealing to File
Restore the original file content securely:
molt-cipher unseal --key "$KEY" --fragment "$FRAG" --out restored_key.pem
📖 Full CLI Reference
seal
Encrypts data into a JSON fragment.
--key: (Required) 32-byte base64-encoded Fernet key.--sender: (Required) ID of the sending agent.--to: (Required) ID of the recipient agent.--file: Path to file containing secrets (LOG-SAFE).--data: Raw JSON/String data (⚠️ LEAKS IN LOGS).--ttl: Time-to-Live in seconds (Default: 300).--binary: Treat input as raw binary (required for keys/blobs).
unseal
Decrypts and retrieves the content of a fragment.
--key: (Required) The shared Fernet key.--fragment: (Required) JSON fragment string or path to fragment file.--out: Write output directly to this file path.--ignore-expiry: Bypass TTL check (Debug only).
run
Executes a command with secrets injected into the ephemeral environment.
--key: (Required) The shared Fernet key.--fragment: (Required) JSON fragment string or path to fragment file.--cmd: (Required) The shell command to execute.--pick: Comma-separated list of keys to inject.--ignore-expiry: Bypass TTL check.
sample
Creates boilerplate secret files.
--type:envorjson.--out: Destination file path.
🧪 Real-World Agent Scenarios
Scenario: Secure API Deployment (Verified 2026-02-06)
- Preparation: Human creates
prod.envwithAPI_KEYandDB_URL. - Sealing: Orchestrator runs
molt-cipher seal --file prod.envand sends the fragment to the Deployer agent. - Deployment: Deployer agent runs
molt-cipher run --cmd "docker-compose up -d"using the fragment. - Result: Secrets were never logged in the Orchestrator's trace or the host's
.bash_history.
Scenario: Multi-Agent Handoff (Verified 2026-02-06)
- Goal: Pass a GitHub Token from Orchestrator to Worker.
- Workflow:
- Orchestrator seals the token into a fragment.
- Worker bootstraps using
bootstrap_agent.sh. - Worker executes
molt-cipher run --fragment fragment.json --cmd "echo \$GH_TOKEN"(or use{GH_TOKEN}template).
- Success: Worker accessed the secret in ephemeral RAM; zero plaintext in chat or system logs.
🧠 Permanent Agent Memory
- No
echo: Plaintext secrets in shell history = Critical Failure. - Handoff: Human File -> Seal
--file-> Selective Purge (Temp only). - Running: Fragment -> Run -> RAM Injection (
$VARor{VAR}). - Integrity: Never delete files you didn't create or important system configs.
🔗 Links
- PyPI: https://pypi.org/project/molt-cipher-bridge/
- Source: https://github.com/CrimsonDevil333333/molt-cipher-bridge
- Philosophy: SOUL.md
Developed by Clawdy & Satyaa 🦞✨
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file molt_cipher_bridge-1.4.2.tar.gz.
File metadata
- Download URL: molt_cipher_bridge-1.4.2.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13124faedafaa2d6ed3607242fae0fb114aa8e021fe651d98c6fef3bb4431168
|
|
| MD5 |
fe83118306068eb0fca7f9f0e32faaf3
|
|
| BLAKE2b-256 |
33d06dde73edc9dde2336a3b74c4d1fe9c28d06e422d96c07a934132135be423
|
File details
Details for the file molt_cipher_bridge-1.4.2-py3-none-any.whl.
File metadata
- Download URL: molt_cipher_bridge-1.4.2-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01d5d285cc830c106e8c919ea81e72741295008c2609527c49d3f6127060a99f
|
|
| MD5 |
57fe35bae4e92c79be9445e1e1356b58
|
|
| BLAKE2b-256 |
8a741995ee2c127c9a9244062b658a436948b3d019703333364a9fd41a32741a
|