随笔分类 - 一场关于crypto的CTF游戏
摘要:题目如下: from random import randint from base64 import b64encode def validate(password: str) -> bool: if len(password) != 49: return False key = ['vs'.jo
阅读全文
摘要:题目如下: 输出的结果: 题目分析: 在原题的题目描述中并没有什么有用的消息,更多的信息是通过代码审计出来的。大致意思是,先把字节flag转换为二进制形式的字符串,然后判断字符串中每个字符,如果为1,则直接添加到cipertext列表中,否则对n 取负再求余,得到结果添加到cipertext列表中。
阅读全文
摘要:impossible RSA: 没啥好说的,跟我之前文章有道题类似,虽然如此还是花费了很长时间,原因令人落泪,把q = inverse(e,p)的数学式写成了eq mod p导致数学式推导及其困难(能推但无用) 解题脚本: #coding:utf-8 from Crypto.Util.number
阅读全文
摘要:babyAES: 题目如下: from Crypto.Cipher import AES import os iv = os.urandom(16) key = os.urandom(16) my_aes = AES.new(key, AES.MODE_CBC, iv) flag = open('f
阅读全文