資源簡介
使用Python實現(xiàn)密碼學(xué)的AES算法
代碼片段和文件信息
#!/usr/bin/env?python
#?Copyright?(c)?2007?Brandon?Sterne
#?Licensed?under?the?MIT?license.
#?http://brandon.sternefamily.net/files/mit-license.txt
#?Python?AES?implementation
#?2014?Roland?Shoemaker
#?Python3?update/library-ification?with?dynamic?s-box?fun
#?no?license?beyond?what?is?already?implied
import?sys?hashlib?string?getpass
from?copy?import?copy?deepcopy
from?random?import?randint
#?debug
import?uuid
sboxOrig?=?[
0x63?0x7c?0x77?0x7b?0xf2?0x6b?0x6f?0xc5?0x30?0x01?0x67?0x2b?0xfe?0xd7?0xab?0x76
0xca?0x82?0xc9?0x7d?0xfa?0x59?0x47?0xf0?0xad?0xd4?0xa2?0xaf?0x9c?0xa4?0x72?0xc0
0xb7?0xfd?0x93?0x26?0x36?0x3f?0xf7?0xcc?0x34?0xa5?0xe5?0xf1?0x71?0xd8?0x31?0x15
0x04?0xc7?0x23?0xc3?0x18?0x96?0x05?0x9a
評論
共有 條評論