[DASCTF2024八月开学季!] Crypto
EZsquares
题目描述: 1234567891011121314151617from Crypto.Util.number import *from gmpy2 import *from secret import flagp=getPrime(512)q=getPrime(512)n0=p**2+q**2print('n0 =',n0)e=65537n=p*qm=bytes_to_long(flag)c=pow(m,e,n)print('c =',c)# n0 = 192573744538639130845868727014075967669513667763315934161849620531683536696376138303320681922782003088094539724238109116416456294472461075668568088688287209898850985024632463251984323888765249950269595045648435192047990940593817086918399212 ...
[羊城杯 2024] Crypto
TH_Curve
题目描述:
12345678910111213141516171819202122232425262728293031323334353637from Crypto.Util.number import *from secret import flagdef add_THcurve(P, Q): if P == (0, 0): return Q if Q == (0, 0): return P x1, y1 = P x2, y2 = Q x3 = (x1 - y1 ** 2 * x2 * y2) * pow(a * x1 * y1 * x2 ** 2 - y2, -1, p) % p y3 = (y1 * y2 ** 2 - a * x1 ** 2 * x2) * pow(a * x1 * y1 * x2 ** 2 - y2, -1, p) % p return x3, y3def mul_THcurve(n, P): R = (0, 0) while n > 0: ...
[DASCTF 2024 暑期挑战赛] Crypto
周六打了下DASCTF
没了
complex_enc
题目描述: 12345678910111213141516171819202122232425262728293031from Crypto.Util.number import *import randomfrom secret import flagdef GET_KEY(n): sum=2 key=[1] for i in range(n): r=random.randint(0,1) x=sum+random.randint(0,n)*r key.append(x) sum+=x return keydef enc(m,k): cipher_list = [] for i in range(len(m)): if m[i] == 1: cipher_list.append(m[i] * k[i]) cipher = sum(cipher_list) return cipherm=b ...
博客搭建
准备工作
安装Git
https://git-scm.com/
安装Node.js
https://nodejs.org/en
选择LTS版本
安装教程:
Node.js安装及环境配置超详细教程【Windows系统】_windows
安装nodejs-CSDN博客
配置Github仓库
新建仓库为username.github.io
username即为自己github上的用户名
Emmaaaaaaaaaaaaaaaaa.github.io
每次打这一连串的a真是想死,心里还得数着a的数量是不是对的
之后点击creat repository即可
配置SSH Key
首先点击电脑右键打开GitBash
配置Github账号信息
按如下方式设置用户名和GitHub绑定的邮箱
生成SHH Key
输入:
1ssh-keygen -t rsa -C "邮箱"
之后会生成一个文件夹,记事本打开该文件夹生成的id_rsa.pub文件,复制里面的内容
添加SSH Key
在GitHub上点击头像 ---> 点击Se ...
Hello World
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.
Quick Start
Create a new post
1$ hexo new "My New Post"
More info: Writing
Run server
1$ hexo server
More info: Server
Generate static files
1$ hexo generate
More info: Generating
Deploy to remote sites
1$ hexo deploy
More info: Deployment