boringssl/crypto/modes
Adam Langley 3d59e04bce Fix test used for not-in-place CBC mode.
With NO_ASM defined, the recent AEAD changes broke the tests. The
problem is that the generic CBC mode code tests whether in != out and
omits to save the IV, assuming that it'll be able to read the old
ciphertext block.

However, consider the case where out = in - 16:

    1       2      3       4
|-------|-------|------|-------|
    ^       ^
    |       |
   out     in

First time around, 1 = decrypt(2) ^ iv and everything is fine, because
the IV was preconfigured. However, the next iteration of the loop sets
2 = decrypt(3) and tries to XOR it with the contents of the previous
ciphertext block… from 2.

Change-Id: Ibabff430704fad246de132b4d6d514f6a0362734
2015-05-21 13:27:37 -07:00
..
asm Don't use .arch in aarch64 asm with Clang. 2015-05-05 00:28:03 +00:00
cbc.c Fix test used for not-in-place CBC mode. 2015-05-21 13:27:37 -07:00
cfb.c Remove string.h from base.h. 2015-02-02 19:14:15 +00:00
CMakeLists.txt Add malloc test support to unit tests. 2015-05-21 17:59:48 +00:00
ctr.c Fix invalid assert in CRYPTO_ctr128_encrypt. 2015-05-12 19:26:53 +00:00
gcm_test.c Fix some malloc test crashs. 2015-05-21 18:00:10 +00:00
gcm.c Add in missing curly braces part 3. 2015-02-11 15:14:46 -08:00
internal.h Eliminate unnecessary includes from low-level crypto modules. 2015-04-13 20:49:18 +00:00
ofb.c Enable more warnings & treat warnings as errors on Windows. 2015-01-31 00:18:55 +00:00