密文反馈模式 cfb_密码术中的密文反馈(CFB)

密文反馈模式cfbThisisCiphertextfeedback(CFB)whichisalsoamodeofoperationforablockcipher.Incontrasttothecipherblockchaining(CBC)mode,whichencryptsasetnumberofbitsofplaintexto…

大家好,又见面了,我是你们的朋友全栈君。

密文反馈模式 cfb

This is Ciphertext feedback (CFB) which is also a mode of operation for a block cipher. In contrast to the cipher block chaining(CBC) mode, which encrypts a set number of bits of plaintext or original text at a time, it is at times desirable or sensible to encrypt and transfer or exchange some plaintext or original text values instantly one at a time, for which ciphertext feedback is a method in cryptography. Like cipher block chaining(cbc), ciphertext feedback(cfb) also makes use of an initialization vector (IV) in the blocks. CFB uses a block cipher as a component of a different or random number generator in this. CFB mode, the previous ciphertext block is encrypted and the output is XORed (see XOR) with the current plaintext or original text block to create the current ciphertext block from this. The XOR operation conceals plaintext or original text patterns. Original text or plaintext cannot be directly worked on unless there is the retrieval of blocks from either the beginning or end of the ciphertext in the cryptography.

这是密文反馈(CFB) ,也是块密码的一种操作模式。 与一次加密一定数量的纯文本或原始文本的密码块链接(CBC)模式相反,有时希望或明智的做法是立即加密并传输或交换某些纯文本或原始文本值。时间,密文反馈是密码学中的一种方法。 像密码块链接(cbc)一样,密文反馈(cfb)也使用了块中的初始化向量(IV)。 CFB在此使用分组密码作为不同或随机数生成器的组件。 在CFB模式下,先前的密文块被加密,并且输出与当前的纯文本或原始文本块进行异或(请参阅XOR)以由此创建当前的密文块。 XOR操作隐藏纯文本或原始文本模式。 除非可以从密码学中密文的开头或结尾检索块,否则无法直接处理原始文本或纯文本。

This is entropy that results can be implemented or work as a stream cipher. CFB is primarily a mode to derive some characteristics of a stream cipher from a block cipher in the cryptography in cryptoanalysis. In common words with CBC mode, changing the IV to the same plaintext or original text block results in different outputs. Though the IV need not be secret, some applications would see this desirable or wise into this. This is Chaining dependencies are similar to CBC in the cryptography, in that reordering ciphertext block sequences alters decryption output, as decryption of one block depends on the decryption of the preceding blocks in the cryptography.

这是熵,可以实现结果或将其作为流密码使用。 CFB主要是一种从密码分析中的密码学中的分组密码中得出流密码某些特性的模式。 通常,在CBC模式下,将IV更改为相同的纯文本或原始文本块会导致不同的输出。 尽管IV不必是秘密的,但某些应用程序会将此视为明智或明智的选择。 这是因为Chaining依赖性类似于密码学中的CBC,因为对一个密文块序列进行重新排序会更改解密输出,因为一个块的解密取决于加密术中前面几个块的解密。

In this mode the cipher is given as feedback from the block to the next block of encryption with some new specifications of this feedback: first, an initial vector as an IV is used for first encryption and output bits from character are divided as set of s and b-s bits the left-hand side s bits are selected and are applied an XOR operation with plaintext or original text bits. The result is given as input to a shift register in the cryptography and the process continues. The encryption and decryption process for the same is shown below, both of them use encryption algorithm in this.

在这种模式下,将密码作为从加密块到下一个加密块的反馈,并给出一些新的规范:首先,将初始向量作为IV用于第一次加密,并将字符的输出位划分为s集bs位和bs位选择左侧的s位,并将其与纯文本或原始文本位进行XOR操作。 结果被提供作为密码术中移位寄存器的输入,并且过程继续进行。 相同的加密和解密过程如下所示,两者都使用加密算法。

操作方式 (Operation)

The operation of CFB mode is depicted in the following illustration or steps. For example, like, in the present system, a message block has a size ‘s’ bits of character where (1 < s < n). The CFB mode requires an initialization vector (IV) as the initial random n-bit input block of the character. The IV need not be secret in this.

下图或步骤描述了CFB模式的操作。 例如,像在本系统中一样,消息块的字符大小为’s’位,其中(1 <s <n)。 CFB模式需要初始化向量(IV)作为字符的初始随机n位输入块。 IV不必为此保密。

Steps of operation are,

