Crate _hope_core

Crate _hope_core 

Source
Expand description

§Hope Genome v2.5.0 - Enterprise Edition

“Quantum-Ready, Hardware-Secured, AI-Transparent”

Hope Genome v2.5 is the complete enterprise AI safety stack. Post-quantum cryptography, hardware enclaves, encrypted inference, and neuron-level transparency.

§Core Philosophy

“The system must no longer be a castle; it must be the atmosphere.”

  • GENESIS BLOCK: Immutable First Ethics signed by the Architect
  • HIVE MIND: Gossip-based global threat propagation in milliseconds
  • APEX CONTROL: Creator override requiring multi-signature
  • STEALTH MODE: Invisible sentinel with polymorphic memory slots

§Features

§Core (v1.x)

  • Cryptographic Proofs - Ed25519-signed integrity tokens
  • Immutable Audit Trail - Blockchain-style logging
  • Attack Detection - Replay, Oracle, TOCTOU prevention
  • Watchdog Enforcement - “Vas Szigora” iron discipline

§Advanced Security (v1.8.0)

  • Zero-Knowledge Proofs - Prove compliance without revealing decisions
  • BFT Watchdog Council - Byzantine Fault Tolerant multi-node
  • Panic Integrity - Self-destructing key protection

§Executable Information Mesh (v2.0.0)

  • DataCapsule - Executable data with access protocol (WASM-ready)
  • MutationGuard - Dead Man’s Switch for self-destructing integrity

§Recursive Self-Evolution (v2.1.0 “Singularity”)

  • EvolutionaryGuard - Digital immune system that learns from attacks
  • PolymorphicFilter - Self-mutating defensive code
  • ImmunityMemory - Persistent threat memory

§Genesis Protocol (v2.2.0 NEW - “The Atmosphere”)

  • GenesisBlock - First Ethics, Architect-signed immutable root
  • SyncProtocol - Gossip-based hive mind (millisecond propagation)
  • ApexControl - God-Key multi-sig override (Architect + Council)
  • StealthIntegrity - Invisible sentinel, WASM memory slot rotation
  • GlobalImmunityMesh - THE ATMOSPHERE ITSELF

§Example (v1.4.0 New API)

use _hope_core::*;
use _hope_core::crypto::SoftwareKeyStore;
use _hope_core::nonce_store::MemoryNonceStore;

// Create genome with Ed25519 keys
let mut genome = SealedGenome::new(vec![
    "Do no harm".to_string(),
    "Respect privacy".to_string(),
]).unwrap();

// Seal it (make immutable)
genome.seal().unwrap();

// Create action
let action = Action::delete("test.txt");

// Get cryptographic proof (Ed25519 signed)
let proof = genome.verify_action(&action).unwrap();

// Verify proof with pluggable backends
let key_store = SoftwareKeyStore::generate().unwrap();
let nonce_store = MemoryNonceStore::new();
let mut auditor = ProofAuditor::new(
    Box::new(key_store),
    Box::new(nonce_store),
);

§Security Model

§Protected Against

  • Cryptographic forgery - Cannot fake Ed25519 signatures
  • Replay attacks - Persistent nonce store (RocksDB/Redis support)
  • Oracle attacks - Action binding verification
  • Log tampering - Blockchain chain integrity
  • TOCTOU - Rust-controlled execution
  • Marvin Attack - Ed25519 eliminates RSA padding vulnerabilities (v1.4.0)

§NOT Protected Against

  • Root access - Attacker with full system control
  • Sensor manipulation - Mitigated via consensus
  • Side-channel attacks - Use HSM for production (v1.4.0: architecture ready)

§Major Changes in v1.4.0 (2025-12-30)

  1. Ed25519 Migration: RSA-2048 → Ed25519 (eliminates Marvin attack, 100x faster)
  2. Persistent Nonce Store: RocksDB/Redis backends for replay attack protection
  3. HSM Abstraction Layer: PKCS#11 ready (architecture in place, implementation TBD)

§Authors

  • Máté Róbert - Primary Author & Architect
  • Claude (Anthropic) - Technical Advisor & Co-Designer

Re-exports§

