3

AES-CBC アルゴリズムを使用して暗号化が行われる場合、暗号化は、暗号文を前の暗号文と IV で連鎖させると考えることができます。ただし、CBC モードの場合、暗号文に前方拡散特性を与えます (つまり、暗号文を変更すると、その後のすべてのブロックで平文が変更されます)。可鍛性攻撃をより困難にするために、暗号化中に双方向で暗号文を連鎖させることができます (または、bitLocker の論文と同様のものを実装します)。

双方向を使用して暗号文の連鎖を提供する pyCrypto の実装があるかどうかは誰にもわかりませんか?

これを解決するために私が考えた 1 つの方法は、元の暗号テキストを取得し、それを python を使用して逆にしてから pyCrypto にフィードすることでした。ただし、pyCrypto の全体的なポイントは C レベルの実装を利用することであるため、これは少し力ずくのように思えました (文字列を逆にすると、明らかに不幸なパフォーマンス ヒットが発生します)。

4

1 に答える 1

0

No, as far as I know there are no modes in pyCrypto that do this. This strong diffusion of the plaintext after an error in the ciphertext is called error propagation. Error propagation is nowadays not considered that important anymore; if you want to provide integrity of the plaintext then you add a MAC (say, HMAC) over the ciphertext instead, or you use an authenticated cipher (which basically provides integrity on top of confidentiality). Unfortunately I didn't see any authenticated cipher modes in pyCrypto.

于 2015-10-02T10:34:47.567 に答える