模反元素 RSA Euler's totient function
https://baike.baidu.com/item/模反元素/20417595
如果两个正整数a和n互质,那么一定可以找到整数b,使得 ab-1 被n整除,或者说ab被n除的余数是1。这时,b就叫做a的“模反元素”
中文名 模反元素 外文名modulo multiplicative inverse 同义词 模逆元素


The RSA algorithm involves four steps: key generation, key distribution, encryption and decryption.


Euler's totient function - Wikipedia https://en.wikipedia.org/wiki/Euler%27s_totient_function
The first thousand values of φ(n). The points on the top line represent φ(p) when p is a prime number, which is p − 1.[1]
In number theory, Euler's totient function counts the positive integers up to a given integer n that are relatively prime to n. It is written using the Greek letter phi as φ(n) or ϕ(n), and may also be called Euler's phi function. It can be defined more formally as the number of integers k in the range 1 ≤ k ≤ n for which the greatest common divisor gcd(n, k) is equal to 1.[2][3] The integers k of this form are sometimes referred to as totatives of n.
For example, the totatives of n = 9 are the six numbers 1, 2, 4, 5, 7 and 8. They are all relatively prime to 9, but the other three numbers in this range, 3, 6, and 9 are not, because gcd(9, 3) = gcd(9, 6) = 3 and gcd(9, 9) = 9. Therefore, φ(9) = 6. As another example, φ(1) = 1 since for n = 1 the only integer in the range from 1 to n is 1 itself, and gcd(1, 1) = 1.
Euler's totient function is a multiplicative function, meaning that if two numbers m and n are relatively prime, then φ(mn) = φ(m)φ(n).[4][5] This function gives the order of the multiplicative group of integers modulo n (the group of units of the ring ℤ/nℤ).[6] It also plays a key role in the definition of the RSA encryption system.
1>
phi函数
phi(N)为小于正整数N的与N互质的正整数的个数
phi(10)=4
2>
欧拉定理
m(a^phi(n),n)=1
3>
应用
m(7^phi(10),10)=1
==>m(7^4,10)=1
7^222=(7^4)^55*7^2
==>m(7^222,10)=m(1^55,10)*m(7^2,10)=9
Carmichael number - Wikipedia https://en.wikipedia.org/wiki/Carmichael_number
In number theory, a Carmichael number is a composite number which satisfies the modular arithmetic congruence relation:

