Commit Graph

7795 Commits

Author SHA1 Message Date
Nick Mathewson c7feae494e Merge branch 'ticket991_mr' into 'main'
Reduce runtime of hspow_vectors and split it up

See merge request tpo/core/arti!1462
2023-08-02 15:49:03 +00:00
Ian Jackson 3ca2870123 Merge branch 'encodable-key-rename' into 'main'
keymgr: Replace EncodableKey::to_bytes() with SSH-specific function.

Closes #965

See merge request tpo/core/arti!1464
2023-08-02 14:59:42 +00:00
Ian Jackson 43cbd80f23 Merge branch 'ticket889_bench' into 'main'
equix, hashx: Benchmark against C implementation

See merge request tpo/core/arti!1446
2023-08-02 14:58:20 +00:00
Gabriela Moldovan b57a60d7b6
keymgr: Add TODO regarding SshEncodableKey impl for x25519. 2023-08-02 14:21:41 +01:00
Gabriela Moldovan 682d20110e
keymgr: Implement SshEncodableKey for ed25519::Keypair. 2023-08-02 14:21:06 +01:00
Gabriela Moldovan e89e76f974
keymgr: Remove KeyType::to_ssh_format.
This function isn't actually needed (it's not the responsibility of
`KeyType` to encode keys).

This commit also rewrites `ArtiNativeKeystore::insert` to use the new
`as_ssh_keypair_data` function instead of `to_ssh_format`.
2023-08-02 14:21:02 +01:00
Gabriela Moldovan e70be1353c
keymgr: Replace EncodableKey::to_bytes() with SSH-specific function.
The `EncodableKey::to_bytes` function didn't make much sense, because
not all keys have a canonical byte representation.

This commit replaces `EncodableKey::to_bytes` with
`EncodableKey::as_ssh_keypair_data`. In the future, `EncodableKey` will
grow functions for encoding keys in other storage formats too.

Closes #965
2023-08-02 14:13:18 +01:00
Micah Elizabeth Scott f40255cb95 tor-hspow: Shorten the solve_effort1k_aa_41_01 test
The solve tests are all tunable so that we can balance execution time
with test coverage. A longer solve will test more random programs and it
will test more of the nonce increment function, minor benefits at the
cost of much more CPU.

The starting nonce in solve_effort1k_aa_41_01 was set so that we would
exercise a rollover in bit 7 of the nonce increment before the full
width rollover, but this wasn't a particularly helpful place to test
and certainly not worth the 13+ seconds it takes on my machine.

This patch bumps the starting nonce to a value much closer to the
target, and still including the full-width rollover.

Brings solve_effort1k_aa_41_01 down from 13.2 seconds to 0.5 sec for me.

For ticket #991

Signed-off-by: Micah Elizabeth Scott <beth@torproject.org>
2023-08-01 19:31:23 -07:00
Micah Elizabeth Scott f84af7c360 tor-hspow: Split up hspow_vectors tests
This test had one large function for all the verifies and one for all
the solves. The solve test was slow enough to be a bottleneck,
documented in ticket #991.

This patch splits the existing tests up in to one labeled function per
solve or verify configuration.

Signed-off-by: Micah Elizabeth Scott <beth@torproject.org>
2023-08-01 19:31:23 -07:00
Micah Elizabeth Scott 550d89fb57 hashx/bench: Shared generate wrapper for u64-hash and full-hash
Code cleanup from review feedback

Signed-off-by: Micah Elizabeth Scott <beth@torproject.org>
2023-08-01 19:28:46 -07:00
Micah Elizabeth Scott 315122f159 hashx/bench, equix/bench: Enable debug symbols
Propagates this setting from the outer Cargo.toml to the new
benchmark crates, since they no longer get the setting by
being included in the main workspace.

Signed-off-by: Micah Elizabeth Scott <beth@torproject.org>
2023-08-01 19:28:46 -07:00
Micah Elizabeth Scott 256e5de9e5 hashx/bench, equix/bench: check in matching Cargo.lock files
It might be useful to keep these locked down for benchmark
reproducibility. Currently the hashx and equix crates are
fully separate.

Signed-off-by: Micah Elizabeth Scott <beth@torproject.org>
2023-08-01 19:28:46 -07:00
Micah Elizabeth Scott ae58ea0697 equix, hashx: Benchmark against C implementation
This is a small batch of improvements for the equix and hashx
benchmarks. The headline feature is that we are now including
the C implementations (slightly modified from tevador's, hosted
as part of c-tor) and using them in apples-to-apples comparisons.

