diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-24 12:33:32 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-24 12:33:32 -0700 |
commit | c8c48001eb241f335739ef06492ae99b4cd891d6 (patch) | |
tree | 14b6f6d514b25ffb16981a2867c6902edf41b685 /crypto/tgr192.c | |
parent | 6de0bdb30d75edcf5f1e3f80da5b65670b9831f1 (diff) | |
parent | 8ff8c72485c0d0bbb91377d33bbf016ae0744cd8 (diff) | |
download | linux-crypto-c8c48001eb241f335739ef06492ae99b4cd891d6.tar.gz linux-crypto-c8c48001eb241f335739ef06492ae99b4cd891d6.zip |
Merge tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random
Pull /dev/random updates from Ted Ts'o:
"This adds a memzero_explicit() call which is guaranteed not to be
optimized away by GCC. This is important when we are wiping
cryptographically sensitive material"
* tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random:
crypto: memzero_explicit - make sure to clear out sensitive data
random: add and use memzero_explicit() for clearing data
Diffstat (limited to '')
-rw-r--r-- | crypto/tgr192.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/tgr192.c b/crypto/tgr192.c index 87403556..3c7af0d1 100644 --- a/crypto/tgr192.c +++ b/crypto/tgr192.c @@ -612,7 +612,7 @@ static int tgr160_final(struct shash_desc *desc, u8 * out) tgr192_final(desc, D); memcpy(out, D, TGR160_DIGEST_SIZE); - memset(D, 0, TGR192_DIGEST_SIZE); + memzero_explicit(D, TGR192_DIGEST_SIZE); return 0; } @@ -623,7 +623,7 @@ static int tgr128_final(struct shash_desc *desc, u8 * out) tgr192_final(desc, D); memcpy(out, D, TGR128_DIGEST_SIZE); - memset(D, 0, TGR192_DIGEST_SIZE); + memzero_explicit(D, TGR192_DIGEST_SIZE); return 0; } |