摘要: 简单的有限域上的多项式求根 题目代码 from Crypto.Util.number import * flag = b'NSSCTF{******}' m = bytes_to_long(flag) a = getPrime(512) b = getPrime(512) c = getPrime( 阅读全文
posted @ 2023-10-15 17:40 N0zoM1z0 阅读(38) 评论(0) 推荐(0) 编辑
摘要: 题目给的Java代码: public class Main { int kmatrix[][]; int tmatrix[]; int rmatrix[]; public void div(String temp, int size) { while (temp.length() > size) { 阅读全文
posted @ 2023-10-15 15:15 N0zoM1z0 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 考察了威尔逊定理 题目代码: import sympy import random def myGetPrime(): A= getPrime(513) print(A) B=A-random.randint(1e3,1e5) print(B) return sympy.nextPrime((B!) 阅读全文
posted @ 2023-10-15 14:30 N0zoM1z0 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 题目给的是标准的RSA加密格式 #!/usr/bin/env python3 import gmpy2 from Crypto.Util.number import getPrime from Crypto.PublicKey import RSA from Crypto.Cipher import 阅读全文
posted @ 2023-10-15 13:49 N0zoM1z0 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 题目代码: from gmpy2 import lcm , powmod , invert , gcd , mpz from Crypto.Util.number import getPrime from sympy import nextprime from random import randi 阅读全文
posted @ 2023-10-15 11:10 N0zoM1z0 阅读(36) 评论(0) 推荐(0) 编辑
摘要: 题目代码: import sympy import random from gmpy2 import gcd, invert from Crypto.Util.number import getPrime, isPrime, getRandomNBitInteger, bytes_to_long, 阅读全文
posted @ 2023-10-15 10:26 N0zoM1z0 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 题目代码 #!/usr/bin/env python # -*- coding: utf-8 -*- from Crypto.Util.number import * import random n = 2 ** 512 m = random.randint(2, n-1) | 1 c = pow( 阅读全文
posted @ 2023-10-15 10:12 N0zoM1z0 阅读(33) 评论(0) 推荐(0) 编辑