Cryptography With Python 简明教程

Double Strength Encryption

双重加密,也称为多重加密,是指使用相同或不同的算法/模式对已加密文本进行一次或多次加密的过程。

Double strength encryption, also called as multiple encryption, is the process of encrypting an already encrypted text one or more times, either with the same or different algorithm/pattern.

双重加密的其他名称包括级联加密或级联密码。

The other names for double strength encryption include cascade encryption or cascade ciphering.

Levels of Double Strength Encryption

双重加密包括在此处解释的各种级别的加密 -

Double strength encryption includes various levels of encryption that are explained here under −

First layer of encryption

使用哈希算法和对称密钥从原始可读消息中生成密文。稍后会借助非对称密钥对称密钥进行加密。对此模式的最佳说明是将密文的哈希摘要合并到一个胶囊中。接收方将首先计算摘要,然后解密文本以验证文本在两者之间未被篡改。

The cipher text is generated from the original readable message using hash algorithms and symmetric keys. Later symmetric keys are encrypted with the help of asymmetric keys. The best illustration for this pattern is combining the hash digest of the cipher text into a capsule. The receiver will compute the digest first and later decrypt the text in order to verify that text is not tampered in between.

Second layer of encryption

第二层加密是使用相同或不同算法为密文添加一层的过程。通常,为此使用 32 位字符长的对称密码。

Second layer of encryption is the process of adding one more layer to cipher text with same or different algorithm. Usually, a 32-bit character long symmetric password is used for the same.

Third layer of encryption

在此过程中,加密胶囊通过 SSL/TLS 连接传输到通信方。

In this process, the encrypted capsule is transmitted via SSL/TLS connection to the communication partner.

下图直观地显示了双重加密过程 −

The following diagram shows double encryption process pictorially −

strength encryption

Hybrid Cryptography

混合密码术是通过包括每种密码的好处,将不同类型的多个密码组合在一起的过程。通常遵循一种通用方法来为对称密码生成随机密钥,然后通过非对称密钥密码术加密此密钥。

Hybrid cryptography is the process of using multiple ciphers of different types together by including benefits of each of the cipher. There is one common approach which is usually followed to generate a random secret key for a symmetric cipher and then encrypt this key via asymmetric key cryptography.

由于这种模式,原始消息本身使用对称密码加密,然后使用密钥。接收方收到消息后,首先使用自己的私钥使用密钥解密消息,然后使用指定的密钥解密消息。

Due to this pattern, the original message itself is encrypted using the symmetric cipher and then using secret key. The receiver after receiving the message decrypts the message using secret key first, using his/her own private key and then uses the specified key to decrypt the message.