Minor features:
- Benchmarks moved to new nested crates, preventing their
  dependencies from spilling into the main workspace build.
- Tests are now grouped
- We also test the performance of memory reuse where possible
- Code cleanup for per-runtime options

These benchmark builds will now automatically pull in the c-tor
git repo and build portions of it with a Rust wrapper. This uses
the 'cc' and 'bindgen' crates, so it requires a C compiler and
libclang on the host system.

Signed-off-by: Micah Elizabeth Scott <beth@torproject.org>
2023-08-01 19:28:43 -07:00
Nick Mathewson b0b6e47d05 Merge branch 'misc_upgrades' into 'main'
Upgrade to sanitize-filename 0.5.0

See merge request tpo/core/arti!1453
2023-08-02 00:11:42 +00:00
Nick Mathewson 1dc47a65cf Upgrade to sanitize-filename 0.5.0 2023-08-01 19:47:39 -04:00
Nick Mathewson 4abad7b6fd Merge branch 'update-hss-dep' into 'main'
hsservice: Upgrade tor-keymgr dep

See merge request tpo/core/arti!1463
2023-08-01 23:28:58 +00:00
Nick Mathewson f7c0350e7f hsservice: Upgrade tor-keymgr dep
This breakage was caused by increasing the version of tor-keymgr
and independently merging !1452, which added a dependency on the
old version.
2023-08-01 18:51:55 -04:00
Ian Jackson f365b41c13 Merge branch 'remove_semver' into 'main'
Remove semver.md files now that 1.1.7 is out.

See merge request tpo/core/arti!1460
2023-08-01 17:42:58 +00:00
Ian Jackson d799a7c5a7 Merge branch 'ipts2bis' into 'main'
dev notes: Draft IPT algorithm: Overhaul for latest version of torspec!154

See merge request tpo/core/arti!1444
2023-08-01 17:42:18 +00:00
gabi-250 3a64c5b79c Merge branch 'bump_version' into 'main'
Script to bump patchlevel without touching other crates

Closes #945

See merge request tpo/core/arti!1461
2023-08-01 17:35:29 +00:00
Nick Mathewson dee95436f5 Merge branch 'hss_apis' into 'main'
hsservice: Initial data structures and APIs

Closes #972, #971, and #970

See merge request tpo/core/arti!1452
2023-08-01 17:06:10 +00:00
Nick Mathewson b71b04eb84 Script to bump patchlevel without touching other crates
Closes #945.

Based on @diziet's comment in #945, with a little extra safety and
paranoia.  We use this for cases when there are trivial changes only
in one of our crates.
2023-08-01 12:57:58 -04:00
Nick Mathewson 1e96d1b95a Remove semver.md files now that 1.1.7 is out. 2023-08-01 12:55:52 -04:00
Ian Jackson bcde97624b Merge branch 'pt-not-found-err' into 'main'
Add error if [[bridges.transports]] isn't written in config file

Closes #880

See merge request tpo/core/arti!1229
2023-08-01 16:43:46 +00:00
Saksham Mittal 752f748910 Add error if [[bridges.transports]] isn't written in config file 2023-08-01 16:43:46 +00:00
Nick Mathewson 3422169ff4 Merge branch 'bump_versions_117' into 'main'
Vesion bumps for 1.1.7.

See merge request tpo/core/arti!1458
2023-08-01 15:40:26 +00:00
Nick Mathewson 9e96079b6d Merge branch 'changelog_117_part2' into 'main'
Changelog 117 part2

See merge request tpo/core/arti!1457
2023-08-01 15:13:20 +00:00
Nick Mathewson 5cc3fe1629 Bump patchlevel versions of crates with trivial changes
These crates have had trivial changes only: typically,
changes to documentation or to clippy warnings.  There's no
good reason to update which version of them other crates depend on,
so we only bump _their_ patchlevels.

```
tor-async-utils
caret
safelog
tor-events
tor-units
tor-rtcompat
tor-rpcbase
tor-llcrypto
tor-protover
tor-bytes
tor-hscrypto
tor-socksproto
tor-cert
tor-cell
tor-consdiff
tor-congestion
arti-rpcserver
arti-testing
arti-bench
arti-config
arti-hyper
```
2023-08-01 11:03:56 -04:00
Nick Mathewson 5970c90fcd Merge branch 'fixup-features' into 'main'
Run "fixup features" in preparation for a release.

See merge request tpo/core/arti!1456
2023-08-01 15:01:53 +00:00
Nick Mathewson 3acdf102c7 Increment patchlevel versions of crates with minor changes
These crates are at version 0.x.y, so we don't need to distinguish
new-feature changes from other changes:

