Implement strong encryption using AES, RSA, TLS, and proper key management. Use when securing data at rest, in transit, or implementing end-to-end encryption.
Implement robust encryption strategies for protecting sensitive data at rest and in transit using industry-standard cryptographic algorithms and key management practices.
Minimal working example:
// encryption-service.js
const crypto = require("crypto");
const fs = require("fs").promises;
class EncryptionService {
constructor() {
// AES-256-GCM for symmetric encryption
this.algorithm = "aes-256-gcm";
this.keyLength = 32; // 256 bits
this.ivLength = 16; // 128 bits
this.saltLength = 64;
this.tagLength = 16;
}
/**
* Generate a cryptographically secure random key
*/
generateKey() {
return crypto.randomBytes(this.keyLength);
}
/**
* Derive a key from a password using PBKDF2
*/
async deriveKey(password, salt = null) {
// ... (see reference guides for full implementation)
Detailed implementations in the references/ directory:
| Guide | Contents | |---|---| | Node.js Encryption Library | Node.js Encryption Library | | Python Cryptography Implementation | Python Cryptography Implementation | | Database Encryption (PostgreSQL) | Database Encryption (PostgreSQL) | | TLS/SSL Configuration | TLS/SSL Configuration |
Copy a source-pinned command for your client. You run it yourself.
Destination: .claude/skills/data-encryption · pinned to the source commit
git clone https://github.com/aj-geddes/useful-ai-prompts.git
cd useful-ai-prompts
git checkout 3f5182cfd739fc113f4af5244a1cf342ad7f7911
mkdir -p ".claude/skills/data-encryption"
cp -r "skills/data-encryption" ".claude/skills/data-encryption"Review the source before running. This copies files into your project; it is not a one-click install and does not verify runtime safety.
Scanner static-checks@0.1.0 · commit 3f5182cfd739. Static checks cannot prove runtime safety – review the source and the exact diff before installing. How checks work.
References credentials, tokens or secret files that a skill should not need.
Evidence: [redacted]· fingerprint e7cf3ef4f17c3999