yafu安装使用方法以及mismatched parens解决方法
yafu用于自动整数因式分解,在RSA中,当p、q的取值差异过大或过于相近的时候,使用yafu可以快速的把n值分解出p、q值,原理是使用Fermat方法与Pollard rho方法等。
再摘录官方的一段简介(又懒得翻译了)。
YAFU (with assistance from other free software) uses the most powerful modern algorithms (and implementations of them) to factor input integers in a completely automated way. The automation within YAFU is state-of-the-art, combining factorization algorithms in an intelligent and adaptive methodology that minimizes the time to find the factors of arbitrary input integers. Most algorithm implementations are multi-threaded, allowing YAFU to fully utilize multi- or many-core processors (including SNFS, GNFS, SIQS, and ECM).YAFU is primarily a command-line driven tool. You provide the number to factor and, via screen output and log files, YAFU will provide you the factors. There is also an interactive environment similar to MATLAB or PARI/GP, where you can type commands and store results. YAFU is very customizable, through the optional use of many many command line parameters and a very capable expression interpreter.
-------------------------------------------------
1. windows安装
https://sourceforge.net/projects/yafu/
现在最新版本是1.34版本,下载后解压即可。
解压后有yafu-Win32.exe和yafu-x64.exe,推荐使用64位的。
2. linux安装
https://github.com/DarkenCode/yafu
(哈,pcat最近没时间写,先占个空)
3. yafu使用方法
使用cmd进入yafu的解压目录(为了方便的话,自己可以把该目录加入到环境变量。)
输入yafu-x64进入命令行
最常用的命令是factor(n),将n值分解
如分解23333333333333
factor(23333333333333)
很快得到:
fac: factoring 23333333333333 fac: using pretesting plan: normal fac: no tune info: using qs/gnfs crossover of 95 digits div: primes less than 10000 fmt: 1000000 iterations Total factoring time = 0.2805 seconds***factors found***P2 = 31 P12 = 752688172043ans = 1
4. 使用yafu的时候遇到mismatched parens
这是因为在命令行里不支持过长的位数,所以我们只要把n的值从文件中去读取即可。
新建一个文件pcat.txt,内容里写上n的值,如:
966808932627497190635859236054960349099463975227350564265384373280336699853387254070662881265937565163000758606154308757944030571837175048514574473061401566330836334647176655282619268592560172726526643074499534129878217409046045533656897050117438496357231575999185527675071002803951800635220029015932007465117818739948903750200830856115668691007706836952244842719419452946259275251773298338162389930518838272704908887016474007051397194588396039111216708866214614779627566959335170676055025850932631053641576566165694121420546081043285806783239296799795655191121966377590175780618944910532816988143056757054052679968538901460893571204904394975714081055455240523895653305315517745729334114549756695334171142876080477105070409544777981602152762154610738540163796164295222810243309051503090866674634440359226192530724635477051576515179864461174911975667162597286769079380660782647952944808596310476973939156187472076952935728249061137481887589103973591082872988641958270285169650803792395556363304056290077801453980822097583574309682935697260204862756923865556397686696854239564541407185709940107806536773160263764483443859425726953142964148216209968437587044617613518058779287167853349364533716458676066734216877566181514607693882375533
注意:最后面一定要换行,不然会出现eof; done processing batchfile
然后运行命令为
yafu-x64 "factor(@)" -batchfile pcat.txt
很快得到:
***factors found***PRP617 = 31093551302922880999883020803665536616272147022877428745314830867519351013248914244880101094365815998050115415308439610066700139164376274980650005150267949853671653233491784289493988946869396093730966325659249796545878080119206283512342980854475734097108975670778836003822789405498941374798016753689377992355122774401780930185598458240894362246194248623911382284169677595864501475308194644140602272961699230282993020507668939980205079239221924230430230318076991507619960330144745307022538024878444458717587446601559546292026245318907293584609320115374632235270795633933755350928537598242214216674496409625928997877221 PRP617 = 31093551302922880999883020803665536616272147022877428745314830867519351013248914244880101094365815998050115415308439610066700139164376274980650005150267949853671653233491784289493988946869396093730966325659249796545878080119206283512342980854475734097108975670778836003822789405498941374798016753689377992355122774401780930185598458240894362246194248623911382284169677595864501475308194644140602272961699230282993020507668939980205079239221924230430230318076991507619960330144745307022538024878444458717587446601559546292026245318907293584609320115374632235270795633933755350928537598242214216674496409625928797450473ans = 1
注意:运行后,pcat.txt就会消失了。
转载于:https://www.cnblogs.com/pcat/p/7508205.html
yafu安装使用方法以及mismatched parens解决方法相关推荐
- Centos 64位使用 yum 会安装两个相同软件包的解决方法
Centos 64位使用 yum 会安装两个相同软件包的解决方法 - 后山一根葱 Centos 64位使用 yum 会安装两个相同软件包的解决方法 [Linux] post by 后山一根葱 / 20 ...
- .Net Framework 4.5.1 安装时遇到严重错误 问题的解决方法
.Net Framework 4.5.1 安装时遇到严重错误 问题的解决方法 参考文章: (1).Net Framework 4.5.1 安装时遇到严重错误 问题的解决方法 (2)https://ww ...
- windows 10 安装openssh 0x800f0954 的一种解决方法
windows 10 安装openssh 0x800f0954 的一种解决方法 参考文章: (1)windows 10 安装openssh 0x800f0954 的一种解决方法 (2)https:// ...
- 虚拟机安装linux系统无法上网的解决方法
虚拟机安装linux系统无法上网的解决方法 参考文章: (1)虚拟机安装linux系统无法上网的解决方法 (2)https://www.cnblogs.com/liuqiyun/p/9585643.h ...
- 树莓派安装 MySQL 时出现错误的解决方法
树莓派安装 MySQL 时出现错误的解决方法 参考文章: (1)树莓派安装 MySQL 时出现错误的解决方法 (2)https://www.cnblogs.com/zhenqichai/p/raspb ...
- STM32 USB转串口驱动安装不成功出现黄色感叹号解决方法!
STM32 USB转串口驱动安装不成功出现黄色感叹号解决方法! 参考文章: (1)STM32 USB转串口驱动安装不成功出现黄色感叹号解决方法! (2)https://www.cnblogs.com/ ...
- kail linux安装软件提示“无法定位软件包”解决方法
kail linux安装软件提示"无法定位软件包"解决方法 参考文章: (1)kail linux安装软件提示"无法定位软件包"解决方法 (2)https:// ...
- yum安装软件包提示Error Downloading Packages解决方法
yum安装软件包提示Error Downloading Packages解决方法 参考文章: (1)yum安装软件包提示Error Downloading Packages解决方法 (2)https: ...
- dpkg安装deb缺少依赖包的解决方法
dpkg安装deb缺少依赖包的解决方法 参考文章: (1)dpkg安装deb缺少依赖包的解决方法 (2)https://www.cnblogs.com/horizonli/p/5179224.html ...
最新文章
- 利用统计滤波方法去除空中漂浮物 以及去噪
- C语言易错图形题--打印n行n列的空心正方形图案
- 浅谈三维点云中的几何语义
- 几个关于财报的基本知识
- Stanford UFLDL教程 栈式自编码算法
- Khadas VIM3 (Amlogic A311D) uboot去掉烦人的乱七八糟的打印1——BL2 BL3x
- erlang精要(3)-变量、原子与布尔代数
- 数据库---练习题(45道)
- python的人工智能和c++的有什么区别_为什么人工智能岗位有些招聘C/C 有些招聘Python到底哪门编程语言更重要(恰恰相反C++在人工智能方面的用处很大)...
- Linux内核变迁杂谈——感知市场的力量
- python 爬虫基础(一)Beautifulsoup基础介绍
- Centos7 Kubernetes(k8s) 开发服务器(单服务器)部署 redis 缓存
- 【Linux operation 07】 - SUSE 12 SP5系统挂载硬盘
- 关于2021年个人公众号总结
- linux 筛选重复数据,Linux下uniq筛选
- VR开发-罗德里格公式的研究
- 三个月死磕Python是种什么样的体验?
- Xunit.net 单元测试学习——按顺序测试
- 1【源码】数据可视化:基于 Echarts +Java SpringBoot 实现的动态实时大屏范例-互联网企业数据分析
- Android Studio Dolphin 的 gradle-7.5.1-all.zip 下载(包含其他版本)