summaryrefslogtreecommitdiffstats
path: root/crypto/encryptor_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* Switch to standard integer types in crypto/.avi2015-12-211-0/+3
| | | | | | | | | | BUG=138542 TBR=rsleevi@chromium.org NOPRESUBMIT=true Review URL: https://codereview.chromium.org/1539353003 Cr-Commit-Position: refs/heads/master@{#366460}
* Rename USE_NSS to USE_NSS_CERTS.davidben2015-04-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | USE_NSS is confusing because it's not actually the analog of USE_OPENSSL; it's the analog to USE_OPENSSL_CERTS. This is in preparation for the chimera build which will set USE_OPENSSL and USE_NSS(_CERTS). This CL was partially done automatically by the following command: git grep -l USE_NSS | xargs sed -i -e 's/defined(USE_NSS)/defined(USE_NSS_CERTS)/' The remaining were caught by the following command and fixed manually: git grep 'USE_NSS\([^_]\|$\)' Finally, the following command verified nothing in a separate repository was sensitive to this change: find . -name '*.cc' -o -name '*.h' | xargs grep 'USE_NSS\([^_]\|$\)' For now, the old name is still defined, but not used within Chromium. A follow-up CL will remove deprecated use_nss and USE_NSS #defines together which will then cause downstream churn. Though from a grep of known downstreams, the churn seems to be fairly minimal. The removal is split from this CL so that, if we need to revert, the CL to revert is small. TBR=pneubeck@chromium.org BUG=462040 Review URL: https://codereview.chromium.org/1082123003 Cr-Commit-Position: refs/heads/master@{#325710}
* Relax the failure mode of EncryptorTest.UnsupportedKeySize so that wewtc@chromium.org2014-07-311-6/+5
| | | | | | | | | | | can run the test on all platforms. R=davidben@chromium.org,joth@chromium.org,rsleevi@chromium.org BUG= Review URL: https://codereview.chromium.org/432443003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286667 0039d316-1c4b-4281-b951-d872f2087c98
* Desupport AES-192 in crypto::SymmetricKey.davidben@chromium.org2014-07-251-26/+0
| | | | | | | | | | | | | BoringSSL does not support AES-192. No current consumer uses AES-192, so remove the test which asserts it works. This fixes crypto_unittests in the Mac OpenSSL port. Blacklist AES-192 in the NSS implementation so that we do not accidentally grow a new dependency on it. BUG=338885 Review URL: https://codereview.chromium.org/420883003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285678 0039d316-1c4b-4281-b951-d872f2087c98
* Prevent invalid memory read when AES-CBC decrypting.eroman@chromium.org2013-10-011-0/+26
| | | | | | | | | | The issue happens when the ciphertext is not a multiple of the block size. BUG=300681 Review URL: https://codereview.chromium.org/25164002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226199 0039d316-1c4b-4281-b951-d872f2087c98
* Rename "decypted" to "decrypted".eroman@chromium.org2013-09-301-28/+28
| | | | | | | | | | I presume this was a typo that got replicated throughout encryptor_unittest.cc BUG=NONE Review URL: https://codereview.chromium.org/25163002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225951 0039d316-1c4b-4281-b951-d872f2087c98
* Support CTR-AES in encryptor_openssl.xhwang@chromium.org2013-06-131-28/+190
| | | | | | | | | | BUG=163552 TEST=Added unittest to cover CTR-AES encryption/decryption. Also tested AesDecryptorTest in media_unittests. Review URL: https://chromiumcodereview.appspot.com/16654005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206141 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of strings headers in crypto/, dbus/, device/.avi@chromium.org2013-06-111-1/+1
| | | | | | | | | | BUG=247723 TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/16123026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205457 0039d316-1c4b-4281-b951-d872f2087c98
* Use NSS for symmetric key crypto operations on Windows and Mac.ddorwin@chromium.org2012-06-151-15/+25
| | | | | | | | | | | | | | | Encryptor, HMAC, and SymmetricKey now use NSS on all platforms except Android. This allows us to use them inside the sandbox, something that was not possible when using the platform APIs. On Windows, Native Client 64-bit builds still use the the platform APIs. BUG=127803,124741 TEST=Existing tests since there is no change in functionality. Review URL: https://chromiumcodereview.appspot.com/10543146 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142356 0039d316-1c4b-4281-b951-d872f2087c98
* Add a wrong key that should be detected by all implementations.wtc@chromium.org2012-05-111-5/+24
| | | | | | | | | | R=rsleevi@chromium.org BUG=127586 TEST=EncryptorTest.DecryptWrongKey Review URL: https://chromiumcodereview.appspot.com/10378095 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136493 0039d316-1c4b-4281-b951-d872f2087c98
* Demonstrate that not all wrong keys can be detected by padding error.wtc@chromium.org2012-04-271-0/+14
| | | | | | | | | | R=xhwang@chromium.org BUG=124434 TEST=crypto_unittests --gtest_filter=EncryptorTest.DecryptWrongKey Review URL: http://codereview.chromium.org/10247001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134220 0039d316-1c4b-4281-b951-d872f2087c98
* Add a wrong key test into EncryptorTest.xhwang@chromium.org2012-04-231-1/+45
| | | | | | | | | | | | | The behavior of crypto::Encryptor::Decrypt() funcion is different on different platforms. Add this test to test this. BUG=124434 TEST=this is a new test Review URL: http://codereview.chromium.org/10146012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133569 0039d316-1c4b-4281-b951-d872f2087c98
* ake string_util::WriteInto() DCHECK() that the supplied |length_with_null| > ↵pkasting@chromium.org2011-11-291-18/+0
| | | | | | | | | | | | 1, meaning that the without-'\0' string is non-empty. This replaces the conditional code added recently that makes this case return NULL. It's easier to understand if it's simply an error to call WriteInto() in this case at all. Add DCHECK()s or conditionals as appropriate to callers in order to ensure this assertion holds. BUG=none TEST=none Review URL: http://codereview.chromium.org/8418034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112005 0039d316-1c4b-4281-b951-d872f2087c98
* Implement AES-CTR for NSS.hclam@chromium.org2011-06-241-0/+68
| | | | | | | | | | | Implement AES-128-CTR. BUG=87152 TEST=None Review URL: http://codereview.chromium.org/7056026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90425 0039d316-1c4b-4281-b951-d872f2087c98
* Move crypto files out of base, to a top level directory.rvargas@google.com2011-04-141-0/+233
src/crypto is now an independent project that contains our cryptographic primitives (except md5 and sha1). This removes the base dependency from nss, openssl and sqlite. BUG=76996 TEST=none Review URL: http://codereview.chromium.org/6805019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81611 0039d316-1c4b-4281-b951-d872f2087c98