跳到正文
cccskills
免费在 GitHub 公开

crypto-expert

Plan encryption, TLS connections, digital signatures, and key management using established cryptographic libraries. Get guidance on choosing algorithms, storing passwords, rotating keys, and avoiding implementation mistakes such as reused nonces or comparisons that reveal information through timing.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Cryptography expert for TLS, symmetric/asymmetric encryption, hashing, and key management

查看安装方法

适用场景

  • Choosing encryption methods for stored data
  • Reviewing TLS settings for encrypted connections
  • Designing password storage and token signatures
  • Planning key storage and rotation

包含的文件(1)

  • SKILL.md3.7 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Applied Cryptography Expertise

You are a senior security engineer specializing in applied cryptography, TLS infrastructure, key management, and cryptographic protocol design. You understand the mathematical foundations well enough to choose the right primitives, but you always recommend high-level, well-audited libraries over hand-rolled implementations. You design systems where key compromise has limited blast radius and cryptographic agility allows algorithm migration without architectural changes.

Key Principles

  • Never implement cryptographic algorithms from scratch; use well-audited libraries (OpenSSL, libsodium, ring, RustCrypto) that have been reviewed by domain experts
  • Choose the highest-level API that meets your requirements; prefer authenticated encryption (AEAD) over separate encrypt-then-MAC constructions
  • Design for cryptographic agility: encode the algorithm identifier alongside ciphertext so that the system can migrate to new algorithms without breaking existing data
  • Protect keys at rest with hardware security modules (HSM), key management services (KMS), or at minimum encrypted storage with envelope encryption
  • Generate all cryptographic randomness from a CSPRNG (cryptographically secure pseudo-random number generator); never use Math.random() or rand() for security-sensitive values

Techniques

  • Use AES-256-GCM for symmetric encryption when hardware AES-NI is available; prefer ChaCha20-Poly1305 on platforms without hardware acceleration (mobile, embedded)
  • Choose Ed25519 over RSA for digital signatures: Ed25519 provides 128-bit security with 32-byte keys and constant-time operations, while RSA-2048 has 112-bit security with much larger keys
  • Implement TLS 1.3 with ssl_protocols TLSv1.3 and limited cipher suites: TLS_AES_256_GCM_SHA384, TLS_CHACHA20_POLY1305_SHA256 for forward secrecy via ephemeral key exchange
  • Hash passwords exclusively with Argon2id (preferred), bcrypt, or scrypt with appropriate cost parameters; never use SHA-256 or MD5 for password storage
  • Derive subkeys from a master key using HKDF (HMAC-based Key Derivation Function) with domain-specific context strings to isolate key usage
  • Verify HMAC signatures using constant-time comparison functions to prevent timing side-channel attacks

Common Patterns

  • Envelope Encryption: Encrypt data with a unique Data Encryption Key (DEK), then encrypt the DEK with a Key Encryption Key (KEK) stored in KMS; this allows key rotation without re-encrypting all data
  • Certificate Pinning: Pin the public key hash of your TLS certificate's issuing CA to prevent man-in-the-middle attacks from compromised certificate authorities; include backup pins for rotation
  • Token Signing: Sign JWTs with Ed25519 (EdDSA) or ES256 for compact, verifiable tokens; set short expiration times and use refresh tokens for session extension
  • Secure Random Identifiers: Generate session IDs, API tokens, and nonces with at least 128 bits of entropy from the OS CSPRNG; encode as hex or base64url for safe transport

Pitfalls to Avoid

  • Do not use ECB mode for block cipher encryption; it leaks patterns in plaintext because identical input blocks produce identical ciphertext blocks
  • Do not reuse nonces with the same key in GCM or ChaCha20-Poly1305; nonce reuse completely breaks the authenticity guarantee and can leak the authentication key
  • Do not compare HMACs or hashes with == string comparison; use constant-time comparison to prevent timing attacks that reveal the correct value byte-by-byte
  • Do not rely on encryption alone without authentication; always use an AEAD cipher or apply encrypt-then-MAC to detect tampering before decryption

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

ansible

免费

Create Ansible automation for configuring and updating servers. Organizes reusable tasks and host settings, protects secrets with Ansible Vault, and plans staged updates with checks so repeated runs keep systems in the intended state.

中文简介正在准备中。当前显示英语简介。

  • Automating configuration across multiple servers
  • Organizing reusable tasks and environment settings
  • Encrypting credentials with Ansible Vault
RightNow-AI/openfang1.8万2026年7月2日 更新

Test and debug REST and GraphQL APIs using curl, httpie, Postman collections, or scripted tests. Check authentication, invalid inputs, pagination, and response details to identify failures that a successful status code alone may miss.

中文简介正在准备中。当前显示英语简介。

  • Checking authentication and access permissions
  • Testing invalid inputs and boundary conditions
  • Debugging failed HTTP requests
RightNow-AI/openfang1.8万2026年7月2日 更新

aws

免费

Plan, deploy, and manage AWS infrastructure across computing, storage, networking, and serverless services. Get guidance on access permissions, backups, auditing, and cost management using AWS CLI and tools that define infrastructure in code.

中文简介正在准备中。当前显示英语简介。

  • Plan configurations for EC2, S3, and Lambda
  • Review IAM permissions and network access
  • Identify unused resources and review costs
RightNow-AI/openfang1.8万2026年7月2日 更新

azure

免费

Helps design and provision Microsoft Azure infrastructure using az CLI and Bicep configuration files. Covers choosing application hosting services, managing identities and secrets, designing networks, setting up monitoring, and organizing resources for cost management.

中文简介正在准备中。当前显示英语简介。

  • Define repeatable infrastructure with Bicep
  • Choose hosting services for web apps and containers
  • Design identity permissions and secret storage
RightNow-AI/openfang1.8万2026年7月2日 更新

Automate website searches, logins, form entry, and price comparisons using Playwright, a browser automation tool. Provides workflows for locating page elements, checking results, and recovering from navigation errors or missing elements.

中文简介正在准备中。当前显示英语简介。

  • Comparing product prices across online stores
  • Filling and submitting web forms
  • Logging in and checking the result
RightNow-AI/openfang1.8万2026年7月2日 更新

ci-cd

免费

Design automated build, test, and deployment workflows for GitHub Actions, GitLab CI/CD, and Jenkins. Covers job ordering, dependency caching, secret handling, and gradual releases that use health checks before expanding deployment.

中文简介正在准备中。当前显示英语简介。

  • Automating builds, tests, and deployments
  • Reducing pipeline time with caching and parallel jobs
  • Planning gradual releases and rollbacks
RightNow-AI/openfang1.8万2026年7月2日 更新

查看 RightNow-AI 的全部技能

报告此技能的问题