Implementing digital signatures with ed25519

From killvxk/cybersecurity-skills-zh · View interactive version

Implementing digital signatures with ed25519 is an AI agent skill from the GitHub repository killvxk/cybersecurity-skills-zh. Ed25519 是一种使用 Edwards 曲线 Curve25519 的高性能数字签名算法。它以 64 字节签名和 32 字节密钥提供 128 位安全性,相比 RSA 和 ECDSA 具有显著优势,包括确定性签名(无需随机 nonce)、抗侧信道攻击以及快速验证。

How to use this skill

Skill file

使用 Ed25519 实现数字签名

概述

Ed25519 是一种使用 Edwards 曲线 Curve25519 的高性能数字签名(digital signature)算法。它以 64 字节签名和 32 字节密钥提供 128 位安全性,相比 RSA 和 ECDSA 具有显著优势,包括确定性签名(无需随机 nonce)、抗侧信道攻击以及快速验证。本技能涵盖为文档签名、代码签名和 API 认证实现 Ed25519。

目标

核心概念

Ed25519 vs RSA vs ECDSA

| 属性 | Ed25519 | RSA-3072 | ECDSA P-256 |

|------|---------|----------|-------------|

| 安全性 | 128 位 | 128 位 | 128 位 |

| 公钥大小 | 32 字节 | 384 字节 | 64 字节 |

| 签名大小 | 64 字节 | 384 字节 | 64 字节 |

| 密钥生成 | ~50 us | ~100 ms | ~1 ms |

| 签名 | ~70 us | ~5 ms | ~200 us |

| 验证 | ~200 us | ~200 us | ~500 us |

| 确定性 | 是 | 否 (PSS) | 否(除非 RFC 6979)|

关键特性

安全注意事项

验证标准

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.