summaryrefslogtreecommitdiffstats
path: root/crypto/drbg.c
diff options
context:
space:
mode:
authorJason A. Donenfeld2015-12-06 02:51:38 +0100
committerHerbert Xu2015-12-09 13:16:04 +0100
commit161151d79ff4f7ed35d4ebb0eb7727a517c34ef2 (patch)
tree8987b80f9b613c8a30280f73873dad1239247a83 /crypto/drbg.c
parentcrypto: rsa - RSA padding algorithm (diff)
downloadkernel-qcow2-linux-161151d79ff4f7ed35d4ebb0eb7727a517c34ef2.tar.gz
kernel-qcow2-linux-161151d79ff4f7ed35d4ebb0eb7727a517c34ef2.tar.xz
kernel-qcow2-linux-161151d79ff4f7ed35d4ebb0eb7727a517c34ef2.zip
crypto: chacha20poly1305 - Skip encryption/decryption for 0-len
If the length of the plaintext is zero, there's no need to waste cycles on encryption and decryption. Using the chacha20poly1305 construction for zero-length plaintexts is a common way of using a shared encryption key for AAD authentication. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/drbg.c')
0 files changed, 0 insertions, 0 deletions