summaryrefslogtreecommitdiffstats
path: root/include/crypto
diff options
context:
space:
mode:
authorStephan Mueller <smueller@chronox.de>2016-06-14 07:35:13 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2016-06-15 17:07:53 +0800
commit3cfc3b97211238ffc1a7885ebe62f899180fe043 (patch)
treeb48cea125f1b915e95ed6ab255930ce677055388 /include/crypto
parent355912852115cd8aa4ad02c25182ae615ce925fb (diff)
downloadlinux-stable-3cfc3b97211238ffc1a7885ebe62f899180fe043.tar.gz
linux-stable-3cfc3b97211238ffc1a7885ebe62f899180fe043.tar.bz2
linux-stable-3cfc3b97211238ffc1a7885ebe62f899180fe043.zip
crypto: drbg - use aligned buffers
Hardware cipher implementation may require aligned buffers. All buffers that potentially are processed with a cipher are now aligned. Signed-off-by: Stephan Mueller <smueller@chronox.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto')
-rw-r--r--include/crypto/drbg.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/crypto/drbg.h b/include/crypto/drbg.h
index b2fe15d1ceba..61580b19f9f6 100644
--- a/include/crypto/drbg.h
+++ b/include/crypto/drbg.h
@@ -108,13 +108,16 @@ struct drbg_test_data {
struct drbg_state {
struct mutex drbg_mutex; /* lock around DRBG */
unsigned char *V; /* internal state 10.1.1.1 1a) */
+ unsigned char *Vbuf;
/* hash: static value 10.1.1.1 1b) hmac / ctr: key */
unsigned char *C;
+ unsigned char *Cbuf;
/* Number of RNG requests since last reseed -- 10.1.1.1 1c) */
size_t reseed_ctr;
size_t reseed_threshold;
/* some memory the DRBG can use for its operation */
unsigned char *scratchpad;
+ unsigned char *scratchpadbuf;
void *priv_data; /* Cipher handle */
struct crypto_skcipher *ctr_handle; /* CTR mode cipher handle */