cbc 密码_密码学中的密码块链接(CBC)

cbc 密码

This is a Cipher block chaining (CBC) is a cryptography mode of operation for a block cipher (one in which a sequence of bits are encrypted as a single unit or a block with a ciphertext or encrypted key applied to the entire block of the cryptography). Cipher block chaining uses what is known as an initialization vector (IV) of a certain length of a character. There are one of its key characteristics is that it uses chaining the working mechanism that causes the decryption of a block of ciphertext to depend on all the preceding ciphertext blocks. As a result, the entire validity of all preceding blocks is contained in the cryptography immediately previous ciphertext block. A single-bit error of the cryptography in a ciphertext block affects the decryption of all subsequent blocks. Rearrangement of the order of the ciphertext blocks causes with this decryption to become corrupted. Basically, in cipher block chaining, each plaintext block is XORed (see XOR) with the immediately previous ciphertext block and then encrypted of the cryptography.

这是密码块链接(CBC),它是一种用于块密码的加密操作模式(其中一种位序列被加密为单个单元,或者是一个块,其中密文或加密密钥应用于加密的整个块) )。 密码块链接使用某个字符长度的所谓的初始化向量(IV)。 它的主要特征之一是它使用链接工作机制,该机制导致密文块的解密依赖于所有前面的密文块。 结果,所有先前块的全部有效性都包含在密码术紧接前的密文块中。 密文块中密码学的一位错误会影响所有后续块的解密。 密文块顺序的重新排列导致该解密被破坏。 基本上,在密码块链接中,每个明文块都与前一个密文块进行异或(请参阅XOR),然后加密密码。

They are the identical ciphertext blocks can only give the result if the same plaintext or original text block is encrypted using both the same encrypted key and the initialization vector(IV), and if the ciphertext block order is not changed or rearranged. It has the advantage over the Electronic Code Book mode in that the XOR'ing process hides plaintext patterns in this way.

它们是相同的密文块,仅当使用相同的加密密钥和初始化向量(IV)对相同的明文或原始文本块进行加密,并且密文块的顺序未更改或重新排列时,才能给出结果。 与电子密码书模式相比,它的优势在于,异或处理以这种方式隐藏明文模式。

The initialization vector(IV) should be different for any two messages encrypted with the same cryptography key. Though the initialization vector need not be secret or placed, some applications may find this desirable and different.

对于使用相同加密密钥加密的任何两个消息,初始化向量(IV)应该不同。 尽管初始化向量不必是秘密的或不需放置的,但某些应用程序可能会发现这是理想的和不同的。

Cipher block chaining or CBC is an advanced or better made on ECB since ECB compromises some security or privacy requirements. In the CBC, the previous cipher block is given as input to the next encryption algorithm after XOR with an original plaintext block of the cryptography. In a nutshell here, a cipher block is produced by encrypting an XOR output of previous cipher block and present plaintext or original text block.

密码块链接或CBC是ECB的高级或更高级版本,因为ECB损害了某些安全性或隐私要求。 在CBC中,将先前的密码块与加密的原始明文块进行XOR后,作为下一个加密算法的输入。 简而言之,通过对先前密码块和当前明文或原始文本块的XOR输出进行加密来生成密码块。

The process is illustrated here,

此处说明了该过程,

CBC


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

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

CBC的优势 (Advantages of CBC)

  • This is a CBC that works well for input greater than b bits.

    这是一个CBC,适用于大于b位的输入。

  • CBC is the best authentication mechanism for this.

    为此,CBC是最好的身份验证机制。

  • Better resistive nature towards cryptanalysis than ECB in the process.

    在此过程中,与ECB相比,对密码分析的抵抗性更好。

CBC的缺点 (Disadvantages of CBC)

  • This is the parallel encryption is not possible since every encryption requires the previous cipher of the cryptography.

    这是并行加密是不可能的,因为每种加密都需要加密的先前密码。

(Example)

We can let's look at applying CBC. Let's start with a message of "bred", and a key of "bert", and use and IV of 1 as which gives: "1AC9C54C951E180E0000000000000000".

我们可以看看应用CBC。 让我们以“孕育”的消息,并且“伯特”的键,使用和IV的1作为赋予开始:“1AC9C54C951E180E0000000000000000”。

Next, we'll change to an IV of 2: which gives, "D27FA68C6AC794200000000000000000"

接下来,我们将IV更改为2: 即为“ D27FA68C6AC794200000000000000000”

Then, Next, we will apply it to 3DES, which uses a 112-bit key, and an IV value which is 8 bytes. Let's take an example with a message of:

然后,接下来,我们将其应用于3DES,它使用一个112位密钥和一个8字节的IV值。 让我们以带有以下消息的示例为例:

    The message is "The quick brown dog jumped over the lazy fox".
    and a key of:   1234567890123456ABCDEFGH
    If we use an IV of "12345678" we get the point:
    E6B6345F1015380284481BBCFFB9052A227FC14F73072E8D5
    007AC01DFEDCC2BCBCE1EB14A95ED60BA1A44700F4E18AE
    but if we use this IV of "23456789" we can get the way
    5BF29657E6064EB99E52ACC8E3A6808A761A86A7EE85C25C
    327022C30D939D3A8A41A9CD42689AA4481FF20155816A8C
    So, at least, it will change of different IV 
    values for the cryptography.

安全挑战 (Security Challenge)

The main feature of this scheme of encryption is that identical blocks of the clear text belong to one message, are ciphered into various blocks of ciphertext.

这种加密方案的主要特征是,明文的相同块属于一条消息,被加密为各种密文块。

Here are the main characteristics of this scheme are,

该方案的主要特点如下:

  • If one bit of the transferred message will be corrupted or destroyed, it will damage the one more particular block. Other blocks would be safe from this damage.

    如果传输的消息的某一位将被破坏或破坏,它将损坏另一块特定的信息块。 其他块将免受这种损坏。

  • Case of loss or an insert at least one bit into ciphertext, there will be a shift of bits and borders of blocks that will lead to wrong decryption of all subsequent blocks of ciphertext of the cryptography.

    丢失或在密文中插入至少一位的情况下,将发生块的位和边界偏移,这将导致对密码术的所有后续密文块进行错误的解密。

  • The factor can add blocks by the end of the ciphered message, supplementing with that a clear-text or original text.

    该因子可以在加密消息的末尾添加块,并以明文或原始文本为补充。

翻译自: https://www.includehelp.com/cryptography/cipher-block-chaining-cbc.aspx

cbc 密码

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值