当前位置:网站首页>RSA encryption/signature process
RSA encryption/signature process
2022-08-06 17:27:00 【Yuule】
目录
1977年提出
参考《Introduction to Elliptic Curve Cryptography》、《应用密码学:协议、算法与C源程序》
RSA体制
n:RSAOperation modulo,是两个等长、Secrecy random prime numbersp和q的乘积
e:加密指数,随机选取整数,满足 1 < e < Φ 且 gcd(e,Φ) = 1.(即e与Φ互素)
Φ:(p-1)(q-1)
d: 解密指数,整数,满足 1 < d < Φ 且 ed ≡ 1(mod Φ),此时d可知.(d与n也互素)
已证明:from the public key pair (n, e),计算出私钥 d 等价于从 n factor out p&q.This problem is called the factorization problem of integers(IFP)
注1:gcd(a,b)即ab最大公约数
注2:x ≡ 1(mod Φ),即x对Φ取余,余数为1
注3:e与Φ互素,d与n互素,p与qAfter the key pair is generated, it cannot be leaked.
RSA密钥生成
输入:安全参数 L
输出:RSA公钥对(n, e), 私钥d
过程:
1、Two prime numbers are randomly chosenp、q,长度皆为 L/2
2、计算n,Φ
3、任意选择 e
4、计算整数 d
5、返回 (n, e) 和 d
RSA加密方案
依据
≡ m (mod n)
基本RSA加密
输入:公钥对(n, e),明文 m∈[0,n-1]
输出:密文c
过程:
1、计算 c =
mod n
2、返回 c
基本RSA解密
输入:公钥对(n, e),d,密文c
输出:铭文m
过程:
1、计算 m =
=
mod n
2、返回 m
RSA签名方案
依据
≡ m (mod n),and hash calculations消息m 的摘要 h = H(m).签名计算 s =
mod n
通俗点说,RSAA signature scheme uses a private key to cryptographically sign a message,Use the public key for decryption and signature verification.
h:消息mshort fingerprints.
s:Signer's signature
基本RSA签名生成
输入:RSA公钥(n, e) 、RSA私钥d、明文m
输出:签名s
过程:
1、计算 h = H(m),其中 H is a hash function
2、计算 s =
mod n
3、返回s
基本RSA签名验证
输入:(n,e),消息m,签名s
输出:验签通过?
过程:
1、计算 h = H(m)
2、Because the signature verification is calculated s =
mod n,则
=
mod n ≡ h mod n,则 h’=
mod n
3、若 h’= h 验签通过
边栏推荐
- 电脑蓝屏的修复方法 电脑蓝屏退不出去怎么办
- Win7 Ultimate Edition forcibly delete the power-on password Win7 power-on password forgot how to remove
- 为什么企业不愿意升级ERP系统
- 历史上的今天:微信 5.0 发布;百度上市;LinkedIn 创始人诞生
- Commonly used CMD commands
- How to reset the power-on password of win7 without u disk
- bluetooth外围设备找不到驱动程序怎么办 bluetooth外围设备没有驱动程序
- IPv6 实用教程
- 王学岗——钉钉视频会议实战,从零手写音视频会议项目
- win7 printer sharing settings (detailed graphic steps)
猜你喜欢

电脑每次开机都要按f1怎么解决 电脑按f1才能启动什么原因

面试秘籍 | 接口测试常见面试题

Computational Protein Design with Deep Learning Neural Networks

ECCV 2022 | 清华&腾讯AI Lab提出REALY: 重新思考3D人脸重建的评估方法

软件测试周刊(第83期):当你感觉忙得没时间休息,就是你最需要找时间休息的时候。

百盛新纪元代理2C快充方案(5)

Windows 7 how to set the screen do not close dormant Windows 7 dormancy function

【kali-漏洞利用】(3.4)免杀Payload 生成工具(上):Veil安装、启动、Can‘t find the WINE profile问题

SourceTree安装与使用

win7缺失dll文件一键修复 msvcr120.dll丢失怎样修复win7
随机推荐
c000021a蓝屏解救方法win7 电脑开机蓝屏c000021a怎么解决
【JS 逆向百例】某网站加速乐 Cookie 混淆逆向详解
历史上的今天:微信 5.0 发布;百度上市;LinkedIn 创始人诞生
`Mathematics` Fundamental Theorem of Calculus
为什么企业不愿意升级ERP系统
百盛新纪元代理2C快充方案(5)
win7彻底重置清除所有软件 win7怎么重置系统
【kali-漏洞利用】(3.3)后渗透之Meterpreter(上):命令大全
`数学` 微积分基本定理
win7开机0x0000007b修复不了 win7开机蓝屏0x0000007b
RSA加密/签名过程
面试20场,我总结了面试问题及解答!激光+IMU融合定位方向
win7台式机如何调整屏幕亮度 win7设置屏幕亮度
win7升级win10数据会丢失吗 win7升win10怎么保留文件
设备树
win7和win10哪个占用资源少 win7和win10占用资源详解
bluetooth外围设备找不到驱动程序怎么办 bluetooth外围设备没有驱动程序
开机f1修复电脑步骤 开机需要按F1才能进入系统
百度搜索排名:三板斧,有哪些?
Windows 7 how to set the screen do not close dormant Windows 7 dormancy function