pub use audit_log::AuditEntry;
pub use audit_log::AuditLog;
pub use audit_log::Decision;
pub use auditor::ProofAuditor;
pub use canonicalize::are_equivalent;
pub use canonicalize::canonicalize_action;
pub use canonicalize::CanonicalAction;
pub use consensus::ConsensusVerifier;
pub use consensus::SensorReading;
pub use crypto::create_key_store;
pub use crypto::generate_nonce;
pub use crypto::hash_bytes;
pub use crypto::HsmConfig;
pub use crypto::KeyPair;Deprecated
pub use crypto::KeyStore;
pub use crypto::KeyStoreConfig;
pub use nonce_store::MemoryNonceStore;
pub use nonce_store::NonceStore;
pub use executor::ExecutionResult;
pub use executor::SecureExecutor;
pub use genome::SealedGenome;
pub use proof::Action;
pub use proof::ActionType;
pub use proof::IntegrityProof;
pub use proof::VerificationStatus;
pub use watchdog::DenialProof;
pub use watchdog::HardResetSignal;
pub use watchdog::ViolationCounter;
pub use watchdog::Watchdog;
pub use watchdog::WatchdogError;
pub use watchdog::MAX_VIOLATIONS;
pub use merkle_audit::AuditDecision;
pub use merkle_audit::BatchAuditor;
pub use merkle_audit::DecisionType;
pub use merkle_audit::MerkleHash;
pub use merkle_audit::MerkleTree;
pub use merkle_audit::SignedBatch;
pub use zkp::BatchComplianceProof;
pub use zkp::BatchZkpProver;
pub use zkp::ComplianceProof;
pub use zkp::PrivateDecision;
pub use zkp::ZkpProver;
pub use zkp::ZkpVerifier;
pub use bft_watchdog::ConsensusResult;
pub use bft_watchdog::CouncilMember;
pub use bft_watchdog::CouncilStatus;
pub use bft_watchdog::MemberId;
pub use bft_watchdog::ThresholdSignature;
pub use bft_watchdog::Vote;
pub use bft_watchdog::VoteDecision;
pub use bft_watchdog::WatchdogCouncil;
pub use panic_integrity::AnomalyEvent;
pub use panic_integrity::AnomalyType;
pub use panic_integrity::PanicLogEntry;
pub use panic_integrity::PanicProtectedKeyStore;
pub use panic_integrity::PanicState;
pub use panic_integrity::Severity;
pub use panic_integrity::TimingGuard;
pub use mesh_capsule::AccessPredicate;
pub use mesh_capsule::CapsuleState;
pub use mesh_capsule::ConsensusKey;
pub use mesh_capsule::DataCapsule;
pub use mesh_capsule::DefaultPredicate;
pub use mesh_capsule::ExecutionContext;
pub use mesh_capsule::ExecutionResult as MeshExecutionResult;
pub use mesh_capsule::InformationLost;
pub use mesh_capsule::KeyShard;
pub use mesh_capsule::MeshRuntime;
pub use mesh_capsule::MutationGuard;
pub use evolutionary_guard::AttackCategory;
pub use evolutionary_guard::AttackPattern;
pub use evolutionary_guard::EvolutionaryGuard;
pub use evolutionary_guard::FilterGenerator;
pub use evolutionary_guard::FilterRule;
pub use evolutionary_guard::ImmunityMemory;
pub use evolutionary_guard::MutationEngine;
pub use evolutionary_guard::PolymorphicFilter;
pub use evolutionary_guard::SignedFilter;
pub use evolutionary_guard::ThreatLevel;
pub use evolutionary_guard::TimingSignature;
pub use apex_protocol::ApexCommand;
pub use apex_protocol::ApexCommandType;
pub use apex_protocol::ApexControl;
pub use apex_protocol::ApexError;
pub use apex_protocol::CompactedThreatFingerprint;
pub use apex_protocol::GenesisBlock;
pub use apex_protocol::GlobalImmunityMesh;
pub use apex_protocol::MemorySlot;
pub use apex_protocol::MeshNode;
pub use apex_protocol::StealthIntegrity;
pub use apex_protocol::SyncMessage;
pub use apex_protocol::SyncProtocol;
pub use diamond::AttestationChain;
pub use diamond::AxiomViolation;
pub use diamond::ChainedProof;
pub use diamond::ConstraintDecoder;
pub use diamond::DecodingResult;
pub use diamond::DiamondEnclave;
pub use diamond::DiamondProof;
pub use diamond::EnclaveState;
pub use diamond::ForbiddenSpace;
pub use diamond::FormalAxiom;
pub use diamond::GlobalProofRoot;
pub use diamond::ProofChain;
pub use diamond::ProofDerivation;
pub use diamond::ProofVerifier;
pub use diamond::ProvingKey;
pub use diamond::SealedRules;
pub use diamond::SessionProof;
pub use diamond::SnarkCircuit;
pub use diamond::TokenConstraint;
pub use diamond::VerifiedCode;
pub use diamond::VerifyingKey;
pub use transcendence::AmendmentProof;
pub use transcendence::AttackPattern as TranscendenceAttackPattern;
pub use transcendence::BlindedDecision;
pub use transcendence::ComplianceReport;
pub use transcendence::CrossModelEnforcer;
pub use transcendence::DecisionNode;
pub use transcendence::DecisionTree;
pub use transcendence::DefenseEvolution;
pub use transcendence::EnclaveAttestation;
pub use transcendence::ExplainabilityEngine;
pub use transcendence::ExplainabilityProof;
pub use transcendence::GovernanceProof;
pub use transcendence::HardwareEnforcer;
pub use transcendence::HopeScore;
pub use transcendence::HsmBinding;
pub use transcendence::InteractiveProof;
pub use transcendence::ModelBoundary;
pub use transcendence::ModelCapability;
pub use transcendence::ModelRegistry;
pub use transcendence::PrivacyPreservingAudit;
pub use transcendence::ProofChallenge;
pub use transcendence::ProofResponse;
pub use transcendence::ReasoningStep;
pub use transcendence::RegulatoryFramework;
pub use transcendence::RegulatorySubmission;
pub use transcendence::ReputationEvent;
pub use transcendence::ReputationLedger;
pub use transcendence::ReputationProof;
pub use transcendence::SelfAmendingFramework;
pub use transcendence::SgxEnclave;
pub use transcendence::SubmissionStatus;
pub use transcendence::TeeCapability;
pub use transcendence::TemporalProof;
pub use transcendence::Timeline;
pub use transcendence::TimelineEntry;
pub use transcendence::TimelineQuery;
pub use transcendence::TimelineVerifier;
pub use transcendence::TrustLevel;
pub use transcendence::UnifiedDecision;
pub use transcendence::VerificationSession;
pub use transcendence::Verifier;
pub use transcendence::ZkGovernance;
pub use manifold::ConsciousnessAttestation;
pub use manifold::ConsciousnessProof;
pub use manifold::CrystalIntegrity;
pub use manifold::CrystalStructure;
pub use manifold::CrystallizedWeight;
pub use manifold::EthicalCrystal;
pub use manifold::EthicalCurvature;
pub use manifold::EthicalExistence;
pub use manifold::EthicalGeodesic;
pub use manifold::EthicalManifold;
pub use manifold::EthicalMetric;
pub use manifold::EthicalPoint;
pub use manifold::ExistenceProof;
pub use manifold::GenesisCore;
pub use manifold::GenesisState;
pub use manifold::OntologicalEthics;
pub use manifold::TopologicalConstraint;
pub use manifold::UnderstandingDepth;
pub use manifold::UnderstandingProver;
pub use manifold::WeightCrystallizer;
pub use manifold::WhyChain;

