- 2024-11-13Crypto-day1
day1写的笔记只用于提供自己学习复盘和督促自己学习,资料应该基本都是风二西师傅的,在bilibili看到,在此提供师傅的一些链接风二西师傅哔哩哔哩rsa_f2x:风二西关于rsa原创题目系列-Gitee.com【CTF-加密】RSA之leak=d+p+q【CTF-加密】RSA之leak=d+p+q_哔哩哔哩_bili
- 2024-11-09RSA加密解密参考
python写的RSA加密流程,做题时参考。代号是标准的代号。fromCrypto.Util.numberimport*importgmpy2importlibnum#importuuid#print(uuid.uuid4())#产生两个大素数p=libnum.generate_prime(1024)q=libnum.generate_prime(1024)#定义模数nn=p*qe=65537#公钥#欧
- 2024-10-13rsa基本攻击手法总结大全(还在更新中)
一些关于分解n的常用手法:1.最简单的就是直接使用yafu分解2.费马分解然后我们令p=a+b,q=a-b,此时n=\(a^{2}-b^{2}\),那么\(b^2=a^2-n\),那么\(b=\sqrt{a^2-n}\),我们就让a=\(\sqrt{n}\)开始然后慢慢加1开始遍历,直到找到能够使得\(a^2-n\)能够为一个平方数即可得到我们的b,那么我
- 2024-09-27Crypto工具与算法
参考博客:https://lazzzaro.github.io/2020/05/10/crypto-crypto常用工具/https://bbs.kanxue.com/thread-266504.htmhttps://lazzzaro.github.io/2020/05/10/crypto-crypto常用算法/工具以windows为主python中importgmpy2与fromgmpy2import*的区别importgmpy2gmpy
- 2024-04-27CAUC_CTF 题解
caucctfwpez_隐写如果计算机是中国人发明的Welcome!easy_rsafromCrypto.Util.numberimport*importgmpy2importlibnumimportrandomimporthashlibn=0x52d483c27cd806550fbe0e37a61af2e7cf5e0efb723dfc81174c918a27627779b21fa3c851e9e94188eaee3d5cd6f7524
- 2023-07-12RSA刷题系列
1,共享素数1)[闽盾杯2021]decode题目:n1:15228664629164509105936278301396170708905691970126305196584505186788860519598413718493859625462561931380632032431490419378905593909771649295663481782473029836321132574188559245931660756414915507930357509270674460219615
- 2023-07-12算法(施工中)
解方程1,sympy中的solve解法1importsympy#引入解方程的专业模块sympy23p,q=sympy.symbols("pq")#申明未知数"p"和"q"45n=22307913740463468357754335486410675936913694858280706490751621413944761835651876543651318221114195124
- 2023-07-12算法(施工中)
解方程1,sympy中的solve解法1importsympy#引入解方程的专业模块sympy23p,q=sympy.symbols("pq")#申明未知数"p"和"q"45n=22307913740463468357754335486410675936913694858280706490751621413944761835651876543651318221114195124
- 2023-05-09[SWPUCTF 2021 新生赛]fakebase
查壳:双击吧:简单的逻辑,不要怕那个循环,也不要去纠结那个循环。首先看我们要找的是啥:b1嘛,也就是将flag每个字符转化成十进制后,再转成二进制,一个字符的二进制接后一个字符的二进制链接而成的字符串,再将这串字符串转为十进制。也就是b1由除法原则我们知道,要想还原b1,首先得倒着来,
- 2023-05-06Crypto|[BJDCTF2020]easyrsa
rsa_task.pyfromCrypto.Util.numberimportgetPrime,bytes_to_longfromsympyimportDerivativefromfractionsimportFractionfromsecretimportflagp=getPrime(1024)q=getPrime(1024)e=65537n=p*qz=Fraction(1,Derivative(arctan(p),p))-Fraction(1,Derivat
- 2023-05-06Crypto|[BJDCTF2020]RSA
task.pyfromCrypto.Util.numberimportgetPrime,bytes_to_longflag=open("flag","rb").read()p=getPrime(1024)q=getPrime(1024)assert(e<100000)n=p*qm=bytes_to_long(flag)c=pow(m,e,n)printc,nprintpow(294,e,n)p=getPrime(1024)
- 2023-05-04cryptohack wp day(1)
就从头开始吧第一题(ASCII)一道简单的ASCII码转换,直接用题目的提示代码解就行了ascii=[99,114,121,112,116,111,123,65,83,67,73,73,95,112,114,49,110,116,52,98,108,51,125]flag=""foriinascii:flag+=chr(i)print(flag)第二题(Hex)