当前位置:网站首页>密码技术---分组密码的模式
密码技术---分组密码的模式
2022-07-02 22:09:00 【yiixiou】
分组密码和流密码
密码算法可以分为分组密码和流密码。
- 分组密码:每次只能处理特定长度的一块数据的一类密码算法。一个分组的比特数叫做分组长度。DES的分组长度是64比特,DES一次只能加密64比特的明文,并生成64比特的密文。按组处理,不需要通过内部状态来记录加密的进度。
- 流密码:对数据进行连续处理的一类密码算法。一般来说以1比特、8比特或32比特为单位进行加密和解密。对一串数据流进行加密和解密,需要保持内部状态。一次性密码本属于流密码。
分组密码的模式
由于分组密码处理长度有限,所以当处理长明文数据时,需要对分组密码算法进行迭代,迭代的方法叫做分组密码的模式。主要的模式有:
ECB模式:电子密码本模式。
ECB模式将明文分组加密后的结果直接作为密文分组。明文分组和密文分组是一一对应的关系。缺点:攻击者无需破译密码就能操纵明文(操纵密文顺序,因为明文分组和密文分组关系一一对应)。

CBC模式:密码分组链接模式。
CBC模式首先将明文分组与前一个密文分组进行XOR运算,然后再进行加密。明文分组和密文分组之间有XOR和密码算法两个步骤。

CFB模式:密文反馈模式。(将密文分组反馈到密码算法中)
CFB模式会将前一个密文分组送回到密码算法的输入端,再进行XOR运算。明文分组和密文分组之间只有XOR运算。

OFB模式:输出反馈模式。(密码算法的输入是前一个密码算法的输出)
OFB模式密码算法的输出会反馈到密码算法的输入中。通过明文分组和密码算法的输出进行XOR产生密码分组。

CTR模式:计数器模式。
CTR模式是一种通过逐次累加的计数器进行加密来生成密钥流的流密码。最终的密文分组是通过将计数器加密得到的比特序列,与明文分组进行XOR得到。

边栏推荐
- [leetcode] reverse the word III in the string [557]
- Looking at Ctrip's toughness and vision from the Q1 financial report in 2022
- China Academy of information technology, Tsinghua University, Tencent security, cloud native security, industry university research and use strong alliance!
- 数据分析学习记录--用EXCEL完成简单的单因素方差分析
- MySQL reset password, forget password, reset root password, reset MySQL password
- [hardware] origin of standard resistance value
- Stop slave is stuck -- the event of the transaction is not copied completely
- Start from the bottom structure to learn the customization and testing of FPGA --- Xilinx ROM IP
- Loss function~
- To myself who is about to work
猜你喜欢

AES高级加密协议的动机阐述
![Jielizhi, production line assembly link [chapter]](/img/0d/102596ad13aafd9c6133509d9064dd.png)
Jielizhi, production line assembly link [chapter]

Learning records of data analysis (II) -- simple use of response surface method and design expert

创新实力再获认可!腾讯安全MSS获2022年度云原生安全守护先锋

Brief introduction of emotional dialogue recognition and generation

中国信通院、清华大学、腾讯安全,云原生安全产学研用强强联合!

首批 | 腾讯云完成国内首个云原生安全成熟度评估

數據分析學習記錄--用EXCEL完成簡單的單因素方差分析
![[leetcode] most elements [169]](/img/72/d3e46a820796a48b458cd2d0a18f8f.png)
[leetcode] most elements [169]

Go语言sqlx库操作SQLite3数据库增删改查
随机推荐
门牌制作 C语言
【板栗糖GIS】arcmap—为什么使用自定义捕捉的时候,经典捕捉的勾要去掉呢?
Go language sqlx library operation SQLite3 database addition, deletion, modification and query
The kth largest element in the [leetcode] array [215]
Xiaopeng P7 had an accident and the airbag did not pop up. Is this normal?
STM32之ADC
[leetcode] reverse the word III in the string [557]
海思3559万能平台搭建:在截获的YUV图像上旋转操作
Xshell configuration xforward forwarding Firefox browser
剑指 Offer II 099. 最小路径之和-双百代码
[羊城杯2020]easyphp
Hanging mirror security won four global infosec awards on rsac2022
P7072 [CSP-J2020] 直播获奖
【板栗糖GIS】arcscene—如何做出有高度的高程图
Learning Websites commonly used by circuit designers
Learning records of data analysis (II) -- simple use of response surface method and design expert
Addition, deletion, modification and query of handwritten ORM (object relationship mapping)
The first batch of Tencent cloud completed the first cloud native security maturity assessment in China
[chestnut sugar GIS] ArcMap - why should the tick of classic capture be removed when using custom capture?
Local dealers play the community group purchase mode and share millions of operations