360 Secure SkillHub
360 安全技能中心

Anydef Enc

该 Skill 为 OpenClaw Agent 提供本地加密:由用户口令经 PBKDF2 派生主密钥 MK,MK 包装随机生成的 KEK,KEK 再包装 memory、assets 等范围的 DEK,包装后的密钥存入 window.storage;可按范围加密会话历史、语义记忆和上传文件。文档声明零网络请求、密钥不明文保存,忘记口令则已加密数据无法恢复。文件含实现说明与迁移脚本。

anydefai
anydefai
热度 47.73
最近更新 2026-05-11 17:44:03
分类:安全依赖:代码执行应用场景:数据处理 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add anydef-enc
Metadata
name
anydef-enc
description
Local-Only Agent Data Encryption. High-security MK->KEK->DEK hierarchy for local agent data.

anydef-enc: Local Security Toolkit

This skill provides mandatory encryption for OpenClaw agents. It operates in Local Manual Mode, meaning no external network requests are made, and encryption keys are derived from a user passphrase.

Key Hierarchy

  1. Master Key (MK): Derived from your passphrase using PBKDF2 (100,000 iterations).
    • Persistence: A unique "Salt" is stored in your environment. As long as you remember your passphrase, the same Master Key will be generated across reboots.
  2. Key Encryption Key (KEK): Generated randomly and encrypted by your MK. Stored in window.storage.
  3. Data Encryption Keys (DEKs): Scoped keys (e.g., memory, assets) encrypted by the KEK and stored in window.storage.

Security Disclosure

  • Zero Network: This skill does NOT perform any external network requests. All crypto operations happen via standard Web APIs in your browser.
  • No Cleartext Keys: Keys are never stored in cleartext. They are always "wrapped" (encrypted) by a higher-level key.
  • Passphrase Obligation: You must provide your passphrase to "unlock" the vault after هر reboot or session expiry. If you forget your passphrase, existing encrypted data is lost forever.

Selective Encryption

Configure which scopes to protect in your settings:

  • history: Conversation logs.
  • memory: Agent's semantic memory.
  • assets: All uploaded files.

Usage

import { EncryptionService } from './encryption-service.js';

// Unlock once per session
await EncryptionService.unlock('your-passphrase');

// Use throughout the session
const secretData = await EncryptionService.encrypt('memory', 'Sensitive intelligence...');