implementing-digital-signatures-with-ed25519
它能做什么
这个工具可以帮你使用 Ed25519 方法创建安全的数字签名。它能帮你确认一条消息或一个文件是否真实,并且没有被篡改。
适用场景
- ✓当你需要确保重要文件的真实性时。
- ✓当你想验证某个程序或文件是否被修改过时。
- ✓当你在搭建安全系统来保护信息时。
技能链接
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-digital-signatures-with-ed25519/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我想用 Ed25519 为这份文档创建数字签名,该怎么做?”
每周 5 个新技能,1 分钟读完。
工作原理
工具会生成一对密钥(一个公钥,一个私钥)用于签名。私钥用来生成签名,公钥用来验证签名是否有效。这样就能确保消息确实来自声称的发送者,并且内容没有被更改。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Implementing Digital Signatures with Ed25519
Overview
Ed25519 is a high-performance digital signature algorithm using the Edwards curve Curve25519. It provides 128-bit security with 64-byte signatures and 32-byte keys, offering significant advantages over RSA and ECDSA including deterministic signatures (no random nonce needed), resistance to side-channel attacks, and fast verification. This skill covers implementing Ed25519 for document signing, code signing, and API authentication.
When to Use
- When deploying or configuring implementing digital signatures with ed25519 capabilities in your environment
- When establishing security controls aligned to compliance requirements
- When building or improving security architecture for this domain
- When conducting security assessments that require this implementation
Prerequisites
- Familiarity with cryptography concepts and tools
- Access to a test or lab environment for safe execution
- Python 3.8+ with required dependencies installed
- Appropriate authorization for any testing activities
Objectives
- Generate Ed25519 key pairs for signing
- Sign messages and files with Ed25519
- Verify signatures against public keys
- Implement multi-signature verification
- Build a simple code signing system
- Compare Ed25519 performance with RSA and ECDSA
Key Concepts
Ed25519 vs RSA vs ECDSA
| Property | Ed25519 | RSA-3072 | ECDSA P-256 |
|---|---|---|---|
| Security | 128-bit | 128-bit | 128-bit |
| Public key size | 32 bytes | 384 bytes | 64 bytes |
| Signature size | 64 bytes | 384 bytes | 64 bytes |
| Key generation | ~50 us | ~100 ms | ~1 ms |
| Sign | ~70 us | ~5 ms | ~200 us |
| Verify | ~200 us | ~200 us | ~500 us |
| Deterministic | Yes | No (PSS) | No (unless RFC 6979) |
Key Properties
- Deterministic: Same message + key always produces same signature
- Collision-resistant: No separate hash function needed
- Side-channel resistant: Constant-time implementation
- Small keys: 32 bytes each (public and private)
Security Considerations
- Ed25519 does not support key recovery from signatures
- Verify the full message, not a hash (Ed25519 hashes internally)
- Public keys must be validated before use (check for low-order points)
- Private keys should be stored encrypted at rest
- Ed25519 is not yet approved for all NIST use cases (Ed448 is preferred for federal)
Validation Criteria
- Key pair generation produces valid Ed25519 keys
- Signature verification succeeds for valid message
- Signature verification fails for tampered message
- Signature verification fails for wrong public key
- Deterministic: same input produces same signature
- File signing and verification works correctly
- Performance meets or exceeds RSA-3072
常见问题
什么是数字签名?
它就像数字数据的真实性印章,能保证信息是原始的,没有被篡改过。
为什么要用 Ed25519?
它是一种现代且高效的数字签名方法,通常比 RSA 等旧方法更安全、更高效。
什么是公钥和私钥?
私钥是保密的,用来生成签名。公钥可以公开分享,用来验证签名,确认其是否有效。
详情
作者的原始描述
Implements digital signatures using the Ed25519 algorithm (Curve25519), covering key-pair generation, signing, signature verification, and security tradeoffs versus RSA and ECDSA. Use when adding message or artifact signing and authentication-integrity checks to a system, or when advising on Ed25519 key properties and validation criteria.
热度
- GitHub 星标
- 35k
- 排名
- #8029
- 许可证
- Apache-2.0
- 更新时间
- 2026/8/31
评论
- …
同一仓库的更多技能
abusing-dpapi-for-credential-access
35k为你的 AI 智能体提供针对特定任务的现成指令,让它完成得更好、更快。
abusing-shadow-credentials-for-privesc
35k教你的 AI 智能体写出清晰、结构良好的文本。
achieving-cmmc-level-2-compliance
35k帮助你的智能体搭建符合 CMMC Level 2 合规要求的环境。它会落实安全要求,并管理必要的文档。
acquiring-disk-image-with-dd-and-dcfldd
35k帮助你的智能体创建硬盘的精确副本。这能确保调查过程中信息不丢失、不被篡改。