]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
8 weeks agoAdd cell format and crypto alg to circ_params
Nick Mathewson [Mon, 2 Jun 2025 14:08:00 +0000 (10:08 -0400)] 
Add cell format and crypto alg to circ_params

This allows them to be negotiated as part of the handshake.

8 weeks agorelay_crypto: Implement support for CGO.
Nick Mathewson [Wed, 28 May 2025 19:53:34 +0000 (15:53 -0400)] 
relay_crypto: Implement support for CGO.

8 weeks agoTurn relay_crypto_t into a tagged union.
Nick Mathewson [Wed, 28 May 2025 19:14:51 +0000 (15:14 -0400)] 
Turn relay_crypto_t into a tagged union.

8 weeks agoRefactor relay_crypto_init API to take an algorithm.
Nick Mathewson [Wed, 28 May 2025 19:04:48 +0000 (15:04 -0400)] 
Refactor relay_crypto_init API to take an algorithm.

8 weeks agoTurn tor1_crypt_t into a distinct type.
Nick Mathewson [Wed, 28 May 2025 18:50:09 +0000 (14:50 -0400)] 
Turn tor1_crypt_t into a distinct type.

8 weeks agoMove relay_crypto_st.h to core/crypto.
Nick Mathewson [Wed, 28 May 2025 18:34:28 +0000 (14:34 -0400)] 
Move relay_crypto_st.h to core/crypto.

8 weeks agoPropagate longer keylens through onion handshakes.
Nick Mathewson [Wed, 28 May 2025 16:51:08 +0000 (12:51 -0400)] 
Propagate longer keylens through onion handshakes.

8 weeks agorelay crypto: functions to get key material length.
Nick Mathewson [Wed, 28 May 2025 16:22:03 +0000 (12:22 -0400)] 
relay crypto: functions to get key material length.

8 weeks agoAllow SENDME tags to be 16 or 20 bytes.
Nick Mathewson [Wed, 28 May 2025 16:02:39 +0000 (12:02 -0400)] 
Allow SENDME tags to be 16 or 20 bytes.

8 weeks agoMove tor1 crypto functions into new file
Nick Mathewson [Wed, 28 May 2025 15:12:54 +0000 (11:12 -0400)] 
Move tor1 crypto functions into new file

