返回顶部
p

private-computation隐私计算框架

Zero-Knowledge Execution for Sensitive Agent Tasks - Privacy computing framework for AI Agents

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
213
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

private-computation

OpenClaw Private Computation

Zero-Knowledge Execution for Sensitive Agent Tasks
AI Agent 敏感任务的零知识执行框架

A privacy-first computation framework for AI Agents that need to process sensitive data securely. Built with TypeScript for the Node.js ecosystem.

为需要安全处理敏感数据的 AI Agent 打造的隐私优先计算框架。使用 TypeScript 为 Node.js 生态系统构建。



✨ Features / 功能特性

  • - 🔐 Encrypted Credential Storage / 加密凭证存储
- AES-256-GCM encryption for API keys and secrets - API 密钥和敏感信息的 AES-256-GCM 加密
  • - 🛡️ Secure Task Execution / 安全任务执行
- Isolated execution environment for sensitive operations - 敏感操作的隔离执行环境
  • - 📝 Immutable Audit Trail / 不可篡改审计日志
- Blockchain-style audit logs for compliance - 区块链式审计日志,满足合规要求
  • - 🎯 Multiple Security Levels / 多层安全级别
- Basic, Standard (TEE), and Strict (Zero-Knowledge) - 基础、标准(TEE)、严格(零知识证明)
  • - ✅ GDPR & HIPAA Compliant / GDPR 和 HIPAA 合规
- Designed for regulatory compliance - 专为满足监管合规要求而设计

📦 Installation / 安装

Via npm

bash
npm install openclaw-private-computation

Via ClawHub

bash
clawhub install private-computation



🚀 Quick Start / 快速开始

typescript
import { PrivateAgent } from openclaw-private-computation;

// Initialize agent / 初始化 Agent
const agent = new PrivateAgent({
securityLevel: basic, // basic | standard | strict
audit: true // 启用审计日志
});

// Store credentials securely / 安全存储凭证
await agent.setSecret(OPENAIAPIKEY, sk-...);

// Execute sensitive tasks / 执行敏感任务
const result = await agent.executeTask(async () => {
const apiKey = await agent.getSecret(OPENAIAPIKEY);
return await callAPI(apiKey);
}, {
audit: true,
metadata: { taskType: api_call }
});

console.log(result);
// { status: success, data: {...}, auditId: ..., executionTime: 123 }



🎯 Use Cases / 使用场景

1. Medical AI (HIPAA) / 医疗 AI(HIPAA 合规)

typescript
const diagnosis = await agent.executeTask(async () => {
const key = await agent.getSecret(MEDICALAPIKEY);
return await analyzeMedicalData(patientData, key);
}, {
audit: true,
metadata: { complianceLevel: HIPAA }
});

2. Financial Services (PCI-DSS) / 金融服务(PCI-DSS 合规)

typescript
const transaction = await agent.executeTask(async () => {
const bankKey = await agent.getSecret(BANKAPIKEY);
return await processPayment(amount, bankKey);
}, {
audit: true,
timeout: 30000
});

3. AI Agent with Private Context / 带私有上下文的 AI Agent

typescript
const response = await agent.executeTask(async () => {
const llmKey = await agent.getSecret(LLMAPIKEY);
// Private context never exposed / 私有上下文永不暴露
return await generateAI(userQuery, privateContext, llmKey);
}, {
audit: true
});



🔧 API Reference / API 文档

Configuration / 配置

typescript
const agent = new PrivateAgent({
securityLevel: basic | standard | strict,
encryption: aes-256-gcm | chacha20-poly1305,
audit: boolean,
storagePath: string, // Default: ~/.openclaw
masterKey: string // Auto-generated if not provided / 未提供时自动生成
});

Security Levels / 安全级别

Level / 级别Features / 功能Overhead / 开销Use Case / 适用场景
Basic / 基础Encrypted storage / 加密存储~0%Development / 开发测试
Standard / 标准
+ TEE isolation / + TEE 隔离 | ~10% | Production / 生产环境 | | Strict / 严格 | + Zero-knowledge proofs / + 零知识证明 | ~300% | High-security / 高度敏感 |

Credential Management / 凭证管理

typescript
// Store a secret / 存储密钥
await agent.setSecret(KEY_NAME, secret-value);

