// diagrams2.jsx, comparison animation + remote attestation handshake const { useEffect: useEffect2, useState: useState2, useRef: useRef2 } = React; // ──────────────────────────────────────────────────────────────────────────── // ComparisonAnimated, three panels side-by-side showing the same prompt flow // through 3 deployment modes. Trust boundary differs in each. // ──────────────────────────────────────────────────────────────────────────── function ComparisonPanel({ L, mode, modeLabel }) { const isOnPrem = mode === "onprem"; const isCloud = mode === "cloud"; const isTEE = mode === "tee"; // outer trust boundary // on-prem: surrounds the whole flow (client + processing both yours) // cloud: surrounds only the cloud zone (operator-owned) // tee: cloud zone is operator-owned, but enclave inside is yours return ( {/* Title strip */} {(L.dataFlow || "DATA FLOW")} · {modeLabel || (mode === "onprem" ? "ON‑PREMISES" : mode === "cloud" ? "STANDARD CLOUD" : "TEE IN CLOUD")} {/* CLIENT box (left) */} {L.client.toUpperCase()} {L.yourPrompt} {/* Cloud zone box, for cloud and tee modes */} {!isOnPrem && ( {L.cloudZoneSees}, {isCloud ? L.seesPlain : L.seesCipherOnly} )} {/* On-prem trust band, wraps everything */} {isOnPrem && ( {L.trustDomain} )} {/* GPU/processing box */} {isOnPrem ? ( {L.yourGpu} {L.enclaveInf} {L.yourGpuFoot} ) : isCloud ? ( {L.hostGpu} {L.hostGpuPlain} {L.hostGpuFoot} ) : ( {/* TEE: enclave inside cloud zone */} {L.hwEnclave} {L.enclaveInf} {L.enclaveFoot} B200 / TDX / SEV‑SNP )} {/* Ingress arrow */} {isCloud ? L.plaintextLine : isOnPrem ? L.localWire : L.ciphertext.toUpperCase()} {/* particles */} {[0, 1, 2].map(i => ( ))} {/* Egress arrow */} {isCloud ? L.plaintextLine : L.response.toUpperCase()} {[0.4, 1.3, 2.2].map((d, i) => ( ))} {/* Eyes (operator can see), only on cloud */} {isCloud && ( {[-40, 0, 40].map((dx, i) => ( ))} {L.opTrio} )} {isTEE && ( {[-40, 0, 40].map((dx, i) => ( ))} {L.opTrioBlind} )} ); } // ──────────────────────────────────────────────────────────────────────────── // AttestationFlow, 4-step animated handshake. Step auto-advances; can also // be controlled by the user via a stepper at the bottom. // ──────────────────────────────────────────────────────────────────────────── function AttestationFlow({ L }) { const [step, setStep] = useState2(0); const [auto, setAuto] = useState2(true); useEffect2(() => { if (!auto) return; const t = setInterval(() => setStep(s => (s + 1) % 5), 2400); return () => clearInterval(t); }, [auto]); const onPick = (i) => { setAuto(false); setStep(i); }; // step 0 = idle, 1..4 = active const isActive = (i) => step === i; const isPast = (i) => step >= i; return (
{L.stepsBadge} {/* THREE ACTORS */} {/* client */} {L.client.toUpperCase()} verifier {/* checkmark when verified */} {step >= 4 && ( )} {/* remote enclave */} {L.remote.toUpperCase()} ◆ {L.enclave.toUpperCase()} B200 + TDX {/* self-measure visual, active on step 2 */} MEASURE hash(code) + hash(weights) + nonce → sign w/ chip key {/* vendor */} {L.vendor.toUpperCase()} Intel · NVIDIA · AMD verify chip not revoked? {/* ── ARROWS ── */} {/* 1) client → enclave: nonce */} {L.nonce} {isActive(1) && [0, 0.6, 1.2].map((d, i) => ( ))} {/* 2) enclave self-loop measure (shown via the box highlight) */} SELF‑MEASURE + SIGN {isActive(2) && ( )} {/* 3) enclave → vendor: quote */} QUOTE → {isActive(3) && [0, 0.6, 1.2].map((d, i) => ( ))} {/* 4) vendor → client: verdict + then encrypted data starts */} ✓ ATTESTATION VERIFIED · {L.keyRelease.toUpperCase()} {isActive(4) && [0, 0.4, 0.8].map((d, i) => ( ))} {/* stepper */}
{L.stepsBadge} {[1, 2, 3, 4].map(i => ( ))}
); } window.ComparisonPanel = ComparisonPanel; window.AttestationFlow = AttestationFlow;