AEAD

AEAD的概念: 在通常的密码学应用中,Confidentiality (保密) 用加密实现,Message authentication (消息认证) 用MAC实现。这两种算法的配合方式,引发了很多安全漏洞,过去曾经有3种方法:

  1. Encrypt-and-MAC
  2. MAC-then-Encrypt
  3. Encrypt-then-MAC

后来发现,1和2都是有安全问题的,所以,2008年起, 逐渐提出了“用一个算法在内部同时实现Cipher+MAC”的idea,称为AEAD(Authenticated encryption with additional data)。 在AEAD这种概念里,Cipher+MAC 被 一个AEAD算法替换。

算法如: AES-CCM、AES-GCM、ChaCha20Poly1305 …

CBC

CFB

CTR

ECB


Original image Encrypted using ECB mode Modes other than ECB result in pseudo-randomness
The image on the right is how the image might appear encrypted with CBC, CTR or any of the other more secure modes—indistinguishable from random noise. Note that the random appearance of the image on the right does not ensure that the image has been securely encrypted; many kinds of insecure encryption have been developed which would produce output just as “random-looking”.

GCM

OFB

PCBC

  1. https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation - Block cipher mode of operation
  2. https://blog.helong.info/blog/2015/06/06/modern-crypto/ - 现代密码学实践指南[2015年]