summaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)Author
2013-01-21More of b30d06255c24165 for #6826: fix compat_libevent compilationNick Mathewson
It looks like there was a compilation error for 6826 on some platforms. Removing even more now-uncallable code to handle detecting libevent versions before 1.3e. Fixes bug 8012; bug not in any released Tor.
2013-01-17Replace base-{16,32,64} with base{16,32,64} in the codeNick Mathewson
Patch from onizuka generated with find ./ -type f -perm -u+rw -exec sed -ri 's/(Base)-(16|32|64)/\1\2/gi' {} \; Fixes issue 6875 on Tor.
2013-01-17Add ntor-related modules to the Makefiles.nmakeNick Mathewson
2013-01-17Even more code-removal for 6826Nick Mathewson
(Pull on a thread and the whole sweater unravels.)
2013-01-17Merge branch 'bug6826_squashed'Nick Mathewson
2013-01-17Drop detection logic for pre-1.3 busted libeventsNick Mathewson
This won't actually break them any worse than they were broken before: it just removes a set of warnings that nobody was actually seeing, I hope. Closes 6826
2013-01-17Merge remote-tracking branch 'public/bug6302'Nick Mathewson
2013-01-16Merge branch '024_msvc_squashed'Nick Mathewson
Conflicts: src/or/or.h srcwin32/orconfig.h
2013-01-16Fix an instance of snprintf; don't use _snprintf directlyNick Mathewson
2013-01-16When building with MSVC, call every enum bitfield unsignedNick Mathewson
Fixes bug 7305.
2013-01-16Fix a const warning under msvcNick Mathewson
2013-01-16Add clean target and test subdir to makefile.nmakeNick Mathewson
2013-01-16Add missing includes and libs to makefile.nmakeNick Mathewson
Fixes bugs 7312 and 7310.
2013-01-16Define SIZEOF_INTPTR_T when defining replacement intptr_tNick Mathewson
Fixes bug 7669
2013-01-16Rename *_isin to *_containsNick Mathewson
This is an automatically generated commit, from the following perl script, run with the options "-w -i -p". s/smartlist_string_num_isin/smartlist_contains_int_as_string/g; s/smartlist_string_isin((?:_case)?)/smartlist_contains_string$1/g; s/smartlist_digest_isin/smartlist_contains_digest/g; s/smartlist_isin/smartlist_contains/g; s/digestset_isin/digestset_contains/g;
2013-01-16Refactor: Use SOCK_ERRNO to avoid some #ifdef _WIN32sNick Mathewson
Fixes ticket 6302
2013-01-16Check for nacl headers in nacl/ subdirNick Mathewson
Fix for bug 7972
2013-01-16Update the copyright date to 201.Nick Mathewson
2013-01-15Clean up odds and endsRoger Dingledine
2013-01-14Merge branch 'bug7869'Nick Mathewson
2013-01-11Handle EWOULDBLOCK as EAGAIN if they happen to be different.Nick Mathewson
Fixes bug 7935. Reported by 'oftc_must_be_destroyed'.
2013-01-05Make the = at the end of ntor-onion-key optional.Nick Mathewson
Makes bug 7869 more easily fixable if we ever choose to do so.
2013-01-03Merge branch 'ntor-resquashed'Nick Mathewson
Conflicts: src/or/cpuworker.c src/or/or.h src/test/bench.c
2013-01-03Check all crypto_rand return values for ntor.Nick Mathewson
2013-01-03Use safe_mem_is_zero for checking curve25519 output for 0-nessNick Mathewson
This should make the intent more explicit. Probably needless, though.
2013-01-03Implement a constant-time safe_mem_is_zero.Nick Mathewson
2013-01-03Make libcurve25519_donna get built as a .aNick Mathewson
This lets us give it compiler flags differing from the rest of libor-crypto.a
2013-01-02Move curve25519 keypair type to src/common; give it functionsNick Mathewson
This patch moves curve25519_keypair_t from src/or/onion_ntor.h to src/common/crypto_curve25519.h, and adds new functions to generate, load, and store keypairs.
2013-01-02Refactor strong os-RNG into its own functionNick Mathewson
Previously, we only used the strong OS entropy source as part of seeding OpenSSL's RNG. But with curve25519, we'll have occasion to want to generate some keys using extremely-good entopy, as well as the means to do so. So let's! This patch refactors the OS-entropy wrapper into its own crypto_strongest_rand() function, and makes our new curve25519_secret_key_generate function try it as appropriate.
2013-01-02Add a wrapper around, and test and build support for, curve25519.Nick Mathewson
We want to use donna-c64 when we have a GCC with support for 64x64->uint128_t multiplying. If not, we want to use libnacl if we can, unless it's giving us the unsafe "ref" implementation. And if that isn't going to work, we'd like to use the portable-and-safe-but-slow 32-bit "donna" implementation. We might need more library searching for the correct libnacl, especially once the next libnacl release is out -- it's likely to have bunches of better curve25519 implementations. I also define a set of curve25519 wrapper functions, though it really shouldn't be necessary. We should eventually make the -donna*.c files get build with -fomit-frame-pointer, since that can make a difference.
2013-01-02Add a data-invariant linear-search map structureNick Mathewson
I'm going to use this for looking op keys server-side for ntor.
2012-12-31Fix a couple of harmless clang3.2 warningsSebastian Hahn
2012-12-28Fix various small leaks on error casesNick Mathewson
Spotted by coverity, bug 7816, bugfix on various versions.
2012-12-26Wrapper function for the common rate-limited-log pattern.Nick Mathewson
2012-12-25One last fix for a warning on non-EC systemsNick Mathewson
2012-12-25Be more noncomittal about performance improvement of uint128 backend.Nick Mathewson
2012-12-25Make ECDHE group configurable: 224 for public, 256 for bridges (default)Nick Mathewson
2012-12-25Inform the user if they're passing up a 10x ECDH speedup.Nick Mathewson
2012-12-25Let servers choose better ciphersuites when clients support themNick Mathewson
This implements the server-side of proposal 198 by detecting when clients lack the magic list of ciphersuites that indicates that they're lying faking some ciphers they don't really have. When clients lack this list, we can choose any cipher that we'd actually like. The newly allowed ciphersuites are, currently, "All ECDHE-RSA ciphers that openssl supports, except for ECDHE-RSA-RC4". The code to detect the cipher list relies on on (ab)use of SSL_set_session_secret_cb.
2012-12-25Remove the address argument from client cipher classification fnsNick Mathewson
2012-12-25Cache the type of client cipher list we have in the tor_tls_tNick Mathewson
We already use this classification for deciding whether (as a server) to do a v2/v3 handshake, and we're about to start using it for deciding whether we can use good ciphersuites too.
2012-12-25prop198: Detect the list of ciphersuites we used to lie about havingNick Mathewson
This is less easy than you might think; we can't just look at the client ciphers list, since openssl doesn't remember client ciphers if it doesn't know about them. So we have to keep a list of the "v2" ciphers, with the ones we don't know about removed.
2012-12-25Configure SSL context to know about using P-256 for ECDHE.Nick Mathewson
2012-12-13Nuke uses of memcmp outside of unit testsNick Mathewson
We want to be saying fast_mem{cmp,eq,neq} when we're doing a comparison that's allowed to exit early, or tor_mem{cmp,eq,neq} when we need a data-invariant timing. Direct use of memcmp tends to imply that we haven't thought about the issue.
2012-12-07Merge branch 'win64-7260'Nick Mathewson
Conflicts: src/or/dns.c
2012-12-06Implement HKDF from RFC5869Nick Mathewson
This is a customizable extract-and-expand HMAC-KDF for deriving keys. It derives from RFC5869, which derives its rationale from Krawczyk, H., "Cryptographic Extraction and Key Derivation: The HKDF Scheme", Proceedings of CRYPTO 2010, 2010, <http://eprint.iacr.org/2010/264>. I'm also renaming the existing KDF, now that Tor has two of them. This is the key derivation scheme specified in ntor. There are also unit tests.
2012-12-06Add a crypto_dh_dup, for benchmark supportNick Mathewson
2012-11-27Merge branch 'bug7013_take2_squashed'Nick Mathewson
2012-11-27Introduce tor_addr_port_parse() and use it to parse ServerTransportListenAddr.George Kadianakis
2012-11-23Note limitation of parse_rfc_1123_timeNick Mathewson
RFC1123 suggests that we should handle two-year times, and a full range of time zones, and other stuff too. We don't.