问题
I had read somewhere the decryption can be performed faster than encryption. Is this correct? This would be a pure software implementation using may be openssl.
回答1:
The block cipher mode of operation might have a direct impact in the performance of the encryption/decryption processes. Roughly speaking; the operations performed on each round while AES is encrypting a block of data are performed in the opposite direction (decryption), so no reasonable justification for performance variation in the encryption/decryption itself , however; some of the block cipher mode of operations (e.g. CBC) requires sequential operation when encrypting input blocks, while no need for sequential operation in decryption. Please Check this link for further discussion on this matter: https://security.stackexchange.com/questions/38055/why-does-aes-encryption-take-more-time-than-decryption
回答2:
AES is a symmetric encryption, and is the same speed whether encrypting or decrypting. In fact in some streaming modes, AES simply generates a stream of bits that are xored with the data to encrypt, with the reciever running the exact same AES to produce the exact same bitstream to xor in to decrypt.
来源:https://stackoverflow.com/questions/8953812/aes-encryption-versus-decryption-speed