首页 > 其他分享 >52 Things: Number 18: Draw a diagram (or describe) the ECB, CBC and CTR modes of operation

52 Things: Number 18: Draw a diagram (or describe) the ECB, CBC and CTR modes of operation

时间:2024-04-11 23:34:13浏览次数:29  
标签:CBC Draw 加密 ECB CTR 模式 mode

52 Things - Number 18: Draw a diagram (or describe) the ECB, CBC and CTR modes of operation

52件事-第18件:绘制(或描述)ECB、CBC和CTR的操作模式 This is the latest in a series of blog posts to address the list of '52 Things Every PhD Student Should Know' to do Cryptography: a set of questions compiled to give PhD candidates a sense of what they should know by the end of their first year.
这是一系列博客文章中的最新一篇,旨在解决“每个博士生都应该知道的52件事”做密码学:这是一组问题,旨在让博士生在第一年结束时了解他们应该知道什么。


Week 18's task is to draw a diagram (or describe) the ECB, CBC and CTR modes of operation. Someone on Wikipedia has already gone a good job of drawing some nice diagrams, so for the purposes of this blog post I'll stick to explaining the rationale behind them, providing links where appropriate.
第18周的任务是绘制(或描述)ECB、CBC和CTR的操作模式。维基百科上的一些人已经很好地绘制了一些漂亮的图表,所以为了这篇博客文章的目的,我将坚持解释它们背后的原理,并在适当的地方提供链接。

Modes of operation: the security provided by a block cipher applies to the encryption or decryption of a single fixed-length plaintext "block". When the encryption or decryption of messages longer than a block is required (as is typical), we use a mode of operation to link together the encryption of multiple blocks of plaintext. As we will see, the approach used to chain multiple blocks together is important.
操作模式:分组密码提供的安全性适用于单个固定长度明文“块”的加密或解密。当需要对长于一个块的消息进行加密或解密时(这是典型的),我们使用一种操作模式将多个明文块的加密链接在一起。正如我们将看到的,用于将多个块链接在一起的方法很重要。

Electronic Codebook (ECB) mode. (Encryption) (Decryption). ECB mode is the most straightforward approach---the plaintext is divided into m blocks, where each block is encrypted separately using the same key. The inherent problem with ECB mode is that repeated plaintext blocks produce the same ciphertext blocks. The best illustration of this problem is with the encryption of images, where repeated patterns in the original image reappear in the encrypted image. See, for example, the source image and the corresponding ECB encrypted image.
电子代码簿(ECB)模式。(加密)(解密)。ECB模式是最直接的方法——明文被划分为m个块,其中每个块都使用相同的密钥单独加密。ECB模式的固有问题是重复的明文块产生相同的密文块。这个问题的最好例证是图像的加密,其中原始图像中的重复图案在加密图像中重新出现。例如,请参见源图像和相应的ECB加密图像。

Cipher-block chaining (CBC) mode. (Encryption) (Decryption). CBC mode takes away the limitations of ECB mode. Each plaintext is XORed with the previous ciphertext before being encrypted, where the first plaintext block is XORed with a random initialisation vector (IV). The repeated patterns in the ciphertext blocks produced by ECB mode encryption are removed by the randomness and error propagation supplied through the XOR operation and initial IV. CBC is most commonly used mode in practice.
密码块链接(CBC)模式。(加密)(解密)。CBC模式消除了ECB模式的局限性。每个明文在被加密之前与先前的密文进行异或,其中第一明文块与随机初始化向量(IV)进行异或。ECB模式加密产生的密文块中的重复模式通过XOR运算和初始IV提供的随机性和误差传播而被去除。CBC是实践中最常用的模式。

Counter (CTR) mode. (Encryption) (Decryption). Counter mode differs from ECB and CBC in that it in some sense it acts like a stream cipher. CTR mode generates a keystream by repeatedly encrypting a successive values of a "counter", which is initially set using an initialisation vector. Incrementing the counter for successive encryptions can be a simple as incrementing the initial counter by 1. Each encryption of the counter is, like a stream cipher, XORed with the next plaintext block to produce the next ciphertext block.
计数器(CTR)模式。(加密)(解密)。计数器模式与ECB和CBC的不同之处在于,在某种意义上,它的作用就像流密码。CTR模式通过重复加密“计数器”的连续值来生成密钥流,该计数器最初是使用初始化矢量设置的。为连续加密增加计数器可以简单地将初始计数器增加1。计数器的每次加密都像流密码一样,与下一个明文块进行异或,以产生下一个密文块。

Further reading: some modes of operation guarantee the authenticity of a plaintext in addition to its confidentiality. See AEAD modes for more.
进一步阅读:一些操作模式除了保证明文的机密性外,还保证明文的真实性。有关更多信息,请参阅AEAD模式。

标签:CBC,Draw,加密,ECB,CTR,模式,mode
From: https://www.cnblogs.com/3cH0-Nu1L/p/18106094

相关文章

  • CDR2024破解序列号Crack免费下载最新CorelDraw2024安装包
    CorelDRAW是一款功能强大的矢量图形制作和排版软件,主要面向绘图设计师和印刷输出人员。它提供了一整套的绘图工具,包括圆形、矩形、多边形、方格、螺旋线等,并配合塑形工具,可以对各种基本图形作出更多的变化,如圆角矩形,弧、扇形、星形等。同时,CorelDRAW还提供了无缝的图形、版面、......
  • P4112DrawingPointsDivOne
    二分具有单调性,考虑二分答案对于\(x\)考虑怎么\(check\),可以暴力的展开\(x\)次,再缩小\(x\)次,如果得到的结果和初始状态相同,那么就合法,否则不合法//Author:xiaruizeconstintN=1e3+10;intn;piia[N];bools[N][N],cur[N][N],mp[N][N];boolcheck(intx)......
  • CorelDRAW2024全网最详细独家讲解新版本新功能
    各位粉丝大家好,为了让大家更深入的了解CorelDRAW2024新版的各项新功能,我们独家邀请到了Corel中国专家名师张苏老师,策划并录制30分钟全中文讲解栏目!干货满满,全程演示,一览CorelDRAW2024新版的各项新功能!不容错过!干货!Corel专家团讲师张苏老师详细拆解2024新版功能,带你感受2024......
  • CF1929B Sasha and the Drawing 题解
    CF1929B题意给定一个\(n\timesn\)的正方形,已知正方形最多有\(4\timesn-2\)条对角线,要求要有至少\(k\)条对角线经过至少一块黑色方格,求至少要将几条对角线涂成黑色。分析分类讨论:当\(k<=4\timesn-4\)时,就只需要在上下两侧图就行,所以答案是\([\frac{k}{2}]\)。当......
  • 常见的常见免费开源绘图工具对比 draw.io/Excalidraw/Lucidchart/yEd Graph Editor/D
    拓展阅读常见免费开源绘图工具OmniGraffle创建精确、美观图形的工具UML-架构图入门介绍starUMLUML绘制工具starUML入门介绍PlantUML是绘制uml的一个开源项目UML等常见图绘制工具绘图工具draw.io/diagrams.net免费在线图表编辑器绘图工具excalidraw介绍绘......
  • 31.2k star, 免费开源的白板绘图工具 tldraw
    31.2kstar,免费开源的白板绘图工具tldraw分类 开源分享项目名:tldraw--无限画布白板Github开源地址: https://github.com/tldraw/tldraw在线测试地址: tldraw文档地址: tldrawSDKtldraw是一款开源免费的无限画布白板,可以在线的实时协作,用户能够创建简单的图形......
  • ShadowToy-Smooth Mouse Drawing
    ShadowToy-SmoothMouseDrawing源码分析简概SmoothMouseDrawing源码分析学习。源码Image//Arecreationofhttps://lazybrush.dulnan.net///Controls://-Mousetodraw//-L:togglebetweenquadraticbeziercurvesandlinesegments//-S:toggleSDFv......
  • php采用aes算法,字符编码utf8,填充模式ECB,填充:ZeroPadding,编码:base64,实现加密
    原文:https://blog.csdn.net/yinxinyue0621/article/details/129813334一、php:三种填充模式的区别(PKCS7Padding/PKCS5Padding/ZeroPadding)(一)常见的三种填充方式:我们知道某些加密算法要求明文需要按一定长度对齐,叫做块大小(BlockSize),比如16字节,那么对于一段任意的数据,加密前需要......
  • DASCTF X CBCTF 2023
    一、justpaint1.先是压缩包密码爆破,密码为11452,然后开始代码审计,发现是一个线性的神经网络。![image-20231024143116043](E:\HDU\CTF\平常做题WP\DASCTFXCBCTF2023.assets\image-20231024143116043.png)源代码如下:importtorchimporttorch.nnasnnimportnumpyasnpi......
  • CorelDraw (CDR) VBA 实现导出贴图坐标
    创作上位机动画时,喜欢用Corel做画面设计,毕竟不管是亚控还是力控还是wincc,画图都太难受了.贴图动画要贴准的话,最好用坐标精确对齐.所以写了这段代码,用来把Corel中的坐标写入文本文件,做上位机画面时,就可以使用这些坐标进行贴图了.上代码1SubMacro1()2Di......