561=3*11*17
m(561-1,3-1)=m(561-1,11-1)=m(561-1,17-1)
1105=5*13*17
m(1105-1,5-1)=m(1105-1,13-1)=m(1105-1,17-1)
In number theory, the Carmichael function associates to every positive integer n a positive integer , defined as the smallest positive integer m such that
-
for every integer a between 1 and n that is coprime to n.
https://baike.baidu.com/item/欧拉函数/1944850?fr=aladdin
欧拉函数
在数论,对正整数n,欧拉函数是小于n的正整数中与n互质的数的数目(φ(1)=1)。此函数以其首名研究者欧拉命名(Euler's totient function),它又称为Euler's totient function、φ函数、欧拉商数等。 例如φ(8)=4,因为1,3,5,7均和8互质。 从欧拉函数引伸出来在环论方面的事实和拉格朗日定理构成了欧拉定理的证明。
模反元素 RSA Euler's totient function的更多相关文章
- RSA算法原理与加密解密 求私钥等价求求模反元素 等价于分解出2个质数 (r*X+1)%[(p-1)(q-1)]=0
Rsapaper.pdf http://people.csail.mit.edu/rivest/Rsapaper.pdf [概述Abstract 1.将字符串按照双方约定的规则转化为小于n的正整数m, ...
- Euler's totient function
https://en.wikipedia.org/wiki/Euler's_totient_function counts the positive integers up to a given in ...
- 密码学之RSA基础
预备数论知识 互质关系 如果两个正整数,除了1以外,没有其他公因子,那么就称这两个数是互质关系 比如:4和7,13和61 欧拉函数 思考:任意给定整数n,在小于等于n的正整数中,有多少个数与n构成互质 ...
- RSA-演变过程、原理、特点(加解密及签名)及公钥私钥的生成
本篇是iOS逆向开发总结的第一篇文章,是关于iOS密码学的相关技术分析和总结,希望对大家有所帮助,如果有错误地方欢迎指正. 一.前言 密码学的历史追溯到2000年前,相传古罗马凯撒大帝为了防止敌方截获 ...
- [CTF] RSA共模攻击
from gmpy2 import * import libnum n = 0x00b0bee5e3e9e5a7e8d00b493355c618fc8c7d7d03b82e409951c182f398 ...
- URAL 1141. RSA Attack(欧拉定理+扩展欧几里得+快速幂模)
题目链接 题意 : 给你n,e,c,并且知道me ≡ c (mod n),而且n = p*q,pq都为素数. 思路 : 这道题的确与题目名字很相符,是个RSA算法,目前地球上最重要的加密算法.RSA算 ...
- RSA进阶之共模攻击
适用场景: 同一个n,对相同的m进行了加密,e取值不一样. e1和e2互质,gcd(e1,e2)=1 如果满足上述条件,那么就可以在不分解n的情况下求解m 原理 复杂的东西简单说: 如果gcd(e1, ...
- RSA的共模攻击
实验吧题目:http://www.shiyanbar.com/ctf/1834 参考:http://hebin.me/2017/09/07/%e8%a5%bf%e6%99%aectf-strength ...
- RSA共模攻击
在安恒月赛中碰到一道密码学方向的ctf题 附上源码 from flag import flag from Crypto.Util.number import * p=getPrime(1024) q= ...
随机推荐
- (转)如何根据RGB值来判断这是种什么颜色?
如何根据RGB值来判断这是种什么颜色? 下面介绍几种典型颜色的RGB值,格式为:颜色(R,G,B). 想象一下有红.绿.蓝三盏射灯打出三束光. 这三束光叠加在一起时产生白色,如果三盏灯的亮度都减半就产 ...
- [CS]C#操作word
近期在做的项目已经改了好几版,近期这一版用到了word,当然不是直接使用word,而是使用第三方的ActiveX控件:dsoframer.ocx.此控件的使用和其它控件的使用流程没有不论什么差别.接下 ...
- jQuery分页插件(jquery.page.js)的使用
效果描述: 不用分页即可显示的jQuery插件 jQuery分页插件——jQuery.page.js用法很简单,效果很棒 1.前端 首先html的head中引入相关css与js <lin ...
- (转)Spring开启Annotation<context:annotation-config> 和 <context:component-scan>诠释及区别
转自:https://www.cnblogs.com/leiOOlei/p/3713989.html <context:annotation-config> 和 <context:c ...
- 动态提交使用jQuery 完成ajax 文件下载----后端php
1.js代码 // Ajax 文件下载 //当不用传参时,可以将data去掉 jQuery.download = function(url, data, method){ // 获得url和data ...
- 查询_修改SQL Server 2005中数据库文件存放路径
1.查看当前的存放路径: select database_id,name,physical_name AS CurrentLocation,state_desc,size from sys.maste ...
- BDIP和BVLC纹理分析
Young Deok Chun 等人提出了基于 BVLC 矩和 BDIP 矩的一种纹理分析方法.BVLC 能显示粗糙和光滑特性,BDIP 能够很好的提取波谷和边缘.它们直接在彩色空间上进行处理,能有效 ...
- 制作SD卡启动自己编译的uboot.bin
README for FriendlyARM Tiny4412 -----------------------------------------------------1. Build uboot ...
- oracle_存储过程_没有参数_更新过期申请单以及写日志事务回滚
CREATE OR REPLACE PROCEDURE A_MEAS_MIINSP_PLAN_UPDATEASvs_msg VARCHAR2(4000);log_body VARCHAR2(400); ...
- UITouch 的主要方法:
1. UITouch 的主要方法: - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event; - (void)touchesM ...