Introduce
…
Mode of operation
AEAD
AEAD的概念: 在通常的密码学应用中,Confidentiality (保密) 用加密实现,Message authentication (消息认证) 用MAC实现。这两种算法的配合方式,引发了很多安全漏洞,过去曾经有3种方法:
- Encrypt-and-MAC
- MAC-then-Encrypt
- 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
Reference
- h
t - Block cipher mode of operationt p s : / / e n . w i k i p e d i a . o r g / w i k i / B l o c k _ c i p h e r _ m o d e _ o f _ o p e r a t i o n - h
t - 现代密码学实践指南[2015年]t p s : / / b l o g . h e l o n g . i n f o / b l o g / 2 0 1 5 / 0 6 / 0 6 / m o d e r n - c r y p t o /