网络信息安全:数字签名
什么是数字签名
一种认证机制,使得消息的产生者可以添加一个起签名作用的码字。通过计算消息的散列值并用产生者的私钥加密散列值来生成签名。签名保证了消息的来源和完整性。
目的:使明文信息的接收者能够验证信息确实来自合法用户,以及确认发送者身份。
数字签名的基本要求
- The signature must be a bit pattern that depends on the message being signed.
- The signature must use some information unique to the sender to prevent both forgery and denial
- It must be relatively easy to produce the digital signature
- It must be relativelt easy to reconginize and verify the digital signature
- It must be computationally infeasible to forge a digital signature, either by constructing a new message for an existing digital signature or by constructing a fraudulent digital signature for a given message
- It must be practical to retain a copy of the disital signature in storage
数字签名和消息认证的区别
消息认证使消息接收方验证消息发送方发送的内容有无被修改过,对防止第三者破坏足够,但收发双方有利害冲突时就无法解决纷争,需要更严格的手段,即数字签名
基本形式
两种方法
- 对消息整体的签字
- 对消息摘要的签字
两类
- 确定性数字签名,明文和签名一对一
- 概率性数字签名,明文和签名一对多
认证协议
证实信息交换过程有效性和合法性的一种手段,包括对通信对象的认证(身份认证)和报文内容的认证(报文认证),起到对数据完整性的保护
- 信息的真实性
- 存储数据的真实性
- 接收方提供回执
- 发送方不可否认
- 时效性和公证可能性
认证方法
单向认证
双向认证
重放攻击
合法的签名消息被拷贝后重新送出
解决方法
- 使用序列号
- 使用时间戳
- 挑战/应答
ELGmal数字签名方法
若
为
签署
,
,
随机选择
∈
,
,
计算
计算
,
即
则
根据此式求
,则对于m的数字签名即为(r,s)
例题
验证:给定m,r,s容易计算
,看其是否一致,k不能重复使用
例:p=17,α=3,
=2,
=5,m=11,k=5,求签名及验证
签名:
=
,
=
所以签名是(5,13)
验证:
=