密文反馈模式 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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 《深入浅出MFC》观后有感

    《深入浅出MFC》观后有感    《深入浅出MFC》观后有感本文原创,如需转载,请注明出处!     好几年前我曾经买过这本书,知道它是本好书,在匆匆走马观看一遍后,便将它束之高阁,后来有友人借之,不想几经辗转,最终不知我的这本好书花落谁家了。这段时间有空,得知一位友人也买了此书,便借来再读。再读的同时,回想这几年使用MFC的经历,顿觉获益良多,深受启发,遂成此文。          翻开此书,到内容简介后面一页

    2022年6月22日
    30
  • springboot-mybatis多数据源的两种整合方法[通俗易懂]

    springboot-mybatis多数据源的两种整合方法[通俗易懂]springboot-mybatis整合多数据源简介:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;随着并发量的不断增加,显然单个数据库已经承受不了高并发带来的压力。一个项目使用多个数据库(无论是主从复制–读写分离还是分布式数据库结构)的重要性变得越来越明显。传统项目中(个人对传统项目的理解就是所有的业务模块都在一个tomcat中完成,多个相

    2022年6月24日
    27
  • 记一次post请求参数太长导致的400报错

    记一次post请求参数太长导致的400报错背景:springboot2.1.1+vue2.6.11+iview3.3.0+axios0.18.1这个接口是接收前台图文编辑器的内容,插入数据库,当接收图文内容的字段过长时,就抛出400网上查了很多解决方案,都是从修改配置方面着手,试过如下:还有说debug源码的,参数格式错的……各种方法试过,大好青春浪费在试错上了。不说了,上答案:只修改了传参方式,结果如下:这里有一个关键,后台传参要用@RequestBody至于原因我就不说了,小伙伴可以自行搜索vueda

    2022年6月1日
    126
  • 解决java.lang.RuntimeException: com.netflix.client.ClientException: Load balancer does not have availa[通俗易懂]

    解决java.lang.RuntimeException: com.netflix.client.ClientException: Load balancer does not have availa[通俗易懂]解决java.lang.RuntimeException:com.netflix.client.ClientException:Loadbalancerdoesnothaveavailableserverforclient:xxx-xxx-xxx小弟第一次发博客,不喜勿喷,工作经验(1个月)各位大佬你们,最近在接触微服务项目,在运行的过程中遇到许多问题,第一次写博客,就发…

    2022年7月24日
    19
  • 安利一款免费、开源、实时的服务器监控工具:Netdata

    安利一款免费、开源、实时的服务器监控工具:NetdataNetdata是一个免费、开源、实时的服务器监控工具,可以可视化和监控实时数据,如CPU使用率、RAM使用率、负载、SWAP使用率、带宽使用率、磁盘使用率等。它可以帮助系统管理员了解您的系统或应用程序中正在发生的事情以及刚刚发生的事情。它可以安装在任何物理服务器、虚拟机、容器和物联网设备上。它提供了一个交互式Web界面来查看您的服务器指标,并支持用于持久存储的各种数据存储。在本教程中,我们将向您展示如何在AlmaLinux8上安装Netdata监控工具。先决条件运行Alm

    2022年5月9日
    41
  • webstorm激活码最新2021(注册激活)

    (webstorm激活码最新2021)这是一篇idea技术相关文章,由全栈君为大家提供,主要知识点是关于2021JetBrains全家桶永久激活码的内容https://javaforall.net/100143.htmlIntelliJ2021最新激活注册码,破解教程可免费永久激活,亲测有效,上面是详细链接哦~MLZPB5EL5Q-eyJsaWNlb…

    2022年3月21日
    227

发表回复

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

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