summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | Replace _ => panic!() in tor-protoIan Jackson2024-10-151-14/+14
| |/ /
* | | Merge branch 'no-bare-python' into 'main'Jim Newsome2024-10-151-5/+5
|\ \ \ | | | | | | | | | | | | | | | | Abolish use of python-is-python3 See merge request tpo/core/arti!2535
| * | | Abolish use of python-is-python3Ian Jackson2024-10-151-5/+5
| |/ / | | | | | | | | | | | | | | | | | | "python" meaning "python3" was a wrongheaded decision by Python upstream. Our python scripts should start (roughly) `#! env python3`. And, this is already the case - we don't actually use python-is-python3!
* | | Merge branch 'mq-toplevel' into 'main'Ian Jackson2024-10-1514-23/+48
|\ \ \ | | | | | | | | | | | | | | | | Abolish the toplevel Account See merge request tpo/core/arti!2537
| * | | memquota: Change ToplevelAccount to be an alias for Arc<MemoryQuotaTracker>Ian Jackson2024-10-1513-22/+33
| | | | | | | | | | | | | | | | Fixes a TODO.
| * | | memquota: Provide a method Arc::<MemoryQuotaTracker>::new_noop()Ian Jackson2024-10-151-1/+15
| |/ / | | | | | | | | | | | | | | | | | | We'll need this to allow `ToplevelAccount::new_noop` (eg, in tests) when the type of ToplevelAccount changes. We have to do this via an extension trait.
* | | Merge branch 'relaysign-specifier' into 'main'David Goulet2024-10-151-0/+3
|\ \ \ | | | | | | | | | | | | | | | | tor-relay-crypto: Temporarily comment out RelaySigningKeySpecifier. See merge request tpo/core/arti!2527
| * | | tor-relay-crypto: Temporarily comment out RelaySigningKeySpecifier.Gabriela Moldovan2024-10-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `RelaySigningKeySpecifier` is currently defined as: ```rust #[non_exhaustive] #[derive(Deftly, PartialEq, Debug, Constructor)] #[derive_deftly(KeySpecifier)] #[deftly(prefix = "relay")] #[deftly(role = "KP_relaysign_ed")] #[deftly(summary = "Relay medium-term signing keypair")] /// The key sepcifier of the relay medium-term signing key (RelaySigningKeypair) pub struct RelaySigningKeySpecifier; ``` This means there can only be a single `relaysign_ed` key with an `ArtiPath` of the form `relay/KP_relaysign_ed`. This is a problem, because relays storing their identity key offline will want to generate a number of `relaysign_ed` keys ahead of time, so we need the keystores to be able to contain multiple such keys. We will need their `ArtiPath` to encode a variable component (for example, a timestamp). We also need to teach `KeyMgr` to retrieve such keys (`KeyMgr::get` should return the first key that has a valid and timely certificate). This will involve extending the `KeySpecifier` trait with a function for obtaining the `KeySpecifier` of the certificate of the key, if there is one. For now, let's comment it out and rethink its `ArtiPath` as part of #1692.
* | | | Merge branch 'mq-todo' into 'main'gabi-2502024-10-151-4/+6
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | memquota: Document the actual behaviour re streams/circuits See merge request tpo/core/arti!2531
| * | | | memquota: Document the actual behaviour re streams/circuitsIan Jackson2024-10-151-4/+6
| | |/ / | |/| | | | | | | | | | As per decision in #1661.
* | | | Merge branch 'bump-secmemproc' into 'main'Nick Mathewson2024-10-152-3/+3
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | arti: Bump secmem-proc to fix the build errors on FreeBSD. Closes #1686 See merge request tpo/core/arti!2533
| * | | | arti: Bump secmem-proc to fix the build errors on FreeBSD.Gabriela Moldovan2024-10-152-3/+3
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | The FreeBSD fixes were released in [`secmem-proc 0.3.4`]. Closes #1686 [`secmem-proc 0.3.4`]: https://github.com/niluxv/secmem-proc/pull/11
* | | | Merge branch 'keypair-specifier-docs' into 'main'Alexander Hansen Færøy2024-10-151-1/+15
|\ \ \ \ | |/ / / |/| | | | | | | | | | | tor-keymgr: Add missing docs for keypair_specifier. See merge request tpo/core/arti!2532
| * | | tor-keymgr: Reformat a long line for readability.Gabriela Moldovan2024-10-151-1/+3
| | | | | | | | | | | | | | | | This breaks up a long statement to improve readability.
| * | | tor-keymgr: Add missing docs for keypair_specifier.Gabriela Moldovan2024-10-151-0/+12
|/ / / | | | | | | | | | | | | This is a follow-up to !2393, which added support for the `key_specifier` top-level attribute.
* | | Merge branch 'hs-client-pow' into 'main'Ian Jackson2024-10-1545-254/+1090
|\ \ \ | |/ / |/| | | | | | | | Proof-of-work client See merge request tpo/core/arti!2486
| * | arti: Make hs-pow a experimental feature.Wesley Aptekar-Cassels2024-10-092-3/+2
| | |
| * | Add a little test coverage for pow-params parsing.Wesley Aptekar-Cassels2024-10-092-0/+126
| | | | | | | | | | | | | | | | | | | | | | | | Cover some of the novel edge cases we're introducing around object parameters and repetition. This still feels awfully ad-hoc, but it's better than nothing. Co-authored-by: Micah Elizabeth Scott <[email protected]>
| * | hs-pow inner desc: broaden pow-params rule, disallow object for v1.Wesley Aptekar-Cassels2024-10-092-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should not be restricting pow-params to occur only once at the rule level, and we shouldn't be disallowing object parameters at that level either. Instead, the v1 scheme itself needs to check for and disallow objects. Future schemes may allow object parameters. Test cases for this will be added in a subsequent commit. Co-authored-by: Micah Elizabeth Scott <[email protected]>
| * | Fix incorrect doc comment.Wesley Aptekar-Cassels2024-10-091-1/+2
| | | | | | | | | | | | | | | | | | Looks like a copy/paste error. Co-authored-by: Micah Elizabeth Scott <[email protected]>
| * | hs-pow: inner doc test using canned data from C tor.Wesley Aptekar-Cassels2024-10-092-4/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This proliferates the canned hsdesc inner doc testing strategy, adding another file with data encoded with onion-pow-example running on C tor. Tests that it parses successfully, and asserts that the pow params line contents are correct. This is a positive test only. This strategy seems problematic, but it's better than nothing. Co-authored-by: Micah Elizabeth Scott <[email protected]>
| * | hs-pow: Explain what the v1 scheme refers to, in PowParams.Wesley Aptekar-Cassels2024-10-091-0/+7
| | | | | | | | | | | | | | | | | | | | | Adds another breadcrumb as requested so new folks happening upon this in the docs can get oriented. Co-authored-by: Micah Elizabeth Scott <[email protected]>
| * | hs-pow: Change rule to require pow_params type parameter.Wesley Aptekar-Cassels2024-10-091-1/+1
| | | | | | | | | | | | | | | | | | | | | This can now notice pow_params lines which are invalid because they have no parameters. Co-authored-by: Micah Elizabeth Scott <[email protected]>
| * | hs-pow: Clarify a confusing comment in ProofOfWorkV1.Wesley Aptekar-Cassels2024-10-091-1/+1
| | | | | | | | | | | | Co-authored-by: Micah Elizabeth Scott <[email protected]>
| * | hs-pow: Use clamp for clarity.Wesley Aptekar-Cassels2024-10-091-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Instead of min/max pairs, we can use clamp. And since it's a little clearer, let's go a bit further and use the same clamp construct with a lower bound of zero in the other spot we had a min(). Co-authored-by: Micah Elizabeth Scott <[email protected]>
| * | hs-pow: Rename seed to seed_head.Wesley Aptekar-Cassels2024-10-091-3/+3
| | | | | | | | | | | | | | | | | | Feedback from the hs-pow code review, the internal seed heading member should be seed_head instead of seed, for consistency. Very low impact change since the field name is not public.
| * | hs-pow: Use TimerangeBound for puzzle parameters.Wesley Aptekar-Cassels2024-10-095-49/+64
| | | | | | | | | | | | Co-authored-by: Micah Elizabeth Scott <[email protected]>
| * | hs-pow: Effort type improvements.Wesley Aptekar-Cassels2024-10-092-11/+45
| | | | | | | | | | | | | | | | | | | | | | | | The Effort type didn't have any const constructor and we had to disassemble it to do any arithmetic. This adds a const constructor and int/float saturating arithmetic methods. Co-authored-by: Micah Elizabeth Scott <[email protected]>
| * | Use HsPowClient.Wesley Aptekar-Cassels2024-10-091-1/+2
| | | | | | | | | | | | | | | | | | | | | The fully qualified name earlier was helpful when this was optional, but now that it's required let's stick it with the other 'use crate'. Co-authored-by: Micah Elizabeth Scott <[email protected]>
| * | tor-hscrypto: Fixup broken doc links.Wesley Aptekar-Cassels2024-10-093-4/+4
| | | | | | | | | | | | Co-authored-by: Micah Elizabeth Scott <[email protected]>
| * | hs-pow: Refactor to prefer stub types rather than cfg sprawl.Wesley Aptekar-Cassels2024-10-0925-101/+201
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this design, the thin multiplexing layer between PoW types is always available when onion services are in use, but the specific pow schemes (and their dependency libraries) are gated by crate features everywhere. There are now no new cfg() gates. When the pow-v1 scheme is disabled, we can parse `pow-params v1` lines into an empty type (so clients know a PoW scheme exists that might be supported if they were configured differently). We currently don't save the contents of unknown hsdesc items. On the relaycell side, the hs ext module already sets a strong precedent for keeping unrecognized data as a byte vec, and it doesn't provide a good way to signal soft parse errors like unrecognized optional extensions. There, the `v1` type is completely optional, and services lacking a pow scheme suggested by a client would see one of these 'unrecognized' blobs. This isn't necessarily helpful but it fits the rest of the design. Co-authored-by: Micah Elizabeth Scott <[email protected]>
| * | tor-hspow: Big refactor, dissolve this crateWesley Aptekar-Cassels2024-10-0934-380/+447
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | My previous strategy here was to try and centralize hspow in one crate, writing it like a self-contained feature. That introduced friction in the data types, prompting the use of simplistic types at the netdoc/cell layers and full-featured types in the optional modules. This changes tactics, dissolving the low-level parts of tor-hspow into tor-hscrypto and the high-level parts into hsclient/hsservice. Full featured types are used everywhere now, but the tradeoff is that compile-time configurability is a lot more pervasive. Anything that knows about PoW types at all needs to be fully configured out. I took this opportunity to try a more complete set of crate features, allowing users to configure individual PoW schemes. Co-authored-by: Micah Elizabeth Scott <[email protected]>
| * | Enable onion client proof-of-work in the standalone "arti" toolWesley Aptekar-Cassels2024-10-091-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | The proof-of-work libraries are off by default in part because they depend on libraries that are currently GPL licensed. This precludes the use of this option in closed-source binaries, but here in the open-source arti tool (or consumers that bundle the binary) it's fine. Co-authored-by: Micah Elizabeth Scott <[email protected]>
| * | First pass at implementing onion proof-of-work clientWesley Aptekar-Cassels2024-10-099-7/+207
| | | | | | | | | | | | | | | | | | | | | | | | This adds a module to tor-hspow for version-independent client logic. The entire module and its invocations are disabled unless the new "hs-pow" compile time feature is set. Co-authored-by: Micah Elizabeth Scott <[email protected]>
| * | tor-hspow: Revise comments, type names, module coupling.Wesley Aptekar-Cassels2024-10-0910-119/+85
| | | | | | | | | | | | | | | | | | | | | | | | Some noisy but low-impact changes. We don't yet do this but it's possible to disable the 'solve' and 'verify' modules individually now without breaking the API. Co-authored-by: Micah Elizabeth Scott <[email protected]>
| * | tor-cell: Support encoding proofs-of-work in intro_payloadWesley Aptekar-Cassels2024-10-097-6/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | Like parameters, PoW solutions are versioned to account for multiple algorithms over time. A single solution of a specific version may accompany an INTRO1/2 as part of the encrypted extensions section. Its encoding may depend on the version. Co-authored-by: Micah Elizabeth Scott <[email protected]>
| * | tor-netdoc: Add parsing support for pow-params.Wesley Aptekar-Cassels2024-10-093-0/+120
| | | | | | | | | | | | | | | | | | | | | | | | This implements support for extensible proof-of-work parameters. Right now only a single type is defined, but in theory we can see up to one line per type on an onion service. Co-authored-by: Micah Elizabeth Scott <[email protected]>
| * | tor-hspow: Change PoW "protocol" terminology to "scheme"Wesley Aptekar-Cassels2024-10-091-1/+1
| |/ | | | | | | Co-authored-by: Micah Elizabeth Scott <[email protected]>
* | Merge branch 'rpc-integration-tests' into 'main'Nick Mathewson2024-10-1110-0/+522
|\ \ | | | | | | | | | | | | Start a set of integration tests in python See merge request tpo/core/arti!2515
| * | rpc-tests: Resolve unused variable/import warnings.Nick Mathewson2024-10-103-6/+2
| | |
| * | rpc-tests: Avoid 'import *'Nick Mathewson2024-10-101-1/+1
| | |
| * | rpc-tests: Reformat using "black".Nick Mathewson2024-10-106-10/+20
| | | | | | | | | | | | | | | (This is all on the theory that any formatting standard is better than none.)
| * | rpc-tests: Use argparse to parse cli.Nick Mathewson2024-10-102-9/+32
| | | | | | | | | | | | | | | | | | Right now, we only support two things in the CLI: overriding ARTI_RPC_TEST_DIR, and passing additional arguments to arti_rpc_tests.
| * | rpc-tests: Rename setup.py to context.pyNick Mathewson2024-10-103-7/+7
| | |
| * | rpc-tests: Use a decorator instead of a magic function nameNick Mathewson2024-10-103-4/+16
| | |
| * | rpc-tests: Use __init__ instead of weird staticmethod.Nick Mathewson2024-10-102-6/+2
| | |
| * | rpc-tests: Format config file correctly for Toml.Nick Mathewson2024-10-101-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We use the `tomli_w` package to generate reasonable toml output, instead of trying to use `str.format`. Without this, there's not an easy way to tell string.Formatter to convert Path('/abc/"def"') to `"abc/\"def\""`. Something like this would be necessary even if we weren't using Path, since the toml rules for sring encoding aren't the same as produced by Python's repr(), which we were using before.
| * | rpc-integration: Use Path instead of str.Nick Mathewson2024-10-102-12/+15
| | |
| * | Start a set of integration tests in pythonNick Mathewson2024-10-109-0/+480
| | | | | | | | | | | | | | | | | | | | | | | | These tests are loosely modeled after stem's test suite for Tor and the Tor control port. They're meant to exercise Arti, Arti RPC, and the Arti RPC client library. (For now, they exercise very little.)
| * | python: Note two methods which will need new argsNick Mathewson2024-10-101-0/+2
| | |