[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EMH1CH3DMYHGEXS35YRJX9":3,"skill-same:01M7EMH1CH3DMYHGEXS35YRJX9":77},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":41,"commitSha":42,"skillDirectory":43,"forksCount":44,"repositoryHtmlUrl":45,"repositoryHomepageUrl":6,"ownerHtmlUrl":46,"ownerBlogUrl":6,"ownerDescription":47,"updatedAt":48,"install":49,"resources":62},"01M7EMH1CH3DMYHGEXS35YRJX9","implementing-jwt-signing-and-verification",null,"Implements secure JWT (RFC 7519) signing and verification using HMAC-SHA256, RSA-PSS, ES256, and EdDSA, including token expiration, claims validation, and defenses against algorithm-confusion, none-algorithm, and key-injection attacks. Use when adding or hardening JWT-based authentication\u002Fauthorization, or when auditing token verification code for common JWT vulnerabilities.","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Fimplementing-jwt-signing-and-verification\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: implementing-jwt-signing-and-verification\ndescription: >-\n  Implements secure JWT (RFC 7519) signing and verification using HMAC-SHA256,\n  RSA-PSS, ES256, and EdDSA, including token expiration, claims validation, and\n  defenses against algorithm-confusion, none-algorithm, and key-injection\n  attacks. Use when adding or hardening JWT-based authentication\u002Fauthorization,\n  or when auditing token verification code for common JWT vulnerabilities.\ndomain: cybersecurity\nsubdomain: cryptography\ntags:\n- cryptography\n- jwt\n- authentication\n- token-security\n- digital-signatures\nversion: '1.0'\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- PR.DS-01\n- PR.DS-02\n- PR.DS-10\nmitre_attack:\n- T1600\n- T1573\n- T1553\n---\n# Implementing JWT Signing and Verification\n\n## Overview\n\nJSON Web Tokens (JWT) defined in RFC 7519 are compact, URL-safe tokens used for authentication and authorization in web applications. This skill covers implementing secure JWT signing with HMAC-SHA256, RSA-PSS, and EdDSA algorithms, along with verification, token expiration, claims validation, and defense against common JWT attacks (algorithm confusion, none algorithm, key injection).\n\n\n## When to Use\n\n- When deploying or configuring implementing jwt signing and verification capabilities in your environment\n- When establishing security controls aligned to compliance requirements\n- When building or improving security architecture for this domain\n- When conducting security assessments that require this implementation\n\n## Prerequisites\n\n- Familiarity with cryptography concepts and tools\n- Access to a test or lab environment for safe execution\n- Python 3.8+ with required dependencies installed\n- Appropriate authorization for any testing activities\n\n## Objectives\n\n- Implement JWT signing with HS256, RS256, ES256, and EdDSA\n- Verify JWT signatures and validate standard claims\n- Implement token expiration, not-before, and audience validation\n- Defend against algorithm confusion and none algorithm attacks\n- Implement JWT key rotation with JWK Sets\n- Build a complete authentication middleware\n\n## Key Concepts\n\n### JWT Algorithms\n\n| Algorithm | Type | Key | Security Level |\n|-----------|------|-----|---------------|\n| HS256 | Symmetric (HMAC) | Shared secret | 128-bit |\n| RS256 | Asymmetric (RSA) | RSA key pair | 112-bit |\n| ES256 | Asymmetric (ECDSA) | P-256 key pair | 128-bit |\n| EdDSA | Asymmetric (Ed25519) | Ed25519 pair | 128-bit |\n\n### Common JWT Attacks\n\n- **Algorithm confusion**: Switching from RS256 to HS256, using public key as HMAC secret\n- **None algorithm**: Setting alg=none to bypass signature verification\n- **Key injection**: Embedding key in JWK header\n- **Weak secrets**: Brute-forcing short HMAC secrets\n- **Token replay**: Reusing valid tokens without expiration\n\n## Security Considerations\n\n- Always validate the algorithm header against an allowlist\n- Never accept alg=none in production\n- Use asymmetric algorithms (RS256, ES256) for distributed systems\n- Set short expiration times (15 min for access tokens)\n- Implement token refresh mechanism\n- Store secrets securely (not in source code)\n\n## Validation Criteria\n\n- [ ] JWT signing produces valid tokens for all algorithms\n- [ ] Signature verification rejects tampered tokens\n- [ ] Expired tokens are rejected\n- [ ] Algorithm confusion attack is prevented\n- [ ] None algorithm is rejected\n- [ ] JWK key rotation works correctly\n- [ ] Claims validation enforces all required claims\n","# Implementing JWT Signing and Verification\n\n## Overview\n\nJSON Web Tokens (JWT) defined in RFC 7519 are compact, URL-safe tokens used for authentication and authorization in web applications. This skill covers implementing secure JWT signing with HMAC-SHA256, RSA-PSS, and EdDSA algorithms, along with verification, token expiration, claims validation, and defense against common JWT attacks (algorithm confusion, none algorithm, key injection).\n\n\n## When to Use\n\n- When deploying or configuring implementing jwt signing and verification capabilities in your environment\n- When establishing security controls aligned to compliance requirements\n- When building or improving security architecture for this domain\n- When conducting security assessments that require this implementation\n\n## Prerequisites\n\n- Familiarity with cryptography concepts and tools\n- Access to a test or lab environment for safe execution\n- Python 3.8+ with required dependencies installed\n- Appropriate authorization for any testing activities\n\n## Objectives\n\n- Implement JWT signing with HS256, RS256, ES256, and EdDSA\n- Verify JWT signatures and validate standard claims\n- Implement token expiration, not-before, and audience validation\n- Defend against algorithm confusion and none algorithm attacks\n- Implement JWT key rotation with JWK Sets\n- Build a complete authentication middleware\n\n## Key Concepts\n\n### JWT Algorithms\n\n| Algorithm | Type | Key | Security Level |\n|-----------|------|-----|---------------|\n| HS256 | Symmetric (HMAC) | Shared secret | 128-bit |\n| RS256 | Asymmetric (RSA) | RSA key pair | 112-bit |\n| ES256 | Asymmetric (ECDSA) | P-256 key pair | 128-bit |\n| EdDSA | Asymmetric (Ed25519) | Ed25519 pair | 128-bit |\n\n### Common JWT Attacks\n\n- **Algorithm confusion**: Switching from RS256 to HS256, using public key as HMAC secret\n- **None algorithm**: Setting alg=none to bypass signature verification\n- **Key injection**: Embedding key in JWK header\n- **Weak secrets**: Brute-forcing short HMAC secrets\n- **Token replay**: Reusing valid tokens without expiration\n\n## Security Considerations\n\n- Always validate the algorithm header against an allowlist\n- Never accept alg=none in production\n- Use asymmetric algorithms (RS256, ES256) for distributed systems\n- Set short expiration times (15 min for access tokens)\n- Implement token refresh mechanism\n- Store secrets securely (not in source code)\n\n## Validation Criteria\n\n- [ ] JWT signing produces valid tokens for all algorithms\n- [ ] Signature verification rejects tampered tokens\n- [ ] Expired tokens are rejected\n- [ ] Algorithm confusion attack is prevented\n- [ ] None algorithm is rejected\n- [ ] JWK key rotation works correctly\n- [ ] Claims validation enforces all required claims\n",{"name":5,"tags":24,"author":30,"domain":31,"license":15,"version":32,"nist_csf":33,"subdomain":25,"description":7,"mitre_attack":37},[25,26,27,28,29],"cryptography","jwt","authentication","token-security","digital-signatures","mahipal","cybersecurity","1.0",[34,35,36],"PR.DS-01","PR.DS-02","PR.DS-10",[38,39,40],"T1600","T1573","T1553","main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","04-安全渗透\u002Fimplementing-jwt-signing-and-verification",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill implementing-jwt-signing-and-verification",{"tool":55,"command":56},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill implementing-jwt-signing-and-verification",{"tool":58,"command":59},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill implementing-jwt-signing-and-verification","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Fimplementing-jwt-signing-and-verification\u002FSKILL.md",true,[63,69,73],{"path":64,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Fapi-reference.md","REFERENCE","参考文档",1685,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Fimplementing-jwt-signing-and-verification\u002Freferences\u002Fapi-reference.md",{"path":70,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002Fstandards.md",1183,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Fimplementing-jwt-signing-and-verification\u002Freferences\u002Fstandards.md",{"path":74,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":75,"sourceHtmlUrl":76},"references\u002Fworkflows.md",1163,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Fimplementing-jwt-signing-and-verification\u002Freferences\u002Fworkflows.md",[78,87,92,99,106,113],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":82,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":86},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":88,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":82,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":86},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":82,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":86},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":82,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":86},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":82,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":86},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":82,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":86},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]