Files
ProjectAGiPrompt/11-加密算法/1-RSA加密/3-私钥签名 → 公钥验签(身份与防篡改).md
2026-01-21 16:15:49 +08:00

1.2 KiB
Raw Permalink Blame History

vector educational infographic, flat style 适配 nano banana pro结构化流程图 白色背景,横向 16:9

主题RSA 数字签名机制(私钥签名,公钥验签)

布局: 左:发送方 Bob签名者 中:不安全网络 右:接收方 Alice验证者

流程步骤:

(步骤 1Bob 生成 RSA 密钥对

  • 私钥:加锁,强调“仅自己持有”
  • 公钥:可公开

(步骤 2消息处理

  • 原始消息 M
  • 模块Hash 计算 显示: h = Hash(M)

(步骤 3私钥签名

  • 模块RSA 签名
  • 输入h + 私钥
  • 公式(大字号): S = h^d mod n
  • 得到:签名 S

(步骤 4发送 发送:

  • 消息 M
  • 签名 S

(步骤 5Alice 验证)

  • 重新计算: h1 = Hash(M)
  • 用 Bob 公钥计算: h2 = S^e mod n
  • 对比结果模块: h1 == h2 → 签名有效(绿色) 不等 → 无效 / 被篡改(红色)

右下角总结区:

  • 私钥证明“你是谁”
  • Hash 保护“内容没被改”
  • 没有私钥无法伪造签名

全部中文,公式清晰,教学优先

This is a technical teaching diagram. Text clarity is more important than artistic style. Ensure all Chinese characters are legible and not distorted.