BUUCTF crypto wp
[NewStarCTF 2023 公开赛道]Rabin’s RSA12345678910111213141516171819from Crypto.Util.number import *from secret import flagp = getPrime(64)q = getPrime(64)assert p % 4 == 3assert q % 4 == 3n = p * qe = 2m = bytes_to_long(flag)c = pow(m,e,n)print('n =', n)print('c =', c)# n = 201354090531918389422241515534761536573# c = 20442989381348880630046435751193745753 Rabin加密算法——一种基于摸平方和模平方根的非对称加密 特点: 同一密文,可能有两个以上对应的明文 破解该体制等价于对大整数的分解 满足 $p\equiv 3\mod4$ 且 $q\equiv 3\mod4$ Rabin密码体制选取...
数论小芝士
欧拉定理:https://oi-wiki.org/math/number-theory/fermat/ 123456789101112131415#[LitCTF 2023]Eulerfrom Crypto.Util.number import *from secret import flagm = bytes_to_long(flag)p = getPrime(512)q = getPrime(512)n = p*qc = pow(m,n-p-q+3,n)print(f'n = {n}')print(f'c = {c}')"""n = c = """ $phi = n-p-q+1$,故 $c=m^{phi+2} mod \ n$ ,由欧拉定理可得 $c^{phi}\equiv 1 \ mod n $ 则 $c\equiv m^{2} mod \ n $ 直接开根即可 1234import gmpy2from...
制导镖
...
install crypto in sage of wsl
When I input sudo -pip install pycryptodome It output 12345678910111213141516171819202122root@LAPTOP-LDQVJGQS:/mnt/c/Users/coper# python3 -m pip install --user pipxerror: externally-managed-environment× This environment is externally managed╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install. If you wish to install a non-Debian-packaged Python package, create a virtual environment using python3 -m...
hexo usage
hexo s #启动并预览 hexo c #清除缓存文件 db.json 和已生成的静态文件 public hexo g #生成网站静态文件到默认设置的 public 文件夹(hexo generate 的缩写) hexo d #自动生成网站静态文件,并部署到设定的仓库(hexo deploy 的缩写)

.gif)
.gif)
.gif)
.gif)
.gif)
.gif)
.gif)
.gif)
.gif)
.gif)