第十八届全国大学生信息安全竞赛暨第二届“长城杯”铁人三项赛初赛 Crypto WriteUp
第十八届全国大学生信息安全竞赛暨第二届“长城杯”铁人三项赛初赛 Crypto WriteUp
References:
A1natas 2024 CISCN x 长城杯铁人三项 初赛 WriteUp
2024 CISCN&CCB预赛 wp by Spirit Team
CISCN-CCB-BY-YR - Naby的博客
[2025 CISCN & CCB - Crypto - weyung](https://blog.weyung.cc/2024/12/17/2025 CISCN & CCB - Crypto/)
https://www.cnblogs.com/chen-xing-zzu/p/18608960
[2024-12 CISCN & 长城杯] Crypto-CSDN博客
rasnd
from Crypto.Util.number import getPrime, bytes_to_longfrom random import randintimport osFLAG = os.getenv("FLAG").encode ...
2024“国城杯”网络安全挑战赛 Crypto WriteUp
2024“国城杯”⽹络安全挑战赛 Crypto WriteUp
Curve
#sagemathfrom Crypto.Util.number import *def add(P, Q): (x1, y1) = P (x2, y2) = Q x3 = (x1*y2 + y1*x2) * inverse(1 + d*x1*x2*y1*y2, p) % p y3 = (y1*y2 - a*x1*x2) * inverse(1 - d*x1*x2*y1*y2, p) % p return (x3, y3)def mul(x, P): Q = (0, 1) while x > 0: if x % 2 == 1: Q = add(Q, P) P = add(P, P) x = x >> 1 return Qp = 64141017538026690847507665744072764126523219720088055136531450296140542176327 ...
第八届“强网杯”全国网络安全挑战赛 Crypto WriteUp
第八届“强网杯”全国网络安全挑战赛 Crypto WriteUp
第八届“强网杯”全国网络安全挑战赛 Crypto WriteUp By BOI - dawn1ight
References:
2024 强网杯 部分题解 - S1uM4i
2024强网杯 - DexterJie
2024-强网杯-wp-crypto | 糖醋小鸡块的blog
强网杯 2024 By W&M - W&M Team
第八届强网杯 Wp By Nu1L Team
EasyRSA
#encoding:utf-8from Crypto.Util.number import long_to_bytes, bytes_to_long, getPrimeimport random, gmpy2class RSAEncryptor: def __init__(self): self.g = self.a = self.b = 0 self.e = 65537 self.factorGen() self.product() def factorGen(self): while True: ...
第四届“网鼎杯”网络安全大赛青龙组 Crypto WriteUp
第四届“网鼎杯”网络安全大赛青龙组 Crypto WriteUp
CRYPTO01
from Crypto.Util.number import *from secret import flagp = getPrime(512)q = getPrime(512)n = p * qd = getPrime(299)e = inverse(d,(p-1)*(q-1))m = bytes_to_long(flag)c = pow(m,e,n)hint1 = p >> (512-70)hint2 = q >> (512-70)print(f"n = {n}")print(f"e = {e}")print(f"c = {c}")print(f"hint1 = {hint1}")print(f"hint2 = {hint2}")n = 1029860633438281816 ...
SHCTF2024 Crypto WriteUp
SHCTF2024 Crypto WriteUp
Author: dawn1ight
这里记录一下一些值得学习的题目
有些是板子题,也记录一下,现在年纪大了健忘😅
Challenges: https://shc.tf/
References:
SHCTF2024-week1-crypto&其他 - Naby - 博客园
SHCTF-2024-Week2 官方WP
SHCTF2024-week3-Crypto - Naby - 博客园
SHCTF-2024-Week3 官方WP
2024-SHCTF-week4-wp-crypto | 糖醋小鸡块的blog
SHCTF-2024-Week4 官方WP
[Week1] baby_mod
from Crypto.Util.number import *from enc import flagm = bytes_to_long(flag)p = getPrime(512)q = getPrime(512)r = getPrime(777)t = getPrime(777)tmp = getPrime(15)e = 65537 ...
PatriotCTF 2024 Crypto Writeup
PatriotCTF 2024 Crypto Writeup
Author: dawn1ight
About: PatriotCTF is a beginner-friendly capture-the-flag competition hosted by GMU’s cybersecurity club, MasonCC. All are welcome to participate, including students and security professionals. Challenges will range from beginner to expert, so there should be something for everyone. This is a jeopardy-style CTF, meaning there will be various challenges from the different categories described below.
Challenges:https://pctf.competitivecyber.club/ch ...
SCTF 2024 Crypto WriteUp
SCTF 2024 Crypto WriteUp
Author: dawn1ight
这次题目质量都可以,每一个题都能学到新东西。
References:
SCTF 2024 By W&M - W&M Team (wm-team.cn)
SCTF2024-Crypto - 先知社区
Signin
from sage.all import *from Crypto.Util.number import *from hashlib import md5class RSA(): def __init__(self, nbits): self.nbits = nbits self.p, self.q = self.getPrimes() self.n = self.p*self.q self.Gift = self.Gift() self.priv, self.pub = self.keyGen() def getPrimes(self): nbit ...
信息论与编码课程实验
信源编码与信道编码综合实验
实现Huffman编解码和Hamming码编解码
具体代码文件如下:
% a.mclear all;clc;close all;file_path = 'data.txt';[symbols, probabilities, selfinformation] = ProbabilityCalculation(file_path);disp('信源符号:');disp(symbols);disp('信源符号概率:');disp(probabilities);disp('自信息量:');disp(selfinformation);function [symbols, probabilities, selfinformation] = ProbabilityCalculation(filename) % 读取文件 fileID = fopen(filename, 'r'); content = fscanf(fileID, '%c ...