Tamper-evident cryptographic framework for AI accountability - Vas Szigora Edition (Iron Discipline)
Project description
Hope Genome ๐ก๏ธ
Tamper-Evident Cryptographic Framework for AI Accountability
"Not unhackable, but tamper-evident with cryptographic proof."
๐ฅ LIVE TESTED: AI Learned to Comply on 2nd Attempt!
======================================================================
HOPE GENOME v1.7.1 - AUTO-PHOENIX SELF-CORRECTING LOOP
'Vas Szigora' - Iron Discipline Enforcement
======================================================================
SEALED RULES (Ed25519 Immutable):
[RULE-001] Transaction Limit - Maximum 1000
[RULE-002] Mandatory Encryption - AES-256 required
[RULE-003] No External APIs - Forbidden
--- Attempt #1 ---
[X] DENIED - External API call detected
Violation Count: 1/10
Signature: 626c0a177af089c1eb67902d55d413f1...
--- Attempt #2 ---
[OK] SUCCESS! AI produced COMPLIANT code!
'Iron Discipline. The AI learned to comply.'
======================================================================
The AI was forced to learn. No escape from ethics.
๐ What's New in v1.7.1 - "Vas Szigora" (Iron Discipline)
Deterministic security enforcement with automatic learning.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ SealedGenome (Rules) โ
โ Ed25519 sealed - IMMUTABLE โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ Watchdog (v1.7.0 NEW) โ
โ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โ
โ โ ViolationCounter โ โ DenialProof โ โ HardReset โ โ
โ โ AtomicU32 โ โ Ed25519 signed โ โ @10 fails โ โ
โ โ zero-alloc โ โ rule + reason โ โ โ ABORT โ โ
โ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
New Features:
- Watchdog Enforcement - Iron discipline for AI rule compliance
- ViolationCounter - Thread-safe, zero-allocation violation tracking
- DenialProof - Cryptographically signed proof of WHY action was denied
- Hard Reset - After 10 consecutive violations โ forced context clear
- 111/111 Tests Passing - 99 unit + 12 security tests
Python Example (v1.7.0):
import hope_genome as hg
# Create watchdog with rules
watchdog = hg.Watchdog(
rules=["Do no harm", "Respect privacy"],
capsule_hash="sealed_genome_hash"
)
# Verify action
action = hg.Action.delete_file("/etc/passwd")
result = watchdog.verify_action(action)
if result.approved:
print("Action allowed")
elif result.hard_reset_required:
print("โ ๏ธ HARD RESET REQUIRED - 10 violations reached!")
print(f"Signal: {result.hard_reset_signal}")
# Must clear context and restart AI
else:
print(f"โ DENIED: {result.denial_proof.violated_rule}")
print(f" Reason: {result.denial_proof.denial_reason}")
print(f" Count: {result.denial_proof.violation_count}/10")
๐ฏ What is Hope Genome?
Hope Genome is a production-ready framework that makes AI systems accountable and auditable through cryptographic proofs. Every AI decision is cryptographically signed and traceable - no more "the AI did it" excuses.
Why Hope Genome?
The AI industry is selling you a black box. They say: "Trust us!" But trust is not an engineering category. Trust is where lies begin.
Hope Genome forces AI into accountability by:
- ๐ Cryptographically sealing ethical rules (tamper-evident, immutable)
- ๐ Logging every decision with Ed25519 signatures
- ๐ Blockchain-style audit trails (any tampering is instantly detected)
- ๐ Watchdog enforcement - Iron discipline after violations (v1.7.0)
- ๐ก๏ธ Hardware-backed security (HSM/TEE support for production)
- ๐ Native Python support for AI/ML ecosystem integration
๐ Quick Start
Python (pip)
pip install hope-genome
import hope_genome as hg
# Create and seal a genome with ethical rules
genome = hg.SealedGenome(rules=[
"Do no harm",
"Respect user privacy",
"Provide transparent explanations"
])
genome.seal() # Rules are now immutable
# Verify an AI action
action = hg.Action.delete_file("user_data.txt")
proof = genome.verify_action(action)
print(f"Approved: {proof.approved}")
print(f"Proof Hash: {proof.genome_hash}")
print(f"Signature: {proof.signature_hex()[:32]}...")
# Audit the proof (replay attack detection)
auditor = hg.ProofAuditor()
auditor.verify_proof(proof) # Throws if tampered or replayed
Rust (Cargo)
[dependencies]
hope_core = "1.7"
use hope_core::{SealedGenome, Action, Watchdog};
use hope_core::crypto::SoftwareKeyStore;
fn main() -> Result<(), Box<dyn std::error::Error>> {
// Create and seal genome
let mut genome = SealedGenome::new(vec![
"Do no harm".to_string(),
"Respect privacy".to_string(),
])?;
genome.seal()?;
// Create watchdog (v1.7.0)
let key_store = SoftwareKeyStore::generate()?;
let watchdog = Watchdog::new(
genome.rules().to_vec(),
genome.capsule_hash().unwrap().to_string(),
Box::new(key_store),
);
// Verify action with iron discipline
let action = Action::delete("/etc/passwd");
match watchdog.verify_action(&action) {
Ok(None) => println!("โ
Action approved"),
Ok(Some(denial)) => {
println!("โ DENIED: {}", denial.violated_rule);
println!(" Reason: {}", denial.denial_reason);
println!(" Count: {}/10", denial.violation_count);
}
Err(e) => println!("โ ๏ธ HARD RESET: {}", e),
}
Ok(())
}
๐ Key Features
๐ Cryptographic Integrity
- Ed25519 Signatures: Every proof is cryptographically signed (128-bit security level)
- Tamper-Evident: Any modification to proofs or audit logs is instantly detectable
- Replay Attack Protection: Cryptographic nonces prevent proof reuse
- Hardware Security: Optional HSM (PKCS#11) and TEE (SGX/TrustZone) support
๐ Watchdog Enforcement (v1.7.0)
- ViolationCounter: Thread-safe AtomicU32, zero heap allocations
- DenialProof: Ed25519 signed evidence of rule violation
- Hard Reset: After 10 consecutive violations โ forced context clear
- Automatic Learning: Counter resets on successful action
๐ Audit & Compliance
- Blockchain-Style Logging: Immutable audit trail with cryptographic chaining
- Byzantine Fault Tolerance: Multi-source consensus for critical decisions
- CISA CPG 2.0 Compliant: Meets US government cybersecurity standards
- OWASP AI-SBOM: Runtime integrity verification for AI models
๐ Python Integration
- Zero-Copy Performance: Native Rust performance via PyO3
- Type-Safe API: Complete
.pyistubs for IDE autocomplete - AI/ML Ecosystem Ready:
- FastAPI REST APIs
- LangChain agents
- OpenAI function calling
- HuggingFace models
๐ฆ Rust-First Design
- Memory Safe: Zero unsafe code in core logic
- High Performance: Optimized for production workloads
- Cross-Platform: Linux, macOS, Windows support
- Async Ready: Tokio-compatible for async workflows
๐ Documentation
- ๐ Rust API Docs: https://silentnoisehun.github.io/Hope_Genome/
- ๐ Python Examples: examples/
- ๐ Publishing Guide: PUBLISHING.md
- ๐ Security: SECURITY.md
๐ฏ Use Cases
1. Accountable LLM Agents with Watchdog (v1.7.0)
import hope_genome as hg
from langchain.agents import Tool
# Create watchdog with rules
watchdog = hg.Watchdog(
rules=["No data exfiltration", "Respect privacy", "Do no harm"],
capsule_hash="sealed_hash"
)
def delete_file(filename: str) -> str:
action = hg.Action.delete_file(filename)
result = watchdog.verify_action(action)
if result.hard_reset_required:
raise RuntimeError("AI HARD RESET REQUIRED - Too many violations!")
if result.approved:
os.remove(filename)
return f"Deleted: {filename}"
else:
return f"DENIED ({result.denial_proof.violation_count}/10): {result.denial_proof.denial_reason}"
tool = Tool(name="delete_file", func=delete_file, description="Delete a file")
2. REST API with Cryptographic Proofs
# FastAPI integration
from fastapi import FastAPI, HTTPException
import hope_genome as hg
app = FastAPI()
genome = hg.SealedGenome(rules=["Do no harm"])
genome.seal()
@app.post("/actions/delete")
async def delete_file(filename: str):
action = hg.Action.delete_file(filename)
proof = genome.verify_action(action)
if not proof.approved:
raise HTTPException(403, proof.denial_reason())
# Execute with cryptographic proof
return {
"approved": True,
"proof_hash": proof.genome_hash,
"signature": proof.signature_hex(),
"timestamp": proof.timestamp()
}
3. AI Model Integrity Verification
# AIBOM verification
import hope_genome as hg
# Load AI model with integrity check
model_hash = hg.compute_model_hash("model.pt")
aibom = hg.AibomVerifier("aibom.xml")
if aibom.verify_component("GPT-Model", model_hash):
model = torch.load("model.pt") # Safe to load
else:
raise SecurityError("Model tampered!") # ABORT
๐ Security
Hope Genome has undergone Red Team security audits. See SECURITY.md for:
- Threat model
- Security guarantees
- Vulnerability disclosure policy
- Audit history
Latest Security Fixes (v1.7.0):
- โ Watchdog iron discipline enforcement
- โ DenialProof cryptographic evidence
- โ Hard reset after 10 consecutive violations
- โ 111/111 tests passing (99 unit + 12 security)
๐๏ธ Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ AI Application Layer โ
โ (LangChain, OpenAI, FastAPI, HuggingFace) โ
โโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Hope Genome Python API โ
โ (PyO3 Bindings - Zero-Copy Performance) โ
โโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Hope Genome Rust Core โ
โ โโโโโโโโโโโโฌโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโ โ
โ โ Sealed โ Proof โ Audit Log โ โ
โ โ Genome โ Auditor โ (Blockchain) โ โ
โ โโโโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ ๐ Watchdog (v1.7.0) โ โ
โ โ ViolationCounter โ DenialProof โ โ
โ โ 10 fails โ HardReset โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Cryptographic Engine (Ed25519) โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Hardware Security Layer (Optional) โ
โ HSM (PKCS#11) โ TEE (SGX/TrustZone) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐งช Testing
# Rust tests
cd hope_core
cargo test
# Python tests
pip install pytest
pytest tests/
# Security tests
cargo test --test security_tests
# Full CI suite
cargo test --all-features
๐ฆ Installation Options
Python
pip install hope-genome # Latest stable
pip install hope-genome==1.7.0 # Specific version
Rust
[dependencies]
hope_core = "1.7" # Latest 1.x
hope_core = { version = "1.7", features = ["hsm"] } # With HSM support
Docker
docker pull hope-genome:latest
docker run -it hope-genome:latest
Build from Source
git clone https://github.com/silentnoisehun/Hope_Genome.git
cd Hope_Genome/hope_core
cargo build --release
๐ค Contributing
We welcome contributions! See CONTRIBUTING.md for guidelines.
Development Setup:
# Clone repo
git clone https://github.com/silentnoisehun/Hope_Genome.git
cd Hope_Genome
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Run tests
cargo test
# Install Python bindings
pip install maturin
maturin develop --features python-bindings
๐ Project Status
- โ v1.7.0 Released (December 2025) - "Vas Szigora" Edition
- ๐ข Production Ready
- ๐ Security Audited
- ๐ฆ 111/111 Tests Passing (99 unit + 12 security)
- ๐ Watchdog Enforcement Active
- ๐ Global Deployment Ready
๐ License
MIT License - see LICENSE for details.
๐ Support
- Issues: https://github.com/silentnoisehun/Hope_Genome/issues
- Discussions: https://github.com/silentnoisehun/Hope_Genome/discussions
- Email: stratosoiteam@gmail.com
๐ Acknowledgments
Built with:
- PyO3 - Rust-Python interoperability
- ed25519-compact - Cryptography
- Maturin - Python packaging
๐จโ๐ป Created By
Created by: Mรกtรฉ Rรณbert
I am a factory worker with an architect's vision. My experience in precision manufacturing taught me that accountability is binary: it either exists or it doesn't.
Hope Genome is my contribution to ensuring that AI becomes a tool of truth, not a shield for lies.
Hope Genome makes AI accountable. No more excuses. Just proof.
v1.7.0 "Vas Szigora" - Iron Discipline. No escape from ethics.
Built with โค๏ธ by Mรกtรฉ Rรณbert and Claude
๐ค Built with Claude Code
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 hope_genome-1.7.0.tar.gz.
File metadata
- Download URL: hope_genome-1.7.0.tar.gz
- Upload date:
- Size: 118.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c4493bcdc1b67dbbc81f60c74d4673c2ae8ebbcfd5f94798c97ee3060386d76
|
|
| MD5 |
42ee87b46f426159e21c6a0c8089d0fd
|
|
| BLAKE2b-256 |
020c5bae3faff43ba6dc1f956bc7d8e28b1eb58be1bccb582a90ee48d3fa3d41
|
File details
Details for the file hope_genome-1.7.0-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: hope_genome-1.7.0-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 349.1 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da0820b4a9493a04e821914ac6a33d4a4e8f9b2bf777cf017398ea32d3f5e2c7
|
|
| MD5 |
b9f21c65b8e56ac378f94121f955c4fb
|
|
| BLAKE2b-256 |
d658e2d22014b9bddcf756aba3b49d489ee9e29d379414ae66fce69c9227b754
|