Author: cem
Date: Sat Oct 20 22:17:16 2018
New Revision: 339500
URL: https://svnweb.freebsd.org/changeset/base/339500

Log:
  Embedded chacha: Remove some harmless dead stores in keystream mode
  
  (From r338059.)
  
  Sponsored by: Dell EMC Isilon

Modified:
  head/sys/crypto/chacha20/chacha.c

Modified: head/sys/crypto/chacha20/chacha.c
==============================================================================
--- head/sys/crypto/chacha20/chacha.c   Sat Oct 20 22:14:29 2018        
(r339499)
+++ head/sys/crypto/chacha20/chacha.c   Sat Oct 20 22:17:16 2018        
(r339500)
@@ -120,8 +120,10 @@ chacha_encrypt_bytes(chacha_ctx *x,const u8 *m,u8 *c,u
 
   for (;;) {
     if (bytes < 64) {
+#ifndef KEYSTREAM_ONLY
       for (i = 0;i < bytes;++i) tmp[i] = m[i];
       m = tmp;
+#endif
       ctarget = c;
       c = tmp;
     }
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to