操作步骤如下:

  • Firstly, Load the IV in the top register.

    首先,将IV加载到顶部寄存器中。

  • Then, Encrypt the data value in the top register with the underlying block cipher with key K to the block.

    然后,使用底层密钥和密钥K对该块加密顶部寄存器中的数据值。

  • Then, take only ‘s’ number of most significant bits as left bits of the output of the encryption process and XOR them with ‘s’ bit plaintext or original text message block to generate ciphertext block in cryptography.

    然后,仅将“ s”个最高有效位作为加密过程输出的左位,然后将它们与“ s”位纯文本或原始文本消息块进行异或,以生成密码术中的密文块。

  • This, Feed ciphertext block into the top register by shifting already present data to the left and continue the operation till all plaintext or original text blocks are processed in this mode.

    这样,通过将已经存在的数据向左移动,将密文块送入顶部寄存器,并继续操作,直到在此模式下处理所有纯文本或原始文本块为止。

  • Essentially, the previous ciphertext block is encrypted with the key, and then the result is XORed to the current plaintext block or original text.

    本质上,前一个密文块用密钥加密,然后将结果与当前的明文块或原始文本进行异或。

  • Similar steps are followed for decryption cryptography. Pre-decided IV is initially loaded at the start of decryption in the cryptography.

    解密密码遵循类似的步骤。 预定的IV最初是在加密中解密开始时加载的。

Ciphertext Feedback (CFB) in Cryptography

Image source: https://www.geeksforgeeks.org/block-cipher-modes-of-operation/

图片来源:https://www.geeksforgeeks.org/block-cipher-modes-of-operation/

CFB的优势 (Advantages of CFB)

Since, in this, there is some data loss due to the use of shift register of the block, thus it is difficult for applying cryptanalysis in the cryptography.

由于在此由于使用块的移位寄存器而导致一些数据丢失,因此难以在密码术中应用密码分析。

翻译自: https://www.includehelp.com/cryptography/ciphertext-feedback-cfb.aspx

密文反馈模式 cfb

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/127165.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • autodock分子对接结果分析_分子对接公司

    autodock分子对接结果分析_分子对接公司分子对接#一、题目要求自己寻找一个受体+药物分子复合物体系(不同配体结合3-4个),然后拿复合物结构作为起始,做对接实验。软件自选,Dock,AutoDock…二、操作过程记录及结果1、软件下载与安装AutoDock下载安装进入AutoDock官网下载安装http://autodock.scripps.edu/downloads/autodock-r…

    2022年9月11日
    0
  • 图解-使用【变异系数】赋予权重,并比较效果

    图解-使用【变异系数】赋予权重,并比较效果变异系数CoefficientofVariation用于比较多组数据的离散程度比较两组量纲不同的数据的离散程度,不能用标准差,可考虑变异系数不适用场景:数据下限小于0(导致平均值等于0)变异系数权重法使用变异系数计得的权重值会随着数据的变化而变化,可认为是一种无监督学习

    2022年5月27日
    52
  • windows socket编程c语言_网络编程socket

    windows socket编程c语言_网络编程socket文章目录简单介绍Socket1 WindowsSockets 简介2 套接字的两种主要形式3 在 VC 下开发套接字程序3. 1 在 VC 下开发套接字程序的基本步骤3. 2 回调函数的使用3. 3 利用多线程技术来开发网络通信3. 4 使用多线程进行套接字编程时应注意同步问题代码实现客户端服务端简单介绍Socket1 WindowsSockets 简介Windows sockets(简称 …

    2022年8月18日
    9
  • Golang语言快速上手到综合实战笔记(Go语言、Beego框架、高并发聊天室、爬虫)

    Golang语言快速上手到综合实战笔记(Go语言、Beego框架、高并发聊天室、爬虫)

    2022年2月19日
    42
  • C语言内存模型详细介绍_堆栈介绍

    C语言内存模型详细介绍_堆栈介绍(命令行参数区其实就是在通过dos或shell脚本调用时传递的参数,比如:a.exe123123)上图是C语言内存模型,其实虽然说叫C语言内存模型,其实并不是叫C语言内存模型,而是C语言根据CPU处理器搭建出来的一个模型!在开始介绍这些之前,读者需要了解一些体系结构:冯诺依曼体系:把程序本身当作数据来对待,程序指令和该程序处理的数据用同样的方式储存。冯·诺依曼体系结构的要点是:计算机的数制和…

    2022年6月7日
    111
  • springboot整合了哪些框架_框架java

    springboot整合了哪些框架_框架java目录1.SpringBoot框架说明1.1添加pom文件依赖1.2主启动类2.SSM框架整合2.2添加依赖2.3编辑UserController2.4编辑UserService接口及实现类2.5编辑UserMapper接口及Mapper映射文件2.7Mapper注入报错解决方案​​​​​​​1.SpringBoot框架说明理解:传统框架在使用时,特别的繁琐Spring/SpringMVC/Mybatis在使用时需要……

    2022年8月20日
    6

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号