// Retrieve a secret / 获取密钥
const value = await agent.getSecret(KEY_NAME);

// List all secrets / 列出所有密钥(仅键名)
const keys = agent.listSecrets();

// Delete a secret / 删除密钥
await agent.deleteSecret(KEY_NAME);

Task Execution / 任务执行

typescript
const result = await agent.executeTask(async () => {
// Your task logic / 你的任务逻辑
return someData;
}, {
audit: true, // Enable audit logging / 启用审计日志
proof: true, // Generate ZK proof / 生成零知识证明 (strict mode)
timeout: 30000, // Timeout in ms / 超时时间(毫秒)
metadata: {...} // Custom metadata / 自定义元数据
});

Audit & Compliance / 审计与合规

typescript
// Get audit logs / 获取审计日志
const logs = agent.getAuditLogs(10);

// Verify integrity / 验证完整性
const integrity = agent.verifyAuditIntegrity();
// { valid: true }

// Get statistics / 获取统计信息
const stats = agent.getAuditStatistics();
// { totalLogs: 42, byAction: {...}, byResult: {...} }



🏗️ Architecture / 架构

OpenClaw Private Computation

├── Core Layer / 核心层
│ ├── Encryption Manager / 加密管理器 (AES-256-GCM)
│ ├── Credential Vault / 凭证保险库
│ ├── Audit Logger / 审计日志器 (Blockchain-style)
│ └── Task Executor / 任务执行器

├── Crypto Layer (Future) / 加密层(未来)
│ ├── zk-SNARKs (Zero-Knowledge Proofs) / 零知识证明
│ ├── TEE (Trusted Execution Environment) / 可信执行环境
│ └── Homomorphic Encryption / 同态加密

└── Integration Layer (Future) / 集成层(未来)
├── LangChain Adapter
├── Vercel AI SDK Adapter
└── Claude API Adapter



🛣️ Roadmap / 路线图

Phase 1: MVP ✅ (Current / 当前)

  • - [x] Encrypted credential storage / 加密凭证存储
  • [x] Basic audit logging / 基础审计日志
  • [x] Simple SDK API / 简洁的 SDK API
  • [x] Examples and documentation / 示例和文档

Phase 2: Zero-Knowledge (Next / 下一步)

  • - [ ] zk-SNARKs integration / zk-SNARKs 集成
  • [ ] Proof generation and verification / 证明生成和验证
  • [ ] Circuit library / 电路库

Phase 3: TEE Integration / TEE 集成

  • - [ ] Intel SGX support / Intel SGX 支持
  • [ ] ARM TrustZone support / ARM TrustZone 支持
  • [ ] Hybrid mode (TEE + zk) / 混合模式(TEE + 零知识)

Phase 4: Enterprise Features / 企业功能

  • - [ ] AI framework integrations / AI 框架集成
  • [ ] Compliance reporting / 合规报告
  • [ ] Multi-party computation / 多方计算

🔬 Technology / 技术栈

  • - Language / 语言: TypeScript
  • Runtime / 运行时: Node.js 18+
  • Encryption / 加密: Node.js Crypto (AES-256-GCM, ChaCha20-Poly1305)
  • Zero-Knowledge / 零知识: snarkjs (coming soon / 即将推出)
  • TEE: Intel SGX (planned / 规划中)
  • Audit / 审计: Blockchain-inspired immutable logs / 区块链式不可篡改日志

📚 Documentation / 文档

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 private-computation-1776108794 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 private-computation-1776108794 技能

通过命令行安装

skillhub install private-computation-1776108794

下载

⬇ 下载 private-computation v1.0.0(免费)

文件大小: 4.79 KB | 发布时间: 2026-4-15 14:00

v1.0.0 最新 2026-4-15 14:00
Initial release of OpenClaw Private Computation.

- Introduces a privacy-first computation framework for AI Agents, supporting zero-knowledge execution of sensitive tasks.
- Features encrypted credential storage (AES-256-GCM), isolated/secure task execution, and immutable audit logs.
- Supports multiple security levels, including basic, TEE isolation, and strict zero-knowledge modes.
- Designed for GDPR and HIPAA compliance.
- Provides a simple TypeScript/Node.js API for credential management, secure task execution, and audit logging.
- Documentation, examples, and roadmap included.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部