```
tor-basic-utils
fs-mistrust
tor-error
tor-geoip
tor-checkable
tor-linkspec
tor-netdoc
tor-netdir
tor-persist
tor-ptmgr
tor-hsservice
```

This crate has a breaking change, but only when the semver-breaking
feature `experimental-api` is enabled:

```
tor-config
```

This crate is at version 1.x.y, but has no new public APIs, and
therefore does not need a minor version bump:

```
arti
```
2023-08-01 10:57:55 -04:00
Nick Mathewson 6f2ae59603 Update minor versions on crates that have had breaking changes
These crates had first-order breaking changes:

```
retry-error
tor-keymgr
tor-proto
tor-hsclient
tor-rtmock
```

Additionally, these broke because they re-exposed RetryError:

```
tor-circmgr
```

Additionally, these broke because they may re-expose something from
tor-proto:

```
    arti-client
    tor-chanmgr
    tor-dirclient
    tor-dirmgr
    tor-guardmgr
```

Additionally, these broke for other fiddly reasons:

`tor-ptmgr` implements traits from tor-chanmgr, which has a breaking
change above.

`arti-hyper` exposes types from arti-client in its API.
2023-08-01 10:51:25 -04:00
Nick Mathewson 03eabedef4 changelog 1.1.7: Acknowledgments and links. 2023-08-01 10:28:08 -04:00
Nick Mathewson 140564aab8 changelog: spelling fixes. 2023-08-01 10:18:03 -04:00
Nick Mathewson 848d329c09 Merge branch 'changelog_117' into 'main'
First draft of a changelog for 1.1.7

See merge request tpo/core/arti!1454
2023-08-01 14:16:02 +00:00
gabi-250 5d1a3575ae Merge branch 'update_20230801' into 'main'
Run cargo update in preparation for a release.

See merge request tpo/core/arti!1455
2023-08-01 13:19:58 +00:00
gabi-250 55a12bee85 Apply 1 suggestion(s) to 1 file(s) 2023-08-01 13:11:23 +00:00
Nick Mathewson 9ce6f0a0eb Run "fixup features" in preparation for a release. 2023-08-01 08:32:20 -04:00
Nick Mathewson f37915587e Run cargo update in preparation for a release. 2023-08-01 08:10:44 -04:00
Nick Mathewson 2085e43cfc Changelog: add breaking changes from semver.md 2023-08-01 08:02:34 -04:00
Nick Mathewson 17f6074850 Begin work on a changelog for 1.1.7. 2023-08-01 07:57:49 -04:00
Nick Mathewson 7dc24f38e0 hsservice: Add a sketched API for HsDir publishers.
As with the other APIs here, I'd expect that the implementors will
need to refactor this a lot.

Closes #972.
2023-07-31 13:47:44 -04:00
Nick Mathewson 16fef0057b A couple of notes on intropoint establisher API. 2023-07-31 13:47:44 -04:00
Nick Mathewson 982bfcba06 hsservice: Add a draft API for intropoint establisher.
Taken from @diziet's !1439 and lightly cleaned up so that it
compiles.

Closes #971.
2023-07-31 13:47:44 -04:00
Nick Mathewson 20afc76c0a hsservice: Adapt API sketches from onion-service-notes.md 2023-07-31 13:47:44 -04:00
Nick Mathewson 20b3679dbb hsservice: Adapt data structures from onion-service-notes.md
Also, removed some older structures that don't make sense in the
current design.

Closes #970
2023-07-31 13:47:44 -04:00
Ian Jackson e798f8e322 dev notes: Draft IPT algorithm: Make IPT persistence optional
As per current version of torpsec!154
2023-07-28 15:22:08 +01:00
Ian Jackson ec63468606 dev notes: Draft IPT algorithm: Reuse relays when cycling IPT 2023-07-28 15:13:08 +01:00
Ian Jackson 476846d73c dev notes: Draft IPT algorithm: Maintain k*N, not 2N
Make this a separate parameter.
2023-07-28 15:08:24 +01:00
Nick Mathewson 5906c2c92e Merge branch 'ticket889_prototype' into 'main'
Rust implementation of onion service client puzzles (Proposal 327)

See merge request tpo/core/arti!1368
2023-07-28 12:33:22 +00:00
Micah Elizabeth Scott 61bf60d177 check_licenses: Whitelist for crates that may use LGPL-3.0-only
Narrows the previous check, allowing this particular LGPL
only for the hashx and equix crates.

Signed-off-by: Micah Elizabeth Scott <beth@torproject.org>
2023-07-27 13:23:26 -07:00