更新ing
more >>1 | from Crypto.Util.number import * |
题目给出factor(n)的提示
首先将 n 用 yafu分解为 q 和 p
再利用脚本
1 | import libnum |
大致与第一题相同,除了n=p ** 2 * q,所以φ(n)=p * (p-1) * (q-1)
但是 n 用 yafu分解不出来,于是换了个整数分解的工具
1 | 52986 500495 626768 781489 905375 361038 023608 407335 336569 493462 339787 702897 564355 201223 475253 207424 410351 347249 720271 352215 653214 210674 806954 669996 432311 082620 169088 743292 670207 664075 792814 976051 451664 831367 516234 357272 851909 404116 258221 737141 437152 188515 251799 977404 088236 795171 799523 712619 018726 473067 535049 598512 897693 289778 461968 607877 039315 302353(347 位)= 18 171125 441481 8036412 × 160 472856 902623 327727 942815 996379 016124 487599 733397 277768 389464 225056 213151 068369 690326 545789 961412 298739 341746 484002 121845 051136 580512 162616 815087 342099 408173 590322 569154 604607 544451 411445 818479 611131 276612 690935 419245 839249 004069 384105 259284 998316 700984 690698 757807 742249 623501 269084 696626 052661 096687 370913(309 位) |
解决方案:
1 | import libnum |
1 | from Crypto.Util.number import * |
考察中国剩余定理
根据题目,思路大概是:根据n_lish和c_list,利用中国剩余定理求出m^e,再开e次方求出m。
m = pad_flag(flag),所以flag+pad=m.to_bytes(256, byteorder=’big’)
解决方案:
1 | import gmpy2 |
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
1 | $ hexo new "My New Post" |
More info: Writing
1 | $ hexo server |
More info: Server
1 | $ hexo generate |
More info: Generating
1 | $ hexo deploy |
More info: Deployment
缺失模块。
1、请确保node版本大于6.2
2、在博客根目录(注意不是yilia根目录)执行以下命令:
npm i hexo-generator-json-content --save
3、在根目录_config.yml里添加配置:
jsonContent: meta: false pages: false posts: title: true date: true path: true text: false raw: false content: false slug: false updated: false comments: false link: false permalink: false excerpt: false categories: false tags: true