当前位置:网站首页>密码技术---分组密码的模式
密码技术---分组密码的模式
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得到。

边栏推荐
- DTM distributed transaction manager PHP collaboration client V0.1 beta release!!!
- Learning Websites commonly used by circuit designers
- Higher order operation of bits
- 20220524_数据库过程_语句留档
- 数据分析学习记录--用EXCEL完成简单的单因素方差分析
- Golang interview finishing three resumes how to write
- 静态文件显示问题
- Splunk audit 的设定
- Pytorch training CPU usage continues to grow (Bug)
- [Solved] Splunk: Cannot get username when all users are selected“
猜你喜欢

The motivation of AES Advanced Encryption Protocol

odoo13搭建医院HRP环境(详细步骤)

Set right click to select vs code to open the file

容器化技术在嵌入式领域的应用
![[chestnut sugar GIS] ArcMap - why should the tick of classic capture be removed when using custom capture?](/img/b5/e746dd115995e82c93f667c58a601c.png)
[chestnut sugar GIS] ArcMap - why should the tick of classic capture be removed when using custom capture?

Kubernetes uses the host name to allocate the pod on the specified node

STM32之ADC

悬镜安全在RSAC2022上斩获Global InfoSec Awards四项大奖
![[Yangcheng cup 2020] easyphp](/img/12/da28f738e50e625b0a66a94af3703d.png)
[Yangcheng cup 2020] easyphp

Start from the bottom structure to learn the customization and testing of FPGA --- Xilinx ROM IP
随机推荐
Motivation du Protocole de chiffrement avancé AES
Learning Websites commonly used by circuit designers
数据分析学习记录--用EXCEL完成简单的单因素方差分析
Data analysis learning records -- complete a simple one-way ANOVA with Excel
P7072 [csp-j2020] live broadcast Award
静态文件显示问题
odoo13搭建医院HRP环境(详细步骤)
The kth largest element in the [leetcode] array [215]
从底层结构开始学习FPGA----Xilinx ROM IP的定制与测试
AES高級加密協議的動機闡述
Lambda expression: an article takes you through
數據分析學習記錄--用EXCEL完成簡單的單因素方差分析
[leetcode] there are duplicate elements [217]
Go语言sqlx库操作SQLite3数据库增删改查
Mask R-CNN
Generics and reflection, this is enough
20220527_数据库过程_语句留档
Innovation strength is recognized again! Tencent security MSS was the pioneer of cloud native security guard in 2022
Detailed explanation and application of merging and sorting
成功改变splunk 默认URL root path