密文反馈模式 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

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

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

【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...

(0)


相关推荐

发表回复

您的电子邮箱地址不会被公开。

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