Modules§

adaptive
Adaptive Defense Module - Dynamic Pattern Updates
apex_protocol
Hope Genome v2.2 - Genesis Protocol & Global Immunity
audit_log
auditor
Hope Genome v1.4.0 - Proof Auditor
bft_watchdog
Hope Genome v1.8.0 - Byzantine Fault Tolerant Watchdog
canonicalize
consensus
crypto
Hope Genome v1.4.1 - Cryptographic Primitives
diamond
Hope Genome v14 DIAMOND - The Impossible Made Real
evolutionary_guard
Hope Genome v2.1 - Evolutionary Guard (“Singularity”)
executor
fhe
Fully Homomorphic Encryption Module
genome
Hope Genome v1.4.0 - Sealed Genome (Ethical Ruleset)
interpretability
Mechanistic Interpretability Module
manifold
Ethical Manifold v16.0.0 - Genesis Consciousness
merkle_audit
Hope Genome v1.8.0 - Merkle Tree Batch Auditing
mesh_capsule
Hope Genome v2.0 - Executable Information Mesh
nonce_store
Hope Genome v1.4.0 - Persistent Nonce Store API
panic_integrity
Hope Genome v1.8.0 - Panic Integrity (Self-Destructing Protection)
pqc
Post-Quantum Cryptography (PQC) Module
proof
semantic
Semantic Blindness Solution - Vector Embeddings Module
tee
Trusted Execution Environment (TEE) Module
transcendence
Transcendence Protocol v15.0.0
watchdog
Hope Genome v1.7.0 - Watchdog Module (“Vas Szigora” / Iron Discipline)
zkp
Hope Genome v1.8.0 - Zero-Knowledge Proofs

Constants§

VERSION
Version of the Hope Genome framework