AES
来源:互联网 发布:java string int 编辑:程序博客网 时间:2024/05/18 09:17
Encrypt / Decrypt Demos
Encryption:
openssl aes-256-cbc -in attack-plan.txt -out message.enc oropenssl aes-256-cbc -in attack-plan.txt -a
or
┌─[✗]─[lab@core]─[/tmp]└──╼ aescrypt -husage: aescrypt {-e|-d} [ { -p <password> | -k <keyfile> } ] { [-o <output filename>] <file> | <file> [<file> ...] }┌─[lab@core]─[/tmp]└──╼ aescrypt -e -p password demo.py ┌─[lab@core]─[/tmp]└──╼ file demo.py.aes demo.py.aes: data
Decryption:
openssl aes-256-cbc -d -in message.enc -out plain-text.txt
or
┌─[lab@core]─[/tmp]└──╼ aescrypt -d -p password demo.py.aes
Encryption process
Plaintext: The data to be encrypted.
IV: A block of bits that is used to randomize the encryption and hence to produce distinct ciphertexts even if the same plaintext is encrypted multiple times.
Key: Used by symmetric encryption algorithms like AES, Blowfish, DES, Triple DES, etc.
Ciphertext: The data encrypted.
An important point here is that CBC works on a fixed-length group of bits called a block. In this blog, we will use blocks of 16 bytes each.
Since I hate mathematical formulas, below are mine:
Ciphertext-0 = Encrypt(Plaintext XOR IV)—Just for the first block.....Ciphertext-N= Encrypt(Plaintext XOR Ciphertext-N-1)—For second and remaining blocks.
Note: As you can see, the ciphertext of the previous block is used to generate the next one.
Decryption Process
Plaintext-0 = Decrypt(Ciphertext) XOR IV—Just for the first block.Plaintext-N= Decrypt(Ciphertext) XOR Ciphertext-N-1—For second and remaining blocks.
References
https://en.wikipedia.org/wiki/Advanced_Encryption_Standard
https://www.aescrypt.com/download/
http://askubuntu.com/questions/60712/how-do-i-quickly-encrypt-a-file-with-aes
http://resources.infosecinstitute.com/cbc-byte-flipping-attack-101-approach/
- AES
- AES
- AES
- AES
- aes
- aes
- AES
- AES
- AES
- AES
- AES AES-CBC-128
- AES加密
- AES算法
- AES加密
- AES-原理
- aes算法
- AES加密
- AES加密
- [Django模板系统]Django的模板渲染(render)机制
- Sublime Text 3 运行Python控制台不能输出中文的解决方法
- FZU - 2082 过路费(树剖)
- 简单使用JMF调用摄像头
- Shader学习历程(三)——shaderlab中边缘光的不同实现
- AES
- 用BBED理解和修改Oracle数据块
- 1040_有几个PAT
- Android学习基本索引(二)——记录,没事自己看
- 堆排序一
- java 对象 (树) 的转换 (目录) JSON 节点。
- LightOJ - 1348 Aladdin and the Return Journey(树剖)
- js基础
- LeetCode OJ 05 Longest Palindromic Substring