 d540725871
			
		
	
	d540725871
	
	
	
		
			
			Without this patch, the chacha block counter is not incremented on neon rounds, resulting in incorrect calculations and corrupt packets. This also switches to using `--no-numbered --zero-commit` so that future diffs are smaller. Reported-by: Hans Geiblinger <cybrnook2002@yahoo.com> Reviewed-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com> Cc: David Bauer <mail@david-bauer.net> Cc: Petr Štetiar <ynezz@true.cz> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
		
			
				
	
	
		
			39 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
| From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 | |
| From: Herbert Xu <herbert@gondor.apana.org.au>
 | |
| Date: Wed, 8 Jul 2020 12:41:13 +1000
 | |
| Subject: [PATCH] crypto: lib/chacha20poly1305 - Add missing function
 | |
|  declaration
 | |
| 
 | |
| commit 06cc2afbbdf9a9e8df3e2f8db724997dd6e1b4ac upstream.
 | |
| 
 | |
| This patch adds a declaration for chacha20poly1305_selftest to
 | |
| silence a sparse warning.
 | |
| 
 | |
| Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
 | |
| Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
 | |
| ---
 | |
|  include/crypto/chacha20poly1305.h | 2 ++
 | |
|  lib/crypto/chacha20poly1305.c     | 2 --
 | |
|  2 files changed, 2 insertions(+), 2 deletions(-)
 | |
| 
 | |
| --- a/include/crypto/chacha20poly1305.h
 | |
| +++ b/include/crypto/chacha20poly1305.h
 | |
| @@ -45,4 +45,6 @@ bool chacha20poly1305_decrypt_sg_inplace
 | |
|  					 const u64 nonce,
 | |
|  					 const u8 key[CHACHA20POLY1305_KEY_SIZE]);
 | |
|  
 | |
| +bool chacha20poly1305_selftest(void);
 | |
| +
 | |
|  #endif /* __CHACHA20POLY1305_H */
 | |
| --- a/lib/crypto/chacha20poly1305.c
 | |
| +++ b/lib/crypto/chacha20poly1305.c
 | |
| @@ -21,8 +21,6 @@
 | |
|  
 | |
|  #define CHACHA_KEY_WORDS	(CHACHA_KEY_SIZE / sizeof(u32))
 | |
|  
 | |
| -bool __init chacha20poly1305_selftest(void);
 | |
| -
 | |
|  static void chacha_load_key(u32 *k, const u8 *in)
 | |
|  {
 | |
|  	k[0] = get_unaligned_le32(in);
 |