UPSTREAM: crypto: chacha20poly1305 - add back missing test vectors and test chunking
When this was originally ported, the 12-byte nonce vectors were left out to keep things simple. I agree that we don't need nor want a library interface for 12-byte nonces. But these test vectors were specially crafted to look at issues in the underlying primitives and related interactions. Therefore, we actually want to keep around all of the test vectors, and simply have a helper function to test them with. Secondly, the sglist-based chunking code in the library interface is rather complicated, so this adds a developer-only test for ensuring that all the book keeping is correct, across a wide array of possibilities. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> (cherry picked from commit 72c7943792c9e7788ddd182337bcf8f650cf56f5) Bug: 152722841 Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I92f42d43d679b91a57234ac8a452699551c21158
This commit is contained in:
parent
0b9a0a68a0
commit
02a5ca6d86
1 changed files with 1698 additions and 14 deletions
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue