Import upstream's tests for DES_ede3_cfb_encrypt
Upstream does not actually have any tests for DES-EDE3-CFB, with the
exception of a single DES-EDE3-CFB1 test vector, only the single-DES
version. But we can gain some coverage by turning 3DES back into single
DES with a repeated key. That's good enough for DES.
The DES-EDE3-CFB1 test vector is unusable because that tests
EVP_des_ede3_cfb1, the real DES-EDE3-CFB1. OpenSSL's low-level APIs do
not actually implement CFB correctly for a non-whole-number of bytes!
See discussion in the test. I've added coverage for that case by just
fabricating a test vector.
Change-Id: I9f69cab4d8d1d3accecbeb09f8c1661ce2ecb4ee
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/65689
Reviewed-by: Bob Beck <bbe@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
diff --git a/sources.cmake b/sources.cmake
index 2a4a03e..c65afb9 100644
--- a/sources.cmake
+++ b/sources.cmake
@@ -346,6 +346,7 @@
decrepit/blowfish/blowfish_test.cc
decrepit/cast/cast_test.cc
decrepit/cfb/cfb_test.cc
+ decrepit/des/des_test.cc
decrepit/evp/evp_test.cc
decrepit/ripemd/ripemd_test.cc
decrepit/xts/xts_test.cc