aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_crypto.c
AgeCommit message (Collapse)Author
2020-06-06Make curve25519_public_to_base64 output padding optional #7869Daniel Pinto
2020-03-17Merge branch 'maint-0.4.2' into maint-0.4.3Nick Mathewson
2020-03-17Merge branch 'maint-0.4.1' into maint-0.4.2Nick Mathewson
2020-03-17Merge branch 'trove_2020_002_035' into trove_2020_002_041Nick Mathewson
2020-03-17Add off-by-one checks for key length.Nick Mathewson
2020-03-14Merge branch 'trove_2020_002_035' into trove_2020_002_041Nick Mathewson
2020-03-14Add a test for crypto_pk_asn1_decode_private maxbits.Nick Mathewson
2020-01-09Merge branch 'pre_formatter_cleanups_squashed'Nick Mathewson
2020-01-09Use new ENABLE/DISABLE_GCC_WARNINGNick Mathewson
This is an automated commit, generated by: perl -i -pe 'next if /define/; s/((?:ENABLE|DISABLE)_GCC_WARNING)\(([A-Za-z0-9_\-]+)\)/$1(\"-W$2\")/' src/*/*/*.[ch] src/*/*.[ch]
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2019-10-22Re-run make autostyle.Nick Mathewson
2019-10-22Merge branch 'ticket31705_v2' into ticket31705_v2_mergedNick Mathewson
Conflicts: src/feature/dirparse/authcert_parse.c src/feature/dirparse/ns_parse.c src/feature/hs/hs_service.c src/lib/conf/conftesting.h src/lib/log/log.h src/lib/thread/threads.h src/test/test_options.c These conflicts were mostly related to autostyle improvements, with one or two due to doxygen fixes.
2019-10-22test: Hide some test-declaration macro definitions to COCCI.Nick Mathewson
(These ones cause parsing failures.)
2019-09-30Re-run "make autostyle" with improved annotate_ifdef_directivesNick Mathewson
2019-06-05Run "make autostyle."Nick Mathewson
2019-04-30Replace all remaining tor_mem_is_zero() with fast_mem_is_zero()Nick Mathewson
2019-04-05crypto_format: Remove the return value from ed25519_signature_to_base64()teor
Also remove all checks for the return value, which were redundant anyway, because the function never failed. Part of 29660.
2019-04-05crypto_format: Remove the return value from curve25519_public_to_base64()teor
And fix the documentation on the function: it does produce trailing "="s as padding. Also remove all checks for the return value, which were redundant anyway, because the function never failed. Part of 29660.
2019-04-05crypto_format: Remove the return values from digest256_to_base64()teor
... and ed25519_public_to_base64(). Also remove all checks for the return values, which were redundant anyway, because the functions never failed. Part of 29960.
2019-02-26Merge branch 'tor-github/pr/655'David Goulet
2019-02-26Merge branch 'tor-github/pr/611'George Kadianakis
2019-02-14Extract RNG tests into a new test moduleNick Mathewson
test_crypto.c is pretty big; it wouldn't hurt to split it up some more before I start adding stuff to the PRNG tests.
2019-01-17Add a function to compute an XOF in one shot.Nick Mathewson
Motivation: 1. It's convenient. 2. It's all that openssl supports. Part of 28837.
2019-01-17Use openssl's version of sha3 when available.Nick Mathewson
Part of 28837.
2019-01-16Bump copyright date to 2019Nick Mathewson
2019-01-16Bump copyright date to 2019.Nick Mathewson
2018-12-20base32_decode(): Return number of bytes written on success.Nick Mathewson
This makes it consistent with base64_decode(). Closes ticket 28913.
2018-09-05Try to fix new coverity warnings in unit tests.Nick Mathewson
2018-09-04Rename crypto_pk_check_key(), use it more reasonably, add testsNick Mathewson
This function was a wrapper around RSA_check_key() in openssl, which checks for invalid RSA private keys (like those where p or q are composite, or where d is not the inverse of e, or where n != p*q). We don't need a function like this in NSS, since unlike OpenSSL, NSS won't let you import a bogus private key. I've renamed the function and changed its return type to make it more reasonable, and added a unit test for trying to read a key where n != p*q.
2018-08-21When enabling NSS, disable OpenSSL.Nick Mathewson
We used to link both libraries at once, but now that I'm working on TLS, there's nothing left to keep OpenSSL around for when NSS is enabled. Note that this patch causes a couple of places that still assumed OpenSSL to be disabled when NSS is enabled - tor-gencert - pbkdf2
2018-08-21Refactor crypto_rsa to use pem module.Nick Mathewson
This cleans up a lot of junk from crypto_rsa_openssl, and will save us duplicated code in crypto_rsa_nss (when it exists). (Actually, it already exists, but I am going to use git rebase so that this commit precedes the creation of crypto_rsa_nss.)
2018-08-21Rename functions that encode/decode private keysNick Mathewson
It is not nice to expose a private key's contents without having the function name advertise the fact. Fortunately, we weren't misusing these yet.
2018-07-31Additional tests for NSS DHNick Mathewson
Notably, there's a test to make sure that it round-trips with OpenSSL, if OpenSSL is enabled.
2018-07-11Move the initialization and cleanup parts of crypto.cNick Mathewson
These are now part of crypto_init.c. The openssl-only parts now live in crypto_openssl_mgt.c. I recommend reviewing this patch with -b and --color-moved.
2018-07-05Fix every include path changed in the previous commit (automated)Nick Mathewson
I am very glad to have written this script.
2018-07-05Remove util.hNick Mathewson
Inline its contents (which were all includes) into or.h, and some of its contents into other places that didn't include or.h at all.
2018-07-03Merge remote-tracking branch 'github/ticket26626'Nick Mathewson
2018-07-03Replace U64_LITERAL with the standard UINT64_CNick Mathewson
2018-07-03Clean up various things that broke with our stdint.h changesNick Mathewson
Casting before printf was necessary; now it's not so smart. We don't have SIZEOF_UINT8_T any more.
2018-07-01Remove system headers from or.hNick Mathewson
2018-07-01Minimize headers that include crypto_formats and x25519 stuffNick Mathewson
2018-07-01Remove needless includes from or.hNick Mathewson
or.h should really include only the minimum of stuff from or/*, common/*, and lib/*.
2018-07-01Combine DH_BYTES and DH_KEY_LEN; put them in a lib/defs header.Nick Mathewson
2018-06-21Rectify include paths (automated)Nick Mathewson
2018-06-21Merge remote-tracking branch 'rl1987/ticket19979_2'Nick Mathewson
2018-06-20Run rectify_include_paths.pyNick Mathewson
2018-06-20Update copyrights to 2018.Nick Mathewson
2018-06-19When possible, use RFC5869 HKDF implementation from OpenSSLrl1987
Also, stop supporting empty HKDF input key material
2018-06-17Merge remote-tracking branch 'github/bug26152_035'Nick Mathewson
2018-05-24Merge branch 'maint-0.3.3'Nick Mathewson