diff --git a/EQBSL_SYSTEM_USES_AND_APPLICATIONS_REPORT.md b/EQBSL_SYSTEM_USES_AND_APPLICATIONS_REPORT.md new file mode 100644 index 0000000..a615dda --- /dev/null +++ b/EQBSL_SYSTEM_USES_AND_APPLICATIONS_REPORT.md @@ -0,0 +1,217 @@ +# EQBSL System: Uses and Applications Report + +## 1. Executive Summary + +EQBSL Explorer demonstrates a trust-computation system that treats trust as an evidential state rather than a scalar score. In the current implementation, trust is represented with Evidence-Based Subjective Logic (EBSL) tuples and opinions (`r`, `s` -> `b`, `d`, `u`) in `src/services/ebsl.service.ts`, surfaced through four interactive operational layers: + +- EBSL opinion computation (`src/components/ebsl-playground.component.ts`) +- Dynamic trust network simulation (`src/components/eqbsl-graph.component.ts`) +- Privacy-preserving proof workflow demo (`src/components/zk-demo.component.ts`) +- Human-readable trust interpretation via Cathexis labels (`src/components/cathexis.component.ts`) + +This combination supports high-value applications where systems must reason under uncertainty, prove rule-conformance, and communicate trust states to users and operators. + +## 2. System Capability Baseline + +### 2.1 What the current system already supports + +| Capability | Current Implementation | Practical Meaning | +|---|---|---| +| Opinion from evidence | `calculateOpinion(r,s,a)` with `K=2` in `ebsl.service.ts` | Converts interactions into belief/disbelief/uncertainty with explicit unknown-state handling | +| Expected trust value | `expectedProbability()` in `ebsl.service.ts` | Produces a decision-friendly score while preserving uncertainty in the underlying model | +| Dynamic trust graph | Autonomous edge growth, decay, role behavior in `eqbsl-graph.component.ts` | Simulates trust formation, drift, and adversarial dynamics in multi-actor networks | +| Temporal degradation | Edge decay + stale culling in `decayEdges()` | Models trust staleness and relationship atrophy over time | +| Role/integrity controls | Role switching + reliability tuning in node inspector | Lets operators test honest/mixed/malicious behavior profiles | +| ZK verification pattern | Prover/verifier split in `zk-demo.component.ts` | Demonstrates proving update-rule compliance without exposing raw evidence | +| Semantic trust labels | `getCathexisLabel(r,s)` plus optional LLM-generated handles | Maps quantitative trust vectors into operator-friendly narratives | +| AI-assisted identity annotation | `generateAIHandle()` using Gemini API key | Enhances explainability/UX in large trust graphs | + +### 2.2 High-level architecture + +```mermaid +flowchart LR + UI[Angular App UI] + NAV[Navigation / Tab Router\napp.component.ts] + EBSL[EBSL Service\nebsl.service.ts] + G[EQBSL Graph\neqbsl-graph.component.ts] + P[Playground\nebsl-playground.component.ts] + ZK[ZK Demo\nzk-demo.component.ts] + C[Cathexis\ncathexis.component.ts] + AI[Gemini API\noptional] + + UI --> NAV + NAV --> P + NAV --> G + NAV --> ZK + NAV --> C + + P --> EBSL + G --> EBSL + C --> EBSL + + G --> AI + + EBSL --> OP[(Opinion State\nb,d,u,a)] + G --> EDGE[(Evidence Edges\nr,s,lastActive)] + ZK --> PROOF[(Commitment + Proof View)] + C --> LABEL[(Human Trust Handles)] +``` + +## 3. Trust Lifecycle and Operational Mechanics + +### 3.1 Evidence-to-opinion lifecycle + +```mermaid +flowchart TD + A[Interaction occurs] --> B{Outcome quality?} + B -->|Positive| C[Increment r] + B -->|Negative| D[Increment s] + C --> E[Recompute opinion\nb=r/(r+s+2)\nd=s/(r+s+2)\nu=2/(r+s+2)] + D --> E + E --> F[Compute expectation\nE(w)=b+0.5*u] + F --> G[Update edge rendering\nwidth/color/opacity] + F --> H[Update node reputation\nfrom incoming evidence] + H --> I[Assign Cathexis semantic label] + I --> J[Operator decision / policy action] +``` + +### 3.2 Privacy-preserving trust assertion flow + +```mermaid +sequenceDiagram + participant Prover + participant CommitmentState as Commitment Store + participant Verifier + participant Public as Public Trust View + + Prover->>Prover: Add private evidence (r,s) + Prover->>CommitmentState: Update commitment C_t + Prover->>Prover: Generate proof pi_t for rule-conformant update F(E_t, Δ_t) + Prover->>Verifier: Submit (C_t, pi_t) + Verifier->>Verifier: Verify constraints (no raw evidence revealed) + Verifier-->>Public: Accept/reject update + Public-->>Public: Refresh public trust score/projection +``` + +## 4. Application Landscape + +### 4.1 Priority domains and fit + +| Domain | EQBSL Use Case | Why EQBSL Is Better Than Scalar Scores | Minimum Required Components | Readiness | +|---|---|---|---|---| +| Decentralized identity (DID/SSI) | Verifiable issuer/relying-party trust with uncertainty-aware attestations | Distinguishes “unknown” from “bad”; supports evidence-backed trust evolution | EBSL core + graph + ZK constraints | High (prototype-ready) | +| Marketplaces (B2B/B2C) | Vendor reputation with fraud/defect evidence and decay | Prevents reputation inflation from sparse ratings and stale feedback | EBSL core + decay + policy thresholds | High | +| Validator/staking ecosystems | Node/operator trust for delegation and slashing risk | Encodes both reliability and uncertainty, not only uptime averages | Graph simulator + role/integrity modeling + evidence pipelines | Medium-High | +| Supply chain provenance | Trust on suppliers, carriers, certifiers, and checkpoints | Captures conflicting claims and missing evidence explicitly | EBSL core + graph + proof-carrying attestations | Medium | +| Federated AI agents | Agent trust arbitration before tool execution or delegation | Enables uncertainty-aware routing and guardrails | EBSL core + Cathexis + policy engine | Medium | +| Compliance/audit workflows | Prove policy-compliant trust updates without disclosing PII | ZK pattern aligns with least-disclosure and auditability goals | ZK circuits + commitment lifecycle + verifier logs | Medium | +| Content/reputation moderation | Confidence-weighted actor credibility and report handling | Reduces overreaction to low-evidence spikes | EBSL core + temporal decay + investigator UX labels | Medium | +| Public-sector procurement | Transparent contractor trust under partial evidence | Better handling of sparse and conflicting procurement history | EBSL core + explainability layer + governance dashboard | Medium-Low | + +### 4.2 Typical actors and decisions + +| Actor | Decision Supported by EQBSL | Signals Used | +|---|---|---| +| Marketplace risk team | Approve, flag, or throttle seller activity | Edge-level `r/s`, uncertainty `u`, trend/decay | +| Delegator/staker | Select validator set | Role, reliability trajectory, incoming trust evidence | +| Credential verifier | Accept or request additional proof | Opinion tuple, base-rate expectation, proof validity | +| Policy engine | Trigger gating thresholds | `E(w)` + minimum evidence + uncertainty ceiling | +| End-user | Interpret trust quickly | Cathexis handles + compact opinion bars | + +## 5. Detailed Application Patterns + +### 5.1 Identity and access trust gating + +- Pattern: replace binary allow/deny with evidence-backed confidence tiers. +- Example policy: + - `Allow` if `E(w) >= 0.80` and `u <= 0.20` + - `Step-up verification` if `0.55 <= E(w) < 0.80` or `u > 0.20` + - `Deny/quarantine` if `E(w) < 0.55` with minimum evidence count reached +- Benefit: avoids false certainty for new identities. + +### 5.2 Marketplace anti-fraud and anti-Sybil control + +- Pattern: track interaction outcomes as edge evidence and identify malicious clusters. +- Existing support in system: explicit Sybil role defaults + reliability tuning + network evolution/decay. +- Benefit: richer fraud heuristics than star ratings alone. + +### 5.3 Trust-aware routing in distributed systems + +- Pattern: choose counterparties/services based on expectation while preserving exploration. +- Existing analogue: `findInteractionTarget()` uses exploit/explore blend in mature graph mode. +- Benefit: balances short-term reliability with long-term discovery. + +### 5.4 Privacy-preserving compliance attestations + +- Pattern: keep transaction evidence private; publish proof that trust updates followed approved rules. +- Existing analogue: prover/verifier interaction in ZK demo. +- Benefit: auditable integrity without sensitive-data leakage. + +### 5.5 Human-centered trust operations + +- Pattern: attach semantic labels to quantitative trust state for operational clarity. +- Existing support: Cathexis labels (`Unknown Entity`, `Reliable Operator`, `High-Risk Actor`, etc.) plus AI handle generation. +- Benefit: faster analyst comprehension and better cross-team communication. + +## 6. Risks, Limits, and Required Hardening + +### 6.1 Current limitations visible in code + +| Area | Current State | Impact | Hardening Priority | +|---|---|---|---| +| Opinion fusion | `fuseOpinions()` returns `op1` placeholder | Multi-source consensus is not yet production-complete | P0 | +| ZK module | Demo simulation with mocked proof outputs | Not cryptographically enforceable yet | P0 | +| Data persistence | In-memory runtime state for graph interactions | No longitudinal trust history | P0 | +| Identity integrity | Optional AI handle generation can fail silently | Non-deterministic UX naming layer | P2 | +| Adversarial modeling depth | Basic reliability probabilities + random failures | Limited realism for advanced attacks | P1 | +| Governance/policy engine | No standalone policy service | Manual interpretation burden on operators | P1 | + +### 6.2 Threat model and mitigations + +| Threat | Failure Mode | Mitigation Strategy | +|---|---|---| +| Sybil amplification | Fake identities collude to inflate trust | Minimum-evidence thresholds, graph-community anomaly detection, stake/cost constraints | +| Cold-start bias | New entities penalized or misclassified | Explicit uncertainty handling and probationary policies | +| Reputation gaming | Strategic behavior to farm positive evidence | Time-weighted evidence decay, context partitioning, adversarial scoring | +| Data poisoning | Malicious reporters inject false negatives/positives | Source credibility weighting and cross-source correlation checks | +| Privacy leakage | Raw trust evidence exposed in audits | Commitment schemes + ZK proof verification | +| Model drift | Static thresholds become stale | Periodic recalibration using KPI feedback loops | + +## 7. KPI Framework for Real Deployments + +| KPI Category | Metric | Target Example | Why It Matters | +|---|---|---|---| +| Trust quality | False accept rate on high-risk actors | < 2% | Measures safety of trust gating | +| Trust quality | False reject rate on legitimate actors | < 5% | Measures fairness and friction | +| Epistemic quality | Median uncertainty for active entities | Downward trend over 90 days | Confirms evidence accumulation health | +| Security | Sybil cluster detection lead time | < 24h | Measures adversary response speed | +| Privacy | % trust updates with verifiable proof | > 95% in regulated flows | Confirms privacy-preserving integrity | +| Operations | Analyst time-to-decision | -30% from baseline | Measures UX/explainability value | +| Product | Conversion after trust-gated onboarding | +10% vs control | Demonstrates business impact | + +## 8. 30/60/90-Day Adoption Blueprint + +| Phase | Objectives | Deliverables | +|---|---|---| +| Day 0-30 | Formalize trust policy and data model | Evidence schema, threshold policy, domain-specific trust contexts | +| Day 31-60 | Integrate runtime trust graph and persistence | Event ingestion pipeline, stored trust ledgers, dashboards | +| Day 61-90 | Add proof and governance controls | Verifier service, audit export, model calibration and red-team tests | + +## 9. Recommended Near-Term Productization Path + +1. Implement real cumulative fusion in `fuseOpinions()` with tests. +2. Add persistent trust ledger (append-only events + derived opinion snapshots). +3. Externalize policy thresholds into a configurable policy engine. +4. Replace ZK demo placeholders with concrete circuit/proof stack for one critical workflow. +5. Add domain profiles (marketplace, DID, validator, supply chain) as reusable presets in UI. + +## 10. Conclusion + +EQBSL’s strongest practical value is not just “better trust scoring”; it is the combination of: + +- mathematically explicit uncertainty, +- graph-native trust dynamics, +- privacy-preserving verification patterns, +- and human-readable trust semantics. + +The current system already demonstrates these pillars in interactive form. With fusion completion, persistence, and production-grade ZK verification, EQBSL can serve as a trust substrate for identity, marketplaces, validator ecosystems, compliance-heavy workflows, and agentic systems that must reason under uncertainty. diff --git a/README.md b/README.md index 68bb6d3..3b05ebb 100644 --- a/README.md +++ b/README.md @@ -4,357 +4,448 @@ [](https://angular.io) [](https://www.typescriptlang.org/) -**EQBSL Explorer** is an interactive web application for experimenting with mathematically-grounded trust systems and verifiable epistemic reasoning. This project provides hands-on tools to explore: +**EQBSL Explorer** is an interactive web application for experimenting with mathematically-grounded trust systems and verifiable epistemic reasoning. -https://eqbsl-demo.netlify.app/ +Live demo: https://eqbsl-demo.netlify.app/ -- **Evidence-Based Subjective Logic (EBSL)** – Move beyond binary trust scores to model uncertainty using evidence tuples (r, s, u) -- **Zero-Knowledge EBSL (ZK-EBSL)** – Privacy-preserving trust computations using zero-knowledge proofs -- **EQBSL** – Quantum-resistant extensions for distributed identity and reputation systems -- **Cathexis** – Emotional/motivational trust dynamics +It provides hands-on tools for: -Built with Angular 21 and TypeScript, this tool transforms complex cryptographic and epistemic concepts into intuitive, visual experiences. +- **Evidence-Based Subjective Logic (EBSL)**: represent trust as evidence and uncertainty, not just a scalar score +- **ZK-EBSL / Proof-Carrying Trust**: prove trust updates follow rules without revealing private evidence +- **EQBSL graph reasoning**: model trust as dynamic network interactions with decay and adversarial actors +- **Cathexis labeling**: convert quantitative trust states into human-readable semantic labels + +Built with Angular 21 + TypeScript, the project makes trust, reputation, and epistemic uncertainty explorable in a visual interface. > **Repository:** [`Steake/EQBSL`](https://github.com/Steake/EQBSL) > **App metadata:** [`metadata.json`](./metadata.json) --- -## 🎬 Video Explainer +## What EQBSL Solves -Watch this comprehensive introduction to understand how EQBSL revolutionizes trust and reputation systems through mathematically-grounded, privacy-preserving approaches: +Most reputation systems collapse rich trust states into one number (for example, `4.7/5`). That loses key information: - +- how much evidence exists (`2 reviews` vs `20,000 reviews`) +- whether evidence is conflicting +- whether trust is stale +- whether a verifier can validate trust updates without seeing private data -This video covers: -- The fundamental limitations of traditional trust scores -- How Evidence-Based Subjective Logic (EBSL) models uncertainty -- Zero-knowledge proofs for privacy-preserving trust verification -- Quantum-resistant extensions for future-proof security -- Real-world applications in decentralized identity and reputation systems +EQBSL (Evidence-based Quantum-resistant Belief State Logic) models the epistemic state directly: ---- +- **Belief (`b`)**: evidence supporting a proposition +- **Disbelief (`d`)**: evidence against a proposition +- **Uncertainty (`u`)**: absence of evidence +- with the constraint `b + d + u = 1` -## 📖 What is EQBSL? +### Core EBSL mapping used in this repo -**EQBSL (Evidence-based Quantum-resistant Belief State Logic)** is a mathematical framework for reasoning about trust, reputation, and epistemic uncertainty in distributed systems. Unlike traditional trust scores (e.g., "85% trusted"), EQBSL models the full epistemic state: +The `EbslService` computes opinions from evidence (`r`, `s`) using the standard demo parameter `K = 2`: -- **Belief (b)** – Evidence supporting a proposition -- **Disbelief (d)** – Evidence against a proposition -- **Uncertainty (u)** – Absence of evidence (where b + d + u = 1) +- `b = r / (r + s + 2)` +- `d = s / (r + s + 2)` +- `u = 2 / (r + s + 2)` +- `E(w) = b + a*u` (expected probability, with base rate `a`, default `0.5`) -### Why EQBSL Matters +This is implemented in [`src/services/ebsl.service.ts`](./src/services/ebsl.service.ts). -Traditional reputation systems collapse complex trust relationships into a single number, losing critical information about: -- **How much evidence** supports the rating (2 reviews vs. 2000 reviews) -- **Uncertainty** when data is sparse or conflicting -- **Privacy** when revealing trust judgments -- **Quantum resistance** for future-proof cryptographic security +--- -### Key Innovations +## System Overview (Actual App Components) -1. **Evidence-Based Reasoning (EBSL)** - Trust opinions are computed from evidence tuples (r, s) representing positive and negative observations. This enables mathematically rigorous: - - Trust transitivity (A trusts B, B trusts C → A's opinion of C) - - Opinion fusion from multiple sources - - Uncertainty quantification +The app is organized into standalone Angular components selected from a tabbed shell in [`src/app.component.ts`](./src/app.component.ts). -2. **Zero-Knowledge Proofs (ZK-EBSL)** - Prove trust properties without revealing: - - The exact trust values - - The evidence supporting them - - The identities involved - - Example: "I can prove this vendor has >80% trust from 50+ verified buyers, without revealing who those buyers are." +### High-level architecture -3. **Quantum Resistance (EQBSL)** - Built on post-quantum cryptographic primitives to ensure trust systems remain secure against quantum computers, protecting: - - Long-term reputation data - - Privacy-preserving proofs - - Identity attestations +```mermaid +flowchart LR + APP[App Shell\napp.component.ts] --> NAV[Navigation\nnav.component.ts] + APP --> INTRO[Overview / Intro] + APP --> EBSLPLAY[EBSL Playground] + APP --> GRAPH[EQBSL Graph] + APP --> ZK[ZK Demo] + APP --> CATHEXIS[Cathexis] + APP --> PAPERS[Papers + Paper Detail] -4. **Cathexis Integration** - Models emotional/motivational dimensions of trust: - - Approach/avoidance dynamics - - Trust decay over time - - Context-dependent trust relationships + EBSLPLAY --> SVC[EBSL Service\nebsl.service.ts] + GRAPH --> SVC + CATHEXIS --> SVC -### Real-World Applications + GRAPH --> GEMINI[Gemini API (Optional)\nAI Handle Generation] + ZK --> COMMIT[Commitment + Proof UI] + CATHEXIS --> LABELS[Human-readable Trust Labels] +``` -- **Decentralized Identity**: Web-of-trust without centralized authorities -- **Reputation Systems**: Marketplaces, social networks, peer review -- **Secure Voting**: Verifiable ballot privacy with trust in validators -- **Supply Chain**: Track product authenticity with uncertainty modeling -- **AI Safety**: Quantify and verify trust in AI agent behaviors +### Trust data lifecycle in the graph simulation + +The graph visualizer in [`src/components/eqbsl-graph.component.ts`](./src/components/eqbsl-graph.component.ts) simulates autonomous actors, edge evidence growth, and trust decay. + +```mermaid +flowchart TD + STEP[Simulation Step] --> PICK[Pick source node] + PICK --> MODE{Network density} + MODE -->|Sparse| DISC[Discovery mode\nprefer same-role peers] + MODE -->|Dense| EBSLMODE[EBSL mode\nexploit vs explore] + DISC --> TARGET[Select target] + EBSLMODE --> TARGET + TARGET --> TX[Execute transaction] + TX --> OUTCOME{Success? based on target reliability} + OUTCOME -->|Yes| INC_R[Increment edge r] + OUTCOME -->|No| INC_S[Increment edge s] + INC_R --> OP[Recompute opinion / expectation] + INC_S --> OP + OP --> UI[Update edge width/color/opacity\nUpdate node stats + labels] + UI --> DECAY[Background decay loop] + DECAY --> STEP +``` ---- +### Privacy-preserving trust flow (demo pattern) -## 🎯 What Can You Do? +The ZK demo in [`src/components/zk-demo.component.ts`](./src/components/zk-demo.component.ts) demonstrates the prover/verifier interaction model. -- **EBSL Logic Calculator** – Experiment with belief/disbelief/uncertainty operations -- **EQBSL Graph Visualizer** – Model trust networks with AI-assisted node identity generation -- **Zero-Knowledge Demos** – Explore privacy-preserving trust proofs -- **Cathexis Simulator** – Understand emotional dynamics in trust relationships +```mermaid +sequenceDiagram + participant Prover + participant Commit as Commitment State + participant Verifier + participant Public as Public Trust View + + Prover->>Prover: Add private evidence (+r or +s) + Prover->>Commit: Update commitment C_t + Prover->>Prover: Generate proof pi_t (demo simulation) + Prover->>Verifier: Send C_t and pi_t + Verifier->>Verifier: Check update constraints + Verifier-->>Public: Accept proof + Public-->>Public: Refresh visible trust score/projection +``` --- -## 🔬 Research Papers +## Key Features (What You Can Do in the UI) -This implementation is grounded in rigorous academic research. The `Papers/` directory contains: +### 1. EBSL Logic Calculator -- **EBSL in ZK Reputation Systems** – Foundations of zero-knowledge trust proofs -- **EQBSL+ZK** – Quantum-resistant extensions to EBSL -- **Proof-Carrying-Trust** – Verifiable trust computations +[`src/components/ebsl-playground.component.ts`](./src/components/ebsl-playground.component.ts) -For formal definitions, proofs, and protocol specifications, explore these papers and the broader [`EQBSL`](https://github.com/Steake/EQBSL) repository. +- Adjust positive evidence `r` and negative evidence `s` +- Observe belief/disbelief/uncertainty bars update in real time +- See expected probability `E(w)` computed from the opinion tuple +- Visualize why uncertainty decays only with accumulated evidence ---- +### 2. EQBSL Graph Visualizer -## 🛠️ Technology Stack +[`src/components/eqbsl-graph.component.ts`](./src/components/eqbsl-graph.component.ts) -- **Angular 21** – Modern reactive framework with zoneless change detection -- **TypeScript 5.8** – Type-safe development -- **RxJS** – Reactive data flows and state management -- **Tailwind CSS** – Utility-first styling for responsive UI -- **Google Generative AI** – AI-assisted trust model exploration -- **Angular CLI** – Build tooling and development server +- Simulate multi-actor trust networks with autonomous interactions +- Model roles (`Validator`, `Trader`, `Observer`, `Sybil`) +- Tune hidden reliability and observe behavioral divergence +- Inspect incoming/outgoing evidence per node +- Watch stale trust relationships decay over time +- Generate AI-based semantic handles (optional API key) ---- +### 3. Proof-Carrying Trust (ZK Demo) -## 🚀 Getting Started +[`src/components/zk-demo.component.ts`](./src/components/zk-demo.component.ts) -### Prerequisites +- Simulate private evidence updates +- Produce a commitment/proof pair (demo UX) +- Verify rule-conformance without exposing raw evidence +- Understand the separation between private state and public trust view -- **Node.js** 18+ (LTS recommended) – [Download here](https://nodejs.org/) -- **npm** (bundled with Node.js) -- **(Optional)** Google Generative AI API key – For AI-assisted features +### 4. Cathexis Trust Labels -### Installation +[`src/components/cathexis.component.ts`](./src/components/cathexis.component.ts) -1. **Clone the repository:** +- Map trust vectors to human-readable labels +- Preview reputation semantics for new, reliable, mixed, and malicious actors +- Demonstrate operator-friendly explainability for trust tensors -```bash -git clone https://github.com/Steake/EQBSL.git -cd EQBSL -``` +--- -2. **Install dependencies:** +## Real-World Use Cases -```bash -npm install -``` +### Use-case matrix -### Configuration (Optional) +| Domain | Example Deployment | Why EQBSL Helps | Relevant App Modules | +|---|---|---|---| +| Decentralized identity (DID/SSI) | Verifier decides whether to trust an issuer under sparse history | Distinguishes “unknown” from “bad”; supports privacy-preserving checks | EBSL + ZK + Cathexis | +| Marketplaces | Vendor/reviewer reputation with fraud resistance | Models evidence volume, conflict, and decay; reduces rating inflation | EBSL + Graph | +| Validator/staking networks | Delegator chooses validators under uncertainty | Captures reliability and uncertainty, not only uptime averages | Graph + EBSL | +| Supply chain provenance | Trust in suppliers, certifiers, transport checkpoints | Handles missing/conflicting evidence and auditability requirements | EBSL + ZK | +| AI agents / tool orchestration | Gate agent actions based on trust in tools/peers | Supports uncertainty-aware routing and policy thresholds | EBSL + Cathexis | +| Moderation / trust & safety | Prioritize reports and actor reviews | Avoids overreacting to low-evidence events; supports analyst triage | Graph + Cathexis | +| Compliance-heavy workflows | Prove policy-compliant trust updates without PII disclosure | Separates public verification from private evidence | ZK demo pattern | -For AI-assisted network identity generation, configure your Google Generative AI API key: +### Example examples (worked scenarios) -1. Get an API key from [Google AI Studio](https://aistudio.google.com/) -2. Set the environment variable before running the app: +#### Example 1: New identity vs bad identity (same score problem) -```bash -export API_KEY="your-api-key-here" -npm run dev -``` +A scalar system might give both actors a low/neutral score for different reasons. EQBSL separates them. -Or on Windows: +| Actor | Evidence `(r,s)` | Opinion `(b,d,u)` using K=2 | Interpretation | +|---|---:|---|---| +| New issuer | `(0,0)` | `(0.00, 0.00, 1.00)` | Unknown, no evidence | +| Risky issuer | `(0,8)` | `(0.00, 0.80, 0.20)` | Strong evidence against | -```cmd -set API_KEY=your-api-key-here -npm run dev -``` +This difference is operationally critical for identity onboarding and fraud review. -> **Note:** The app works without an API key, but AI features in the EQBSL Graph component will be disabled. +#### Example 2: Marketplace seller trust thresholding -### Development Server +A policy engine can use both expected trust and uncertainty: -Start the local development server with live reload: +- `Allow fast checkout` if `E(w) >= 0.80` and `u <= 0.20` +- `Require manual review` if `0.55 <= E(w) < 0.80` or `u > 0.20` +- `Throttle / quarantine` if `E(w) < 0.55` with sufficient evidence -```bash -npm run dev -``` +Worked values with `a = 0.5`: -The app will be available at `http://localhost:4200` (or the next available port). Open this URL in your browser to start exploring! +| Seller | `(r,s)` | `b` | `d` | `u` | `E(w)` | Decision | +|---|---:|---:|---:|---:|---:|---| +| A | `(18,2)` | `0.818` | `0.091` | `0.091` | `0.864` | Allow fast checkout | +| B | `(4,1)` | `0.571` | `0.143` | `0.286` | `0.714` | Manual review | +| C | `(2,9)` | `0.154` | `0.692` | `0.154` | `0.231` | Throttle/quarantine | -### Production Build +#### Example 3: Validator selection under uncertainty -Create an optimized production build: +Two validators can have similar raw uptime percentages but different evidence volumes. -```bash -npm run build -``` +| Validator | Observed evidence | Trust implication | +|---|---|---| +| `V1` | `r=9, s=1` | Good performance, moderate confidence | +| `V2` | `r=900, s=100` | Similar ratio, much lower uncertainty and stronger basis for delegation | -This compiles the app with optimizations enabled. Output is placed in `./dist/` as configured in [`angular.json`](./angular.json). +EQBSL makes this distinction explicit instead of hiding it in a single percentage. -### Production Preview +#### Example 4: Privacy-preserving compliance attestation -Test the production build locally: +A verifier needs to know whether a trust update followed policy, but not the underlying transaction details. -```bash -npm run preview -``` +- Prover maintains private evidence history +- Prover publishes updated commitment `C_t` +- Prover submits proof `π_t` that update rule `F(E_t, Δ_t)` was followed +- Verifier checks proof and accepts public trust projection -This serves the app using production configuration (equivalent to `ng serve --configuration=production`). +This is the model illustrated in the ZK demo component. --- -## 📁 Project Structure +## Why This Matters in Production Systems -``` -EQBSL/ -├── Papers/ # Research papers (PDFs) -├── src/ -│ ├── app.component.ts # Main Angular app component -│ ├── components/ # Feature components -│ │ ├── intro.component.ts -│ │ ├── ebsl-playground.component.ts -│ │ ├── eqbsl-graph.component.ts -│ │ ├── zk-demo.component.ts -│ │ └── cathexis.component.ts -│ └── services/ # Shared services -├── index.html # HTML entry point -├── index.tsx # TypeScript bootstrap file -├── angular.json # Angular CLI configuration -├── package.json # Dependencies and scripts -├── tsconfig.json # TypeScript configuration -└── metadata.json # App metadata -``` +### Compared to scalar reputation scores + +| Capability | Scalar Score | EQBSL-style Opinion Model | +|---|---|---| +| Represents uncertainty directly | No | Yes (`u`) | +| Distinguishes new vs bad actor | Often no | Yes | +| Supports evidence count reasoning | Weak | Native (`r`,`s`) | +| Supports trust decay semantics | Usually custom add-on | Fits naturally in temporal updates | +| Supports privacy-preserving verification patterns | Rare | Designed for integration with ZK workflows | +| Human explainability | Superficial labels | Quantitative + semantic labels (Cathexis) | + +### Practical adoption path + +1. Start with EBSL-only scoring for one workflow (e.g., vendor risk). +2. Add uncertainty-aware policy thresholds (`E(w)` + `u`). +3. Add graph-level evidence aggregation and decay. +4. Add semantic labels for analyst UX. +5. Add proof-carrying trust for regulated/high-sensitivity flows. --- -## 📜 Available Scripts +## Video Explainer -The following npm scripts are defined in `package.json`: +Watch the full introduction: -| Command | Description | -|---------|-------------| -| `npm run dev` | Start development server with live reload | -| `npm run build` | Create optimized production build | -| `npm run preview` | Serve app with production configuration | + + +The video covers: + +- limitations of traditional trust scores +- EBSL uncertainty modeling +- zero-knowledge trust verification concepts +- quantum-resistant extensions +- real-world applications for identity and reputation systems --- -## 🔧 Troubleshooting +## Research Basis -### Port Already in Use +The `Papers/` directory contains the current research papers used to ground this implementation: -If port 4200 is already in use, Angular will automatically try the next available port. Check your terminal output for the exact URL. +- **EBSL in ZK Reputation Systems** (`Papers/EBSL in ZK Reputation Systems.pdf`) +- **EQBSL+ZK** (`Papers/EQBSL+ZK.pdf`) +- **Proof-Carrying-Trust** (`Papers/Proof-Carrying-Trust.pdf`) -### API Key Issues +The in-app papers browser is implemented in: -If AI features aren't working: +- [`src/components/papers.component.ts`](./src/components/papers.component.ts) +- [`src/components/paper-detail.component.ts`](./src/components/paper-detail.component.ts) -1. Verify your API key is set correctly: `echo $API_KEY` (Unix) or `echo %API_KEY%` (Windows) -2. Ensure you have credits available in your Google AI Studio account -3. Check the browser console for error messages +--- -### Build Errors +## Getting Started -If you encounter build errors after updating dependencies: +### Prerequisites + +- **Node.js** 18+ (LTS recommended) +- **npm** (bundled with Node.js) +- **Optional:** Google Generative AI API key for AI-generated handles in the graph visualizer + +### Install ```bash -rm -rf node_modules package-lock.json +git clone https://github.com/Steake/EQBSL.git +cd EQBSL npm install ``` -### TypeScript Errors +### Run locally -The project uses TypeScript 5.8. Ensure your IDE is using the workspace TypeScript version: +```bash +npm run dev +``` -- **VS Code**: `Ctrl/Cmd + Shift + P` → "TypeScript: Select TypeScript Version" → "Use Workspace Version" +Then open the local URL shown by Angular CLI (typically `http://localhost:4200`). ---- +### Optional: enable AI handle generation -## 🧪 Interactive Components +Unix/macOS: -### EBSL Logic +```bash +export API_KEY="your-api-key-here" +npm run dev +``` + +Windows (cmd): -Experiment with subjective logic operations: -- **Belief (b)**, **Disbelief (d)**, **Uncertainty (u)** triplets -- Evidence-based reasoning with positive (r) and negative (s) observations -- Logical operators: conjunction, disjunction, discount, consensus +```cmd +set API_KEY=your-api-key-here +npm run dev +``` -### EQBSL Graph +If no API key is set, the app still works; only AI identity generation in the EQBSL graph is disabled. -Visualize trust networks: -- Create nodes with roles and reliability metrics -- Establish trust relationships between entities -- AI-generated identity profiles for realistic scenarios -- Real-time trust propagation calculations +### Build and preview -### ZK Demo +```bash +npm run build +npm run preview +``` -Explore zero-knowledge proofs: -- Privacy-preserving trust verification -- Commitment schemes for EBSL opinions -- Proof generation and verification +--- -### Cathexis +## Project Structure -Model emotional trust dynamics: -- Approach/avoidance motivations -- Trust decay and reinforcement -- Emotional state transitions +```text +EQBSL/ +├── Papers/ # Research papers (PDFs) +├── src/ +│ ├── app.component.ts # Main Angular app shell and tab routing +│ ├── services/ +│ │ └── ebsl.service.ts # EBSL opinion calculations + Cathexis label rules +│ └── components/ +│ ├── intro.component.ts +│ ├── nav.component.ts +│ ├── ebsl-playground.component.ts +│ ├── eqbsl-graph.component.ts +│ ├── zk-demo.component.ts +│ ├── cathexis.component.ts +│ ├── papers.component.ts +│ └── paper-detail.component.ts +├── index.tsx # TS bootstrap entry +├── index.html # HTML entry point +├── angular.json # Angular CLI config +├── package.json # Dependencies and scripts +├── metadata.json # App metadata +└── Verifiable_Epistemic_Trust.mp4 +``` --- -## 🤝 Contributing +## Available Scripts -Contributions are welcome! This is an active research project. If you'd like to contribute: +| Command | Description | +|---|---| +| `npm run dev` | Start Angular development server | +| `npm run build` | Production build | +| `npm run preview` | Serve with production configuration | -1. **Fork the repository** -2. **Create a feature branch** (`git checkout -b feature/amazing-feature`) -3. **Commit your changes** (`git commit -m 'Add amazing feature'`) -4. **Push to the branch** (`git push origin feature/amazing-feature`) -5. **Open a Pull Request** +--- -### Development Guidelines +## Technology Stack -- Follow the existing code style (TypeScript + Angular conventions) -- Use Angular signals for state management -- Keep components standalone when possible -- Write clear commit messages +- **Angular 21** (standalone components, signals) +- **TypeScript 5.x** +- **RxJS** +- **Tailwind CSS** +- **Google Generative AI (`@google/genai`)** for optional handle generation +- **KaTeX** (used in paper-detail presentation styles) --- -## 📚 Learn More +## Current Limitations (Important) -### Documentation +This repository is an interactive explorer and research demo, not a production trust engine yet. -- [Angular Documentation](https://angular.dev/) -- [TypeScript Handbook](https://www.typescriptlang.org/docs/) -- [Tailwind CSS](https://tailwindcss.com/docs) -- [RxJS Guide](https://rxjs.dev/guide/overview) +| Area | Current State | +|---|---| +| Opinion fusion | `fuseOpinions()` is currently a placeholder in `EbslService` | +| ZK proofs | `zk-demo` simulates proof generation/verification UX, not real cryptographic proofs | +| Persistence | Graph state is in-memory only | +| Adversarial realism | Reliability-based behavior is simplified for demonstration | -### Research - -- Browse the `Papers/` directory for academic foundations -- Visit the main [EQBSL repository](https://github.com/Steake/EQBSL) for protocol specifications +If you plan to build on this for production use, prioritize: fusion implementation, persistence, policy engine, and real ZK circuits/verifier services. --- -## 📄 License +## Troubleshooting -This project is part of ongoing research by O. C. Hirst [Steake] & Shadowgraph Labs (2025). See the repository for license details. +### Port already in use ---- +Angular will usually try the next available port. Use the URL shown in terminal output. + +### API key issues (AI handles) -## 🙏 Acknowledgments +- Verify the environment variable is set (`echo $API_KEY` or `echo %API_KEY%`) +- Confirm your Google AI Studio account has access/credits +- Check browser console errors -- Based on research in subjective logic, zero-knowledge proofs, and quantum-resistant cryptography -- Built with modern web technologies for accessible epistemic reasoning -- Special thanks to the Angular, TypeScript, and open-source communities +### Build issues after dependency updates + +```bash +rm -rf node_modules package-lock.json +npm install +``` + +### TypeScript version mismatch in IDE + +Use the workspace TypeScript version. + +- VS Code: `Ctrl/Cmd + Shift + P` -> `TypeScript: Select TypeScript Version` -> `Use Workspace Version` --- -## 📧 Contact & Support +## Contributing + +Contributions are welcome. This is an active research project. -For questions, suggestions, or collaboration opportunities: +1. Fork the repository +2. Create a feature branch (`git checkout -b feature/my-change`) +3. Commit your changes +4. Push the branch +5. Open a pull request -- **GitHub Issues**: [github.com/Steake/EQBSL/issues](https://github.com/Steake/EQBSL/issues) -- **Repository**: [github.com/Steake/EQBSL](https://github.com/Steake/EQBSL) +Development guidelines: + +- Follow Angular + TypeScript conventions used in the repo +- Prefer standalone components +- Use Angular signals for local reactive state where appropriate +- Keep trust logic changes documented with examples/tests where possible --- -
- Made with ❤️ for the future of verifiable trust -
+## Contact / Support + +- **GitHub Issues:** [github.com/Steake/EQBSL/issues](https://github.com/Steake/EQBSL/issues) +- **Repository:** [github.com/Steake/EQBSL](https://github.com/Steake/EQBSL) +