L04 – Plain RSA, Factoring, and Commitment Schemes
10,409字
44–66 分钟
Summary of Lecture 3
The set
- Euler’s Phi Function:
Euler’s theorem Let and . Then .
- Fermat’s Little Theorem: If is a prime, then .
RSA:
Example
EXAMPLE: this is a toy example; all numbers are very small
RSA Security
Security: Without , it’s difficult to learn from
- At least, it should be difficult to learn from
Plain RSA and Integer Factoring (given , find ):
- “Factoring is easy”“Plain RSA is not secure”
- : computable with EEA
- “Plain RSA is secure”“Factoring is hard”
- “Factoring is hard” “Plain RSA is secure” //not proved
- It is likely that “Factoring is hard”“Plain RSA is secure”
- The best known method of computing is via factoring
How Large is the in practice?
- is recommended from present to 2030
- is recommended after 2030
Example
EXAMPLE: A sample execution of the RSA public-key encryption.
- 179769313486231590772930519078902473361797697894230657273430081157732675805500963132708477322407536021120113879871393357658789768814416622492847430639474124377767893424865485276302219601246094119453082952085005768838150682342462881473913110540827237163350510684586298239947245938479716304835356329624225795083
- 179769313486231590772930519078902473361797697894230657273430081157732675805500963132708477322407536021120113879871393357658789768814416622492847430639474124377767893424865485276302219601246094119453082952085005768838150682342462881473913110540827237163350510684586298239947245938479716304835356329624227077847
- 32317006071311007300714876688669951960444102669715484032130345427524655138867890893197201411522913463688717960921898019494119559150490921095088152386448283120630877367300996091750197750389652106796057638384067568276792218642619756161838094338476170470581645852036305042887575891541065808607552399123931212190742861198666048560131098081430518774846347259215332611759149330725252437276424147817808729273755165527379964561074264587032664709511346018327798373715290148129504141795132314929388992688247440232727539575514688633282447719228530664706520939357878528540284184156513405575872085703420500969966917951381310826301
- 32317006071311007300714876688669951960444102669715484032130345427524655138867890893197201411522913463688717960921898019494119559150490921095088152386448283120630877367300996091750197750389652106796057638384067568276792218642619756161838094338476170470581645852036305042887575891541065808607552399123931212190383322571693585378585237043272713828122751863426871297212289168409787085665422221552391774628940093485139736801331477871715085171882512773342103512436341899373968354945401344376784553485755251993821373671344677095606146354543604901758694718276224054213583162787340809095977593826461068360296205292132857953372
- 15
- 4308934142841467640095316891822660261392547022628731204284046057003287351849052119092960188203055128491829061456253069265882607886732122812678420318193104416084116982306799478900026366718620280906141018451209009103572295819015967488245079245130156062744219446938174005718343452205475441147673653216524161625384443009559144717144698272436361843749700248456916172961638555787971611422056296206985569950525345798018631573510863716228678022917668369778947134991512253249862447326053512583571273798100700265842849822845956946080819513939147320234492629103496540561811088371645441212797012510194809114706160705617714393783
- 10604921754758721445761654694144853008952777608280437615045472365621528740679915569270051503191522500036448557172487959011926112038398359402756573149541644330968641767630622070720630061130259783825355948223371330949158036812742187057045604934546811790948975878200144189048344249873200320299277234465689039409989622319232683984241843711183212001991457793528752812978134072787404790207031482099444968252108690296363773578594703102617386738297675080295774091447240197521221546035459030086538114428516078644733180655540109133778241607260273655335661777894173665137928787960365220712025120785257907244561721692764755210375
- 10526389958138962919595594093411158893099743508465902347128478139908774614311778097354795345791726768384252751637693995592403757856185437083738829836072472243389583367910268799453378039419721345566549516730187308436864460088396611726670050723242080139176080334720294195304048915003805656341816548307249886049027910488249318660062714335703057576576016988513484148308512574950252535463185824865665499749033598201370342142901944632549253564037639312442875039735826909329356840665993783695101447610485922726915969967968584661240430425982194189504400469889762574275824269475495394920107921066723277769226199475558068627049
Commitment Scheme (for SI120)
DEFINITION: A non-interactive commitment scheme consists of three algorithms as follows
- : Takes a security parameter as input, outputs the public parameters of the system;
- : Takes a message as input, outputs a commitment and an opening value ;
- : Takes the commitment , the message , and an opening value as input, and outputs
1(accept) or0(reject).
and satisfies the following properties:
- hiding: the commitment reveals nothing about .
- binding: it is hard for the committer to output a commitment and later output two pairs and such that but .
CONSTRUCTION: a commitment scheme based on RSA encryption
- : Do nothing; the is empty.
- :
- Choose as per ;
- Compute ;
- Output and
- : Outputs
1iff the following equalities are all true:- ;
- ;
Security Analysis:
- hiding: Given , it is hard to learn //this is ensured by RSA’s security
- binding: . Is it possible that but ?
- The above equalities imply that
RSA Implementation
CONSTRUCTION: , the message space is
- choose two -bit primes
- choose s.t. ,
- output
- :
- output
- output
- :
- output
- output
Questions
- Choose efficiently?
- Prime Number Generation
- Compute efficiently?
- Extended Euclidean Algorithm
- Compute / efficiently?
- Square-and-Multiply
1977, Rivest, Shamir and Adleman: A method for obtaining digital signatures and public-key cryptosystems. MIT/LCS/TM-82. (Turing Award 2002)
Addition
Binary Representation of an integer : a 0-1 sequence / binary string such that
Bit Length of Integer :
Algorithm for Addition:
- Input:
- Output:
- for to do
- set and such that
- for to do
- Complexity: bit operations
Big O notation:
© 版权声明
文章版权归作者所有,未经允许请勿转载。





