HnuCTF 2026 winter-WP AGCD
1.AGCD1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556*from* Crypto.Util.number *import* getPrime, getRandomRange*from* Crypto.Util.number *import* **from* gmpy2 *import* **import* random*from* secret *import* flag, hintdef rsa_hint(hint): p1 = getPrime(1024) q1 = getPrime(1024) n1 = p1 * q1 e1 = 0x10001 a = (p >> 256) << 256 c1 = powmod(bytes_to_long(hint), e1, n1) print('a =', hex(a)) print(...
对称密码-AES
参考: https://dexterjie.github.io/2023/07/23/%E5%9D%97%E5%AF%86%E7%A0%81/AES/?highlight=aes 一、简介高级加密标准(Advanced Encryption Standard,AES)是美国联邦政府采用的分组密码标准,由比利时密码学家Joan Daemen和Vincent Rijmen设计,又称Rijndael加密法。该标准于2001年11月26日由美国国家标准与技术研究院(NIST)发布于FIPS PUB 197文件,2002年5月26日生效,旨在替代数据加密标准(DES)。其区块长度固定为128位,密钥长度可选128、192或256位,加密过程包含AddRoundKey、SubBytes、ShiftRows和MixColumns四个步骤。 1997年NIST启动替代DES的算法征集,要求候选算法分组长度至少128位,密钥可选128/192/256位。1999年4月从15个候选算法中筛选出5个入围方案,2000年10月选定Rijndael算法,2001年正式确立为AES。该标...
RSA-coppersmith入门
1、通用模板PR 多项式环的引用 定义多项式变量为x Zmod(N) 模N的整数环 PolynomialRing() 多项式环,系数来自Zmod(N) X 根的上界 beta 因子的相对大小 epsilon 精度控制 Shift 移动位数 123456789101112131415161718192021222324252627282930313233343536373839from sage.all import *def coppersmith_general(n, known_part, unknown_bits, shift=0, beta=0.5, epsilon=0.05): """ 通用Coppersmith模板 n: 模数 known_part: 已知的部分 unknown_bits: 未知的位数 shift: 未知部分在数中的位置(左移位数) beta: 根的大小比例 epsilon: 精度参数 """ PR.<x> = ...
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 StartCreate a new post1$ hexo new "My New Post" More info: Writing Run server1$ hexo server More info: Server Generate static files1$ hexo generate More info: Generating Deploy to remote sites1$ hexo deploy More info: Deployment