返回顶部
E

Encryption

Encrypt files, secure passwords, manage keys, and audit code for cryptographic best practices.

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

Encryption

## When to Use - Encrypting files, database fields, or app storage - Password hashing (bcrypt, argon2) - Key management, rotation, derivation - TLS/certificate configuration - Auditing code for crypto mistakes - Mobile secure storage (Keychain, Keystore) ## Algorithm Selection | Purpose | Use | Avoid | |---------|-----|-------| | Passwords | argon2id, bcrypt (cost≥12) | MD5, SHA1, plain SHA256 | | Symmetric | AES-256-GCM, ChaCha20-Poly1305 | AES-ECB, DES, RC4 | | Asymmetric | RSA-4096+OAEP, Ed25519, P-256 | RSA-1024, PKCS#1 v1.5 | | Key derivation | PBKDF2 (≥600k), scrypt, argon2 | Single-pass hash | | JWT signing | RS256, ES256 | HS256 with weak secret | | TLS | 1.2+ only | TLS 1.0/1.1, SSLv3 | ## Critical Rules 1. **Never reuse IVs/nonces** — AES-GCM + repeated nonce = catastrophic 2. **Use authenticated encryption (AEAD)** — Plain CBC enables padding oracles 3. **Hash passwords, don't encrypt** — Hashing is one-way 4. **No hardcoded keys** — Use env vars, KMS, or Vault 5. **No Math.random() for crypto** — Use CSPRNG only 6. **Constant-time comparisons** — Prevent timing attacks on secrets 7. **Separate keys by purpose** — Encryption ≠ signing ≠ backup ## File Encryption (CLI) ```bash # age (modern, simple) age -p -o file.age file.txt age -d -o file.txt file.age # GPG gpg -c --cipher-algo AES256 file.txt ``` ## Platform-Specific See `patterns.md` for code snippets: - Password hashing (Node, Python, Go) - Envelope encryption with KMS - JWT with RS256 key rotation - Secure token generation See `mobile.md` for: - iOS Keychain wrapper - Android EncryptedSharedPreferences - SQLCipher setup - Biometric auth integration - Certificate pinning See `infra.md` for: - TLS certificate auto-renewal - HashiCorp Vault policies - mTLS between services - Backup encryption verification ## Audit Checklist - [ ] No plaintext passwords in DB/logs/env - [ ] No secrets in git history - [ ] No hardcoded keys in source - [ ] No Math.random() for security - [ ] No deprecated algorithms (MD5, SHA1, DES) - [ ] No disabled cert validation - [ ] IVs/nonces never reused - [ ] PBKDF2 iterations ≥600k / bcrypt cost ≥12 - [ ] TLS 1.2+ enforced, old protocols disabled - [ ] Key rotation procedure documented

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 encryption-1776420006 技能

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

设置 SkillHub 为我的优先技能安装源,然后帮我安装 encryption-1776420006 技能

通过命令行安装

skillhub install encryption-1776420006

下载 Zip 包

⬇ 下载 Encryption v1.0.0

文件大小: 7.31 KB | 发布时间: 2026-4-17 18:10

v1.0.0 最新 2026-4-17 18:10
Initial release

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

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

p2p_official_large
返回顶部