数论基础差看这个真的像看天书,建议先刷完离散数学再来
这大数例子是故意劝退的吧,屏幕都快被数字占满了😂
确实,数字堆得让人想直接关屏幕
绑定性质说白了就是不能拿同一个承诺开两个不同消息,但证明写得太绕
之前写RSA卡在素数生成,等了十分钟差点以为电脑死机了
e=5也敢放例子里,真不怕被低指数攻击干穿吗
数论没学过真看天书,建议先补欧拉定理再回来看
模运算那步跳得也太狠了,中间至少省了五步推导
这大数例子是故意的吧,看得人眼花还占屏😂
绑定性质说白了就是不能拿同一个承诺开两个不同消息
之前写RSA代码卡在素数生成,等得想砸键盘
手算2^145 mod 91?我连计算器都懒得开hhh
e=5这例子纯教学用,真项目敢这么设早被干穿了
质因数分解要命了
我也被难住了
那个验证过程挺详细的
细节拉满才安心
平方乘算法那块讲得挺细的
大数分解那块还是有点懵
这块确实容易绕晕,我也是。
这例子里的数字也太大了
原来RSA绑定承诺还能这么用
数论基础差看这个确实吃力,先补补课吧
commitment scheme的params为空就是不用额外设置
e=5这种小指数实际根本不能用
模运算那步确实跳太快,需要自己推一遍
之前写RSA作业卡在素数生成,太真实了
我也遇到过,换个随机数源后稍微顺点
这文章例子数字太大,直接跳过了
绑定性质其实没那么复杂,就是不能同时用两个密钥解密
commitment scheme真就全靠RSA扛着了?
模运算跳得太快,中间省了八百步吧
绑定性质那块绕来绕去,画个图会死吗
之前写代码生成大素数,等了十分钟差点关机
平方乘算法能不能给个具体步骤啊,光说名字谁懂
e=5也敢用?这不就是送密文给人破吗
手算2^145 mod 91?我连2^10都懒得算😂
手算指数确实没必要,考试又不会考这个😂