End-to-end encrypted secure data pipeline with tamper-evident audit logging and data lineage tracking.
- End-to-End Encryption β AES-256-GCM content encryption with RSA-OAEP key wrapping
- Cryptographic Signing β Ed25519 signatures for non-repudiation
- Key Management β Automatic key generation, rotation, and secure storage with PBKDF2
- Tamper-Evident Audit β Blockchain-style chained SHA-256 hash log
- Data Lineage β Full provenance graph tracking every source, transform, and sink
- FastAPI Management API β RESTful control plane
- Async Pipeline β Producer β Processor β Consumer via Redis Streams
- Docker Compose β One-command deployment with Redis
ββββββββββββ βββββββββββββ ββββββββββββ
β Producer βββββΆβ Processor βββββΆβ Consumer β
β (encrypt β β (metadata β β (decrypt β
β + sign) β β only) β β + sink) β
ββββββββββββ βββββββββββββ ββββββββββββ
β β β
βΌ βΌ βΌ
βββββββββββββββββββββββββββββββββββββββββββ
β Redis Streams β
β (encrypted payloads) β
βββββββββββββββββββββββββββββββββββββββββββ
β β β
βΌ βΌ βΌ
βββββββββββββββββββββββββββββββββββββββββββ
β Audit Log (chained hash) β
β Lineage Graph (provenance) β
βββββββββββββββββββββββββββββββββββββββββββ
# 1. Clone and install
git clone https://github.com/janderik/crypta-pipe.git
cd crypta-pipe
pip install -r requirements.txt
# 2. Start Redis (optional, for pipeline)
docker compose up -d redis
# 3. Start the API server
python -m src.main serve --reload
# 4. Run the example
python examples/sample_pipeline.pydocker compose up --buildThe API is available at http://localhost:8000.
| Method | Path | Description |
|---|---|---|
GET |
/api/v1/health |
Health check |
GET |
/api/v1/keys |
List encryption keys |
POST |
/api/v1/keys/rotate |
Rotate active key |
POST |
/api/v1/publish |
Publish encrypted payload |
GET |
/api/v1/audit |
Query audit log |
GET |
/api/v1/audit/verify |
Verify audit chain integrity |
GET |
/api/v1/lineage |
Get full lineage graph |
GET |
/api/v1/lineage/provenance/{id} |
Provenance for a node |
POST |
/api/v1/lineage/node |
Register a lineage node |
curl -s -X POST http://localhost:8000/api/v1/publish \
-H "Content-Type: application/json" \
-d '{"payload": {"event": "click", "user": 42}, "source": "web"}'Response:
{"message_id": "1712345678000-0"}crypta-pipe/
βββ src/
β βββ crypto/ # AES-256-GCM, RSA-OAEP, Ed25519, KDF
β βββ pipeline/ # Producer/Processor/Consumer
β βββ audit/ # Chained-hash logger + lineage tracker
β βββ api/ # FastAPI server + routes
β βββ main.py # CLI entrypoint
βββ tests/ # Crypto + pipeline tests
βββ examples/ # Sample pipeline (no Redis needed)
βββ Dockerfile
βββ docker-compose.yml
- AES-256-GCM β authenticated encryption with associated data (AAD)
- RSA-OAEP (4096-bit) β secure key wrapping with SHA-256 MGF1
- Ed25519 β high-speed digital signatures
- PBKDF2-HMAC-SHA256 β key derivation with 600,000 iterations
- Chained Audit β each entry includes the SHA-256 hash of the previous entry
pip install ruff mypy pytest pytest-asyncio
ruff check src/ tests/
mypy src/
pytest tests/ -vMIT