(I'd recommend reviewing this with "show -b --color-moved")

8 weeks agoRefactor and simplify save_sendme logic in tor1.
Nick Mathewson [Wed, 28 May 2025 14:02:38 +0000 (10:02 -0400)] 
Refactor and simplify save_sendme logic in tor1.

Every time that we want a sendme_digest, we have already computed it
once, either to originate a cell or to recognize a cell.  Rather
than figuring out when to compute the digest a second time, we
instead refactor our tor1 digest code to _always_ store such digests
in the relay_crypto_t.

This saves a bit of complexity, and shouldn't involve a performance
hit; rather, it has potential to speed things up by saving a sha1
call.

8 weeks agoRefactor tor1 relay crypto functions into per-layer calls.
Nick Mathewson [Wed, 28 May 2025 12:52:57 +0000 (08:52 -0400)] 
Refactor tor1 relay crypto functions into per-layer calls.

We'll need this for mixed circuits.

Also, the APIs here are a bit closer to the CGO APIs.

8 weeks agoRename two "record_*_digest functions to "save".
Nick Mathewson [Wed, 28 May 2025 12:27:58 +0000 (08:27 -0400)] 
Rename two "record_*_digest functions to "save".

This makes an important distinction: "recording" a digest puts
it in the expected-sendme queue, whereas "saving" a digest makes
a temporary copy inside the relay_crypto_t.

8 weeks agoRename a couple of relay crypto functions to "tor1".
Nick Mathewson [Wed, 28 May 2025 12:17:37 +0000 (08:17 -0400)] 
Rename a couple of relay crypto functions to "tor1".

(I've designated the existing encryption algorithm "tor1".

8 weeks agoMerge branch 'tor_41091' into 'main'
Alexander Hansen Færøy [Tue, 10 Jun 2025 12:35:21 +0000 (14:35 +0200)] 
Merge branch 'tor_41091' into 'main'

cgo: Use the correct operation to re-align AES.

Closes #41091

See merge request tpo/core/tor!906

2 months agoMerge branch 'maint-0.4.8'
David Goulet [Mon, 9 Jun 2025 13:50:24 +0000 (09:50 -0400)] 
Merge branch 'maint-0.4.8'

2 months agoMerge branch 'tor-gitlab/mr/903' into maint-0.4.8
David Goulet [Mon, 9 Jun 2025 13:50:10 +0000 (09:50 -0400)] 
Merge branch 'tor-gitlab/mr/903' into maint-0.4.8

2 months agoMerge branch 'maint-0.4.8'
David Goulet [Mon, 9 Jun 2025 13:36:26 +0000 (09:36 -0400)] 
Merge branch 'maint-0.4.8'

2 months agoFix: "Bug: Duplicate call to circuit_mark_for_close()"
Waldemar Zimpel [Sun, 1 Jun 2025 12:43:03 +0000 (14:43 +0200)] 
Fix: "Bug: Duplicate call to circuit_mark_for_close()"

Closes issue #40951

2 months agolog "list of supported TLS groups" only once
Roger Dingledine [Mon, 9 Jun 2025 01:50:36 +0000 (21:50 -0400)] 
log "list of supported TLS groups" only once

We had been logging it every two hours forever, even though it's based
on the version of OpenSSL we're using it so it will never change.

Fixes bug #41093.

The fix is an improvement on commit ba88ad6b which addressed #41058.

Not adding a changes file since those commits haven't gone out in a
release yet either.

2 months agocgo: Use the correct operation to re-align AES.
Nick Mathewson [Thu, 5 Jun 2025 20:12:24 +0000 (16:12 -0400)] 
cgo: Use the correct operation to re-align AES.

By accident, this doesn't cause a bug, since 480 = 15*16*2.
Still, it's better to avoid problems in the future.

Closes #41091.

2 months agoMerge branch 'cloexec-pipes' into 'main'
David Goulet [Tue, 3 Jun 2025 16:10:43 +0000 (16:10 +0000)] 
Merge branch 'cloexec-pipes' into 'main'

start_daemon: open pipe with cloexec

Closes #41013 and #41088

See merge request tpo/core/tor!904

2 months agostart_daemon: open pipe with cloexec
Jim Newsome [Mon, 2 Jun 2025 22:10:45 +0000 (17:10 -0500)] 
start_daemon: open pipe with cloexec

Fixes #41013
Fixes #41088

2 months agoAdd tor_pipe_cloexec
Jim Newsome [Mon, 2 Jun 2025 22:09:20 +0000 (17:09 -0500)] 
Add tor_pipe_cloexec

2 months agoMerge branch 'remove-tor_tls_get_num_server_handshakes' into 'main'
David Goulet [Tue, 27 May 2025 14:30:45 +0000 (14:30 +0000)] 
Merge branch 'remove-tor_tls_get_num_server_handshakes' into 'main'

Remove tor_tls_get_num_server_handshakes declaration

See merge request tpo/core/tor!902

2 months agoRemove tor_tls_get_num_server_handshakes declaration
Alex Xu (Hello71) [Sun, 12 Jun 2022 20:29:06 +0000 (16:29 -0400)] 
Remove tor_tls_get_num_server_handshakes declaration

This function has not been defined since 5205c7fd903c ("Initial NSS support for
TLS.").

2 months agoMerge branch 'cgo-faster' into 'main'
Nick Mathewson [Thu, 22 May 2025 14:20:08 +0000 (10:20 -0400)] 
Merge branch 'cgo-faster' into 'main'

Portability and speed improvements to cgo crypto

See merge request tpo/core/tor!900

2 months agoFix a bug with less optimized polyval variants.
Nick Mathewson [Thu, 22 May 2025 13:54:09 +0000 (09:54 -0400)] 
Fix a bug with less optimized polyval variants.

Using "0" to mean "doesn't support multi-block processing"
ran us into trouble: (n > 0 * 16) is always true for n > 0,
so we were always running a loop with no termination condition.

Additionally, the >s in this block should have been >=s,
since we want to process multi-blocks as long as there are any.
This won't have a performance impact for our current input sizes,
but it's nice to be correct.

2 months agoMerge branch 'openssl-cleanup' into 'main'
Nick Mathewson [Wed, 21 May 2025 17:19:58 +0000 (13:19 -0400)] 
Merge branch 'openssl-cleanup' into 'main'

Clean up some legacy OpenSSL code

See merge request tpo/core/tor!895

2 months agoMerge branch 'cgo-fixes-misc' into 'main'
Nick Mathewson [Wed, 21 May 2025 17:06:30 +0000 (13:06 -0400)] 
Merge branch 'cgo-fixes-misc' into 'main'

Fix a few bugs from #41051 (CGO cell format)

Closes #41071 and #41070

See merge request tpo/core/tor!892

2 months agoRemove AES support for old OpenSSLs
Nick Mathewson [Sun, 18 May 2025 14:34:43 +0000 (10:34 -0400)] 
Remove AES support for old OpenSSLs

2 months agoOptimize the everloving heck out of OpenSSL AES as used by CGO.
Nick Mathewson [Thu, 15 May 2025 16:21:49 +0000 (12:21 -0400)] 
Optimize the everloving heck out of OpenSSL AES as used by CGO.

Optimizations:

1. Calling EVP_CryptInit with a cipher returned by
   e.g. EVP_aes_128_ctr() is quite slow, since it needs to look
   up the _actual_ EVP_CIPHER corresponding to the given EVP,
   which involves grabbing locks, doing a search through a
   provider, and so on.  We use EVP_CIPHER_fetch to speed
   that up a lot.

2. There is not in fact any need to EVP_CIPHER_CTX_Reset a
   cipher before calling EVP_CryptInit on it a second time

2. Using an ECB cipher + CRYPTO_ctr128_encrypt was not in fact
   the most efficient way to implement a counter mode with an
   adjustable IV.  Instead, the fastest way seems to be:
     - Set the IV manually
     - Ensure that we are always aligned to block boundary
       when we do so.

2 months agopolyval: use real pclmul intrinsics on clang.
Nick Mathewson [Thu, 15 May 2025 16:46:02 +0000 (12:46 -0400)] 
polyval: use real pclmul intrinsics on clang.

Modern clangs don't appear to have a problem with it.

2 months agoUse polyvalx in cgo.
Nick Mathewson [Thu, 15 May 2025 14:59:01 +0000 (10:59 -0400)] 
Use polyvalx in cgo.

2 months agoAdd support for pre-expanded polyval keys with pclmul.
Nick Mathewson [Thu, 15 May 2025 14:49:55 +0000 (10:49 -0400)] 
Add support for pre-expanded polyval keys with pclmul.

We don't want to do this without pclmul, since it doesn't help in that case.

We don't want to do this unconditionally, since many of our polyval keys
are only used for 16 byte inputs.

(Yes, this makes a difference in practice!)

2 months agoSpeed up polyval through pipelining.
Nick Mathewson [Thu, 15 May 2025 14:00:21 +0000 (10:00 -0400)] 
Speed up polyval through pipelining.

This optimization helps because:
  - We're not blocking the computation of each block on the computation of the
    previous one, which leads to fewer pipeline stalls.
  - We're deferring reduction until the end of handling a bunch of blocks.

2 months agoAdd benchmarks for cgo and polyval.
Nick Mathewson [Thu, 15 May 2025 13:14:42 +0000 (09:14 -0400)] 
Add benchmarks for cgo and polyval.

2 months agoImprove tor1 encryption benchmarks
Nick Mathewson [Thu, 15 May 2025 12:54:42 +0000 (08:54 -0400)] 
Improve tor1 encryption benchmarks

Include cell origination (which costs more) and cycles per byte.

Rename benchmark to "tor1", since cgo is coming next.

2 months agopolyval: Detect pclmul presence using cpuid.
Nick Mathewson [Sat, 26 Apr 2025 02:04:23 +0000 (22:04 -0400)] 
polyval: Detect pclmul presence using cpuid.

2 months agopolyval: Allow PV_DECLARE declare multiple variants.
Nick Mathewson [Sat, 26 Apr 2025 01:18:19 +0000 (21:18 -0400)] 
polyval: Allow PV_DECLARE declare multiple variants.

2 months agopolyval: move declarations into a macro
Nick Mathewson [Sat, 26 Apr 2025 01:04:25 +0000 (21:04 -0400)] 
polyval: move declarations into a macro

I'll be using this to implement CPUID-based dispatch, which will require
multiple backends to coexist.

2 months agoMerge branch '41052_cgo_encryption' into 'main'
Nick Mathewson [Wed, 21 May 2025 14:15:07 +0000 (10:15 -0400)] 
Merge branch '41052_cgo_encryption' into 'main'

CGO: Crypto implementation

Closes #41052

See merge request tpo/core/tor!879

2 months agopolyval: Remove precomputation for ctmul64 case.
Nick Mathewson [Sat, 26 Apr 2025 00:44:06 +0000 (20:44 -0400)] 
polyval: Remove precomputation for ctmul64 case.

In my benchmarks it saved less than 1%, so it really
doesn't make sense to keep it.

2 months agoCGO: Fix authenticated-sendme tag handling.
Nick Mathewson [Wed, 23 Apr 2025 15:27:07 +0000 (11:27 -0400)] 
CGO: Fix authenticated-sendme tag handling.

See discussion at torspec#328: it's important that our
SENDME authentication tag always be taken based on the
_encrypted_ cell.

2 months agoCGO: Split modes into forward and backward variants.
Nick Mathewson [Wed, 23 Apr 2025 15:19:43 +0000 (11:19 -0400)] 
CGO: Split modes into forward and backward variants.

I'll need this for getting tags right wrt torspec!328.

2 months agoImplement the encryption operations for counter galois onion.
Nick Mathewson [Mon, 21 Apr 2025 21:41:11 +0000 (17:41 -0400)] 
Implement the encryption operations for counter galois onion.

2 months agoImplement low-level encryption functions for CGO.
Nick Mathewson [Sun, 20 Apr 2025 14:22:54 +0000 (10:22 -0400)] 
Implement low-level encryption functions for CGO.

These include a regular LRW2 tweakable block cipher,
a pseudorandom function,
and a UIV+ tweakable wide-block rugged pseudorandom permutation.

Also included are a few test vectors from the reference
 implementation.

2 months agoaes: Support for replacing an AES key without free+alloc
Nick Mathewson [Sun, 20 Apr 2025 22:49:40 +0000 (18:49 -0400)] 
aes: Support for replacing an AES key without free+alloc

2 months agoSupport for counter mode with raw AES.
Nick Mathewson [Sun, 20 Apr 2025 22:17:22 +0000 (18:17 -0400)] 
Support for counter mode with raw AES.

We'll want this for CGO because we want the ability to use the same AES
key several times with multiple different IVs: neither OpenSSL's EVP
interface nor NSS's PK11 API has a good interface to do that.
(This is usually expressed in terms of "seeking" to a new position
on the stream, but there isn't an API for that either.)

2 months agocrypto: Add support for raw (ECB) AES
Nick Mathewson [Sat, 19 Apr 2025 14:56:25 +0000 (10:56 -0400)] 
crypto: Add support for raw (ECB) AES

We'll need this to define the LRW2 tweakable block cipher used in CGO.

2 months agoPolyval: add ability to store key separately.
Nick Mathewson [Sun, 20 Apr 2025 14:37:38 +0000 (10:37 -0400)] 
Polyval: add ability to store key separately.

This will help reduce storage, since we never actually need
to keep a running total outside of a function.

2 months agoIntegrate polyval into our build system and give a test
Nick Mathewson [Sat, 19 Apr 2025 13:46:31 +0000 (09:46 -0400)] 
Integrate polyval into our build system and give a test

2 months agopolyval: comments throughout.
Nick Mathewson [Sat, 19 Apr 2025 13:32:07 +0000 (09:32 -0400)] 
polyval: comments throughout.

2 months agoDetect correct polyval implementation (mostly)
Nick Mathewson [Sat, 19 Apr 2025 13:10:58 +0000 (09:10 -0400)] 
Detect correct polyval implementation (mostly)

I'm saying "mostly" because this will be wrong on really old intel;
we'll need a cpuid workaround if we need to support those.

2 months agoAdapt pclmul.c to work with polyval.c
Nick Mathewson [Sat, 19 Apr 2025 01:09:25 +0000 (21:09 -0400)] 
Adapt pclmul.c to work with polyval.c

2 months agoadapt 32-bit ctmul.c to work with polyval.c
Nick Mathewson [Sat, 19 Apr 2025 00:43:10 +0000 (20:43 -0400)] 
adapt 32-bit ctmul.c to work with polyval.c

2 months agoAdapt ctmul64.c to work with polyval.c.
Nick Mathewson [Sat, 19 Apr 2025 00:25:29 +0000 (20:25 -0400)] 
Adapt ctmul64.c to work with polyval.c.

2 months agoUnfinished polyval implementation, without a multiplier.
Nick Mathewson [Sat, 19 Apr 2025 00:14:49 +0000 (20:14 -0400)] 
Unfinished polyval implementation, without a multiplier.

2 months agoRename files so it no longer looks like we are doing ghash
Nick Mathewson [Fri, 18 Apr 2025 23:16:17 +0000 (19:16 -0400)] 
Rename files so it no longer looks like we are doing ghash

2 months agoAdd code from BearSSL's ghash implementation.
Nick Mathewson [Fri, 18 Apr 2025 23:06:16 +0000 (19:06 -0400)] 
Add code from BearSSL's ghash implementation.

Polyval (which we need for CGO) is very similar to ghash,
and most of this code should be reusable with suitable adaptation.

2 months agoUnrelated: fix warnings about NSS kex algorithms.
Nick Mathewson [Tue, 22 Apr 2025 13:25:39 +0000 (09:25 -0400)] 
Unrelated: fix warnings about NSS kex algorithms.

2 months agoMerge branch 'bug41077' into 'main'
David Goulet [Wed, 21 May 2025 13:34:36 +0000 (13:34 +0000)] 
Merge branch 'bug41077' into 'main'

Fix log message claiming that LibreSSL is OpenSSL

Closes #41077

See merge request tpo/core/tor!897

2 months agoMerge branch 'bug40176' into 'main'
David Goulet [Wed, 21 May 2025 13:33:57 +0000 (13:33 +0000)] 
Merge branch 'bug40176' into 'main'

Fix linking on systems without a working stdatomic.h

See merge request tpo/core/tor!896

2 months agoMerge branch 'style-tweaks' into 'main'
David Goulet [Wed, 21 May 2025 13:33:40 +0000 (13:33 +0000)] 
Merge branch 'style-tweaks' into 'main'

trivial whitespace formatting fixes

See merge request tpo/core/tor!893

2 months agoMerge branch 'maint-0.4.8'
David Goulet [Wed, 21 May 2025 13:29:36 +0000 (09:29 -0400)] 
Merge branch 'maint-0.4.8'

2 months agoMerge branch 'tor-gitlab/mr/894' into maint-0.4.8
David Goulet [Wed, 21 May 2025 13:29:30 +0000 (09:29 -0400)] 
Merge branch 'tor-gitlab/mr/894' into maint-0.4.8

2 months agoMerge branch 'gcc-15-warnings-049' into 'main'
David Goulet [Wed, 21 May 2025 12:55:17 +0000 (12:55 +0000)] 
Merge branch 'gcc-15-warnings-049' into 'main'

Fix GCC warnings from GCC 15 (0.4.9)

See merge request tpo/core/tor!899

2 months agoFix another gcc 15 warning in 0.4.9.
Nick Mathewson [Mon, 19 May 2025 01:22:11 +0000 (21:22 -0400)] 
Fix another gcc 15 warning in 0.4.9.

2 months agoMerge branch 'gcc-15-warnings-048' into gcc-15-warnings-049
Nick Mathewson [Mon, 19 May 2025 11:52:22 +0000 (07:52 -0400)] 
Merge branch 'gcc-15-warnings-048' into gcc-15-warnings-049

2 months agoMake an exception to one of the NONSTRINGs
Nick Mathewson [Mon, 19 May 2025 01:52:36 +0000 (21:52 -0400)] 
Make an exception to one of the NONSTRINGs

Older GCCs accept the attribute but don't believe it can appear
before an array.

2 months agoAdd a changes file for 41079.
Nick Mathewson [Mon, 19 May 2025 01:12:30 +0000 (21:12 -0400)] 
Add a changes file for 41079.

2 months agoFix a new GCC warning about strings.
Nick Mathewson [Mon, 19 May 2025 01:11:00 +0000 (21:11 -0400)] 
Fix a new GCC warning about strings.

When we say something like

```
const char foo[3] = "foo";
```

GCC now complains, because there is no space for the terminating NUL.
But we use this construction in a lot of places in our tests to
initialize test digests, keys, and so on.  So to resolve the issue,
we have to mark these strings with a new attribute.

2 months agoConvince gcc that we will not access an array out of bounds
Nick Mathewson [Mon, 19 May 2025 00:54:08 +0000 (20:54 -0400)] 
Convince gcc that we will not access an array out of bounds

2 months agoFix log message claiming that LibreSSL is OpenSSL
Nick Mathewson [Wed, 14 May 2025 00:29:41 +0000 (20:29 -0400)] 
Fix log message claiming that LibreSSL is OpenSSL

(We only want to check the OpenSSL version when it's actually OpenSSL
we're using.)

Fixes #41077; bug not in any released Tor.

2 months agoRemove unused client cipher related functions
Alex Xu (Hello71) [Tue, 13 May 2025 04:12:35 +0000 (00:12 -0400)] 
Remove unused client cipher related functions

Follow-up for ddf16d6756 ("Remove support for client cipher classification.")

2 months agoFix linking on systems without a working stdatomic.h
Nick Mathewson [Tue, 13 May 2025 12:39:42 +0000 (08:39 -0400)] 
Fix linking on systems without a working stdatomic.h

Static libraries need to be sorted in a dependency order, with the
most low-level libraries last.  When we added an atomic counter to
util_bug.c in !760, we introduced a dependency from "log" to
"threads".  This didn't show up immediately, since the dependency
only exists when we're emulating atomic operations due to lack of
platform support.

Fixes bug #41076; bugfix on 0.4.9.1-alpha.

2 months agoUse SSL_CTX_set1_groups_list without checking
Alex Xu (Hello71) [Tue, 13 May 2025 04:10:42 +0000 (00:10 -0400)] 
Use SSL_CTX_set1_groups_list without checking

It is supported in OpenSSL 1.1.1+ and LibreSSL.

2 months agoreindent code from previous commit
Nick Mathewson [Mon, 12 May 2025 12:44:44 +0000 (08:44 -0400)] 
reindent code from previous commit

2 months agoAllow pow-params to appear multiple times.
Nick Mathewson [Mon, 12 May 2025 12:27:34 +0000 (08:27 -0400)] 
Allow pow-params to appear multiple times.

Relatedly, we only require that a pow-params line has _1_ argument
(since future versions might have nothing but a scheme).

See torspec#272 for discussion;
also see proposal 356 for why the fingerprinting opportunity here
isn't a big deal.

We probably shouldn't merge this until torspec!390 is in,
just in case we decide _not_ to take this approach.

(I haven't reindented some code here yet, to make the diff easier to read.)

2 months agoInclude message length in conflux_get_circ_bytes_allocation
Nick Mathewson [Thu, 8 May 2025 01:31:03 +0000 (21:31 -0400)] 
Include message length in conflux_get_circ_bytes_allocation

2 months agotrivial whitespace formatting fixes
Roger Dingledine [Sun, 11 May 2025 21:29:13 +0000 (17:29 -0400)] 
trivial whitespace formatting fixes

3 months agoCompute total_ooo_q_bytes correctly.
Nick Mathewson [Thu, 8 May 2025 01:19:40 +0000 (21:19 -0400)] 
Compute total_ooo_q_bytes correctly.

Closes #41071; bug not in any released Tor.

3 months agoUn-parenthesize checks wrt connection_edge_process_ordered_relay_cell()
Nick Mathewson [Thu, 8 May 2025 01:16:35 +0000 (21:16 -0400)] 
Un-parenthesize checks wrt connection_edge_process_ordered_relay_cell()

Previously, one of these checks had the parentheses in the wrong
place, given an incorrect result.  The code is hard enough to read
that I refactored both instances to be more obviously right.

I've grepped for similar errors elsewhere, but didn't find them.

Fixed #41070.  Bug not in any released Tor.

3 months agoMerge branch 'openssl_cleanup_part3' into 'main'
Nick Mathewson [Tue, 6 May 2025 23:13:02 +0000 (19:13 -0400)] 
Merge branch 'openssl_cleanup_part3' into 'main'

Improve various OpenSSL settings

Closes #41067

See merge request tpo/core/tor!889

3 months agoDefine a DH2048_KEY_LEN.
Nick Mathewson [Tue, 6 May 2025 22:40:39 +0000 (18:40 -0400)] 
Define a DH2048_KEY_LEN.

3 months agoMerge branch 'ticket41064' into 'main'
Alexander Hansen Færøy [Tue, 6 May 2025 20:13:24 +0000 (22:13 +0200)] 
Merge branch 'ticket41064' into 'main'

Use RELAY_PAYLOAD_SIZE_MIN for some cc calculations

Closes #41064

See merge request tpo/core/tor!890

3 months agoMerge branch 'bug41043' into 'main'
Alexander Hansen Færøy [Tue, 6 May 2025 20:01:53 +0000 (22:01 +0200)] 
Merge branch 'bug41043' into 'main'

Avoid crash on failure to read FamilyKeyDir

See merge request tpo/core/tor!886

3 months agoUse RELAY_PAYLOAD_SIZE_MIN for some cc calculations
Nick Mathewson [Tue, 6 May 2025 16:50:42 +0000 (12:50 -0400)] 
Use RELAY_PAYLOAD_SIZE_MIN for some cc calculations

These are for the cases where mikeperry and dgoulet had suggestions
on !878.

Closes #41064.

3 months agoMerge branch '41051_cell_format' into 'main'
Nick Mathewson [Tue, 6 May 2025 16:29:13 +0000 (12:29 -0400)] 
Merge branch '41051_cell_format' into 'main'

Prop359: Add functions to encode/decode new relay message format for CGO

Closes #41051 and #41056

See merge request tpo/core/tor!878

3 months agoFix compilation with NSS.
Nick Mathewson [Tue, 6 May 2025 15:39:32 +0000 (11:39 -0400)] 
Fix compilation with NSS.

3 months agoRemove check for unaccelerated ECC
Nick Mathewson [Tue, 6 May 2025 14:45:00 +0000 (10:45 -0400)] 
Remove check for unaccelerated ECC

The "enable-ec_nistp_64_gcc_128" option does not appear to be necessary
in any of our supported versions.

3 months agoChange our TLS finite-field diffie-hellman group to ffdhe2048.
Nick Mathewson [Tue, 6 May 2025 14:35:03 +0000 (10:35 -0400)] 
Change our TLS finite-field diffie-hellman group to ffdhe2048.

(We should never actually _use_ finite-field Diffie-Hellman
with TLS.)

3 months agoUpdate client cipher list to match current firefox
Nick Mathewson [Tue, 6 May 2025 14:08:43 +0000 (10:08 -0400)] 
Update client cipher list to match current firefox

(Shelikhoo says that this countermeasure is still likely to be
helpful for some users, and so we might as well keep it.)

3 months agoUpdate get_mozillia_ciphers to work with current firefox.
Nick Mathewson [Tue, 6 May 2025 14:07:12 +0000 (10:07 -0400)] 
Update get_mozillia_ciphers to work with current firefox.

This script is _still_ a complete kludge, and I don't currently propose to
un-kludge it.  With luck, today will be the last day we run it.

3 months agoRemove attempt to override TLS 1.3 server ciphersuites
Nick Mathewson [Tue, 6 May 2025 13:01:37 +0000 (09:01 -0400)] 
Remove attempt to override TLS 1.3 server ciphersuites

This was unnecessary _and_ broken!

It was unnecessary because the default list of TLS 1.3 ciphersuites
has always been pretty reasonable.

It was broken because:
 - SSL_CTX_set_cipher_list only affects the list of TLS 1.2 ciphersuites.
 - There have _never_ been a set of macros  named TLS1_3_TXT_*
   in any openssl version, as far as I can tell.

3 months agoRemove check and test for SSL_CIPHER_find
Nick Mathewson [Tue, 6 May 2025 12:48:07 +0000 (08:48 -0400)] 
Remove check and test for SSL_CIPHER_find

Nothing uses it any more.

3 months agoStop detecting HKDF: Our supported OpenSSL versions always have it
Nick Mathewson [Tue, 6 May 2025 12:43:34 +0000 (08:43 -0400)] 
Stop detecting HKDF: Our supported OpenSSL versions always have it

3 months agoStop detecting SSL_get_client_ciphers: we enver use it.
Nick Mathewson [Tue, 6 May 2025 12:41:14 +0000 (08:41 -0400)] 
Stop detecting SSL_get_client_ciphers: we enver use it.

3 months agoOpenSSL: Require TLS ≥ 1.2
Nick Mathewson [Tue, 6 May 2025 12:36:19 +0000 (08:36 -0400)] 
OpenSSL: Require TLS ≥ 1.2

TLS 1.2 was added in OpenSSL version 1.0.1,
which was our minimal supported openssl version for a long time:
so we can be sure that all clients and relays have it.

(I'd like to require TLS 1.3, but that would break everybody
who built with 1.0.1.)

Part of #41067.

3 months agoopenssl: Use TLS_method unconditionally.
Nick Mathewson [Tue, 6 May 2025 12:25:25 +0000 (08:25 -0400)] 
openssl: Use TLS_method unconditionally.

Every version of openssl/libressl we support has this.