随笔分类 -  密码学

python用模块zlib压缩与解压字符串和文件的方法
摘要:摘自:http://www.jb51.net/article/100218.htm Python标准模块中,有多个模块用于数据的压缩与解压缩,如zipfile,gzip, bz2等等。 python中zlib模块是用来压缩或者解压缩数据,以便保存和传输。它是其他压缩工具的基础。下面来一起看看pyth 阅读全文

posted @ 2018-01-11 04:38 gwind 阅读(929) 评论(0) 推荐(0)

南邮CTF密码学,mixed_base64
摘要:# -*- coding:utf-8 -*- from base64 import * flag = open("code.txt").readline() # 读取密文 for i in range(10): pointer = 0 try: temp = b16decode(flag) except TypeError: poi... 阅读全文

posted @ 2018-01-07 20:20 gwind 阅读(699) 评论(0) 推荐(0)

python之MD5、base64\base32解密
摘要:# -*- coding:utf-8 -*- import hashlib import base64 # 求最大公约数gys # def gys(m, n): # c = 1 # while(c != 0): # c = m % n # m = n # n = c # return m # MD5加密 # m = ha... 阅读全文

posted @ 2017-12-16 00:02 gwind 阅读(996) 评论(0) 推荐(0)

CTF常用在线工具总结
摘要:在线工具 MD5加密 MD5解密(推荐) MD5解密(推荐) MD5解密 escap加解密 维吉尼亚密码 SHA 对称加密AES DES\3DES RC4\Rabbit Quoted-printable 栅栏密码 希尔密码 猪圈密码 培根密码(方式1) rot13\18解码 rot13\18编码 凯 阅读全文

posted @ 2017-12-12 22:58 gwind 阅读(3137) 评论(0) 推荐(0)

hash扩展长度攻击及hashdump使用
摘要:摘自: 1、http://www.freebuf.com/articles/web/69264.html 2、https://www.cnblogs.com/pcat/p/5478509.html 0×01 引言 为什么会想到这个呢?上周末做了“强网杯”的童鞋们应该都能知道吧,它其中有个密码学的题目 阅读全文

posted @ 2017-12-11 21:33 gwind 阅读(5217) 评论(0) 推荐(0)

RSA的共模攻击
摘要:实验吧题目:http://www.shiyanbar.com/ctf/1834 参考:http://hebin.me/2017/09/07/%e8%a5%bf%e6%99%aectf-strength/ 首先说一下RSA的工作原理,RSA涉及一下几个参数: 要加密的信息为m,加密后的信息为c; 模n 阅读全文

posted @ 2017-12-09 23:32 gwind 阅读(17157) 评论(1) 推荐(3)

普莱菲尔密码矩阵生成算法
摘要:python提供了普莱菲尔密码的加解密包:pycipher 下载地址:https://pypi.python.org/pypi/pycipher 安装:python setup.py install 基本使用: 输出: UKDNLHTGFLWUSEPWHLISNPCGCRGAUBVZAQIVTHEQ 阅读全文

posted @ 2017-12-09 17:16 gwind 阅读(1323) 评论(0) 推荐(0)

CTF密码学总结
摘要:CTF中那些脑洞大开的编码和加密 摘自:https://www.cnblogs.com/mq0036/p/6544055.html 0x00 前言 正文开始之前先闲扯几句吧,玩CTF的小伙伴也许会遇到类似这样的问题:表哥,你知道这是什么加密吗?其实CTF中脑洞密码题(非现代加密方式)一般都是各种古典 阅读全文

posted @ 2017-12-09 13:21 gwind 阅读(31128) 评论(1) 推荐(2)

盲文对照表
摘要:摘自:https://wenku.baidu.com/view/28b04fd380eb6294dd886ca7.html 学点盲文 盲文又称点字,国际通用的点字由6个凸起的圆点为基本结构组成,是专供盲人摸读、书写的文字符号。1829年,法国盲人路易•布莱尔(Louls Braille,1809-1 阅读全文

posted @ 2017-12-09 02:06 gwind 阅读(114584) 评论(0) 推荐(0)

实验吧-古典密码
摘要:# *-* coding=utf-8 *-* strings = "79 67 85 123 67 70 84 69 76 88 79 85 89 68 69 67 84 78 71 65 72 79 72 82 78 70 73 69 78 77 125 73 79 84 65" strs = '' for i in strings.split(' '): strs += chr(in... 阅读全文

posted @ 2017-12-09 01:47 gwind 阅读(334) 评论(0) 推荐(0)

希尔加密与解密
摘要:参考:http://bobao.360.cn/ctf/learning/136.html 实验吧:神秘字母 题目:http://www.shiyanbar.com/ctf/1892 这里a-z对应1-26 阅读全文

posted @ 2017-12-08 23:10 gwind 阅读(1890) 评论(0) 推荐(0)

python实现字符串之间的映射
摘要:类似于凯撒密码一样的加密 阅读全文

posted @ 2017-12-08 13:55 gwind 阅读(776) 评论(0) 推荐(0)

RSAROLL
摘要:题目:http://www.shiyanbar.com/ctf/1918 阅读全文

posted @ 2017-12-08 13:18 gwind 阅读(437) 评论(0) 推荐(0)

RSA算法求明文
摘要:#注:gmpy2 的安装请参考 http://www.cnblogs.com/gwind/p/8000570.html# -*- coding: utf-8 -*- import gmpy2 print "素数p:" p = input () print "素数q:" q = input () n = p*q print "公钥e:" e = input () print "密文c:"... 阅读全文

posted @ 2017-12-07 18:58 gwind 阅读(1256) 评论(0) 推荐(0)

导航