Commit Graph

3244 Commits

Author SHA1 Message Date
Nick Mathewson 131775bf36 Upgrade to latest rsa crate. 2023-01-20 08:06:30 -05:00
Nick Mathewson 02a1f9a3e4 Upgrade to latest async-broadcast
(We don't yet use the code that uses it, but we might as well have
our unused code be up-to-date.)
2023-01-20 08:06:30 -05:00
Nick Mathewson 707efc944d upgrade to latest serial_test 2023-01-20 08:06:30 -05:00
Nick Mathewson 889206cde4 Complete our migration to base64ct.
This is in lieu of upgrading to the latest base64 crate, which has
a different API from the old one.  Since we have to migrate either
way, we might as well use base64ct everywhere.

I don't think that most of these cases _require_ constant-time
base64, but it won't hurt.
2023-01-20 08:06:30 -05:00
Nick Mathewson 6cb0528cc1 Upgrade to latest rlimit crate. 2023-01-19 14:10:54 -05:00
Michael van Straten fa93f6674d made TorClient::set_stream_prefs public 2023-01-18 18:20:59 +01:00
Nick Mathewson 56cb2d2a10 Make a top-level API for connecting to onion services.
Fortunately, it adds very little to the arti-client API surface.
2023-01-12 09:28:58 -05:00
Nick Mathewson 7030cbe460 Merge branch 'onion-netdir-apis' into 'main'
Add onion service APIs to tor-netdir

See merge request tpo/core/arti!966
2023-01-11 16:08:18 +00:00
Nick Mathewson de3f10f492 netdir: add network parameters related to onion services
These are available unconditionally, since they represent
comparatively little storage and processing effort.

See param-spec.txt section 8 for the original information here.
2023-01-11 09:10:08 -05:00
Nick Mathewson 136f70545d tor-units: Add an IntegerMinutes. 2023-01-11 09:10:08 -05:00
Nick Mathewson 5b74ef7af9 Adjust onion service ring APIs in light of prop#342
* It is the NetDir's responsibility to tell the caller what the time
  period is.
* There can be up to two secondary time periods.
* Each time period has a single SRV.
* Secondary time periods only apply for onion services, when they
  publish.
* When publishing, the correct input is a time period.
2023-01-11 09:04:13 -05:00
Nick Mathewson f24f8d295c Sketch APIs for the onion service directory ring.
These are a bit complex internally, but the API they present is
pretty simple.  I've left some discussion of points where the design
isn't totally fleshed out, and where we need to look harder at the
spec.

Part of #716.
2023-01-11 09:04:13 -05:00
Nick Mathewson 2c41321710 Netdoc: Refactor SharedRandVal.
SharedRandVal now holds only the 32-byte random value itself; the
"number of commits" field is in SharedRandStatus.

This commit also makes the SharedRandVal be exactly 32 bytes, since
we've set it to that value in the spec.
2023-01-11 09:04:12 -05:00
Nick Mathewson d7abced11f hscrypto: Add several derives
The important addition here is the Copy derives, which affect API
design. I'm applying them to the types that are 32 byte or smaller.
2023-01-11 09:04:12 -05:00
Ian Jackson d6800bae0c Merge branch 'blind_privkey' into 'main'
llcrypto: Implement secret-key blinding.

Closes #719

See merge request tpo/core/arti!964
2023-01-09 18:06:00 +00:00
eta cea6396513 Merge branch 'typos' into 'main'
Fix typos

See merge request tpo/core/arti!965
2023-01-09 14:44:00 +00:00
eta 371bcdc554 Merge branch 'arti-hyper-fixing-715' into 'main'
Temporary fix for #715 and #569

Closes #715

See merge request tpo/core/arti!958
2023-01-09 14:43:37 +00:00
Dimitris Apostolou 892c6eaadf
Fix typos 2023-01-07 20:35:54 +02:00
Michael van Straten 2e8c38d11d Removed unnecessary "all()" cfg constraint 2023-01-07 13:00:40 +01:00
Michael van Straten 90a25fa21a Added x86_64-apple-darwin to fallback to "tls-api-openssl" 2023-01-07 12:57:23 +01:00
Michael van Straten 0a04851636 fixed "broken_intra_doc_link" 2023-01-06 19:43:44 +01:00
Nick Mathewson 8472acf3ac Merge branch 'onion-api-v0.2' into 'main'
Onion service APIs, part 1.

See merge request tpo/core/arti!959
2023-01-06 18:32:36 +00:00
Ian Jackson 0c2f800ab0 Merge branch 'sensitive' into 'main'
tor-proto: Remove some sensitive info from errors

See merge request tpo/core/arti!934
2023-01-06 18:07:26 +00:00
Nick Mathewson 7f6e3e19a3 Sketch a solution for arti#525 2023-01-06 13:03:50 -05:00
Nick Mathewson 91d9ffe0b6 Sketch out new required APIs in tor-cell 2023-01-06 13:03:50 -05:00
Nick Mathewson 9a54e01dd0 tor-cert: add a few hs TODOs 2023-01-06 13:03:50 -05:00
Nick Mathewson eba937e54c netdoc: Outline some basic types for encoding HsDescs. 2023-01-06 13:03:50 -05:00
Nick Mathewson 0203634ec5 Create a new tor-hscrypto crate.
This module has types and operations needed in multiple places
for an onion service implementation.  There are a bunch of
TODO hs-crypto comments that we'll need to fill in.
2023-01-06 13:03:50 -05:00
Nick Mathewson e650e07cd4 netdoc: note some changes we will have to make to srv 2023-01-06 13:03:50 -05:00
Nick Mathewson 7d38bbd829 llcrypto: fix a comment.
This described the wrong type of key.
2023-01-06 13:03:50 -05:00
Nick Mathewson e7c87372e2 llcrypto: clarify meaning of "Identity".
The `Ed25519Identity` and `RsaIdentity` types are not precisely
always used as relay identifiers: they are more generally used as
_key_ identifiers.

This will become relevant as `RsaIdentity` is used for authority
keys (as in authorities' VoterInfo blocks), and as `Ed25519Identity`
is used as the identifier behind an onion service key.
2023-01-06 13:03:47 -05:00
Ian Jackson 98acafe9d1 tor-proto: rustfmt
Not sure why the tree didn't have this newline already.  "Whatever".
2023-01-06 17:26:54 +00:00
Ian Jackson 0639b105c5 tor-proto: CreateFastWrap::decode_chanmsg: Do not report handshake
The debug impl prints the handshake challenge, which we should
probably treat as sensitive.
2023-01-06 17:26:54 +00:00
Ian Jackson df2124e28f tor-proto: impl Display for CreateResponse
Don't print the handshake value, but do print the display reason.
2023-01-06 17:26:54 +00:00
Ian Jackson 8c925499f8 tor-proto: When relay IDs mismatch, the IDs are sensitive in errors 2023-01-06 17:26:54 +00:00
Nick Mathewson 1e25a962a7 chanmgr: trace-level logs when launching connections.
Based on more temporary debugging code. Yet another part of #677.
2023-01-06 17:19:00 +00:00
Nick Mathewson 71dfaa3125 ptmgr: Add more logs when looking/creating a PT.
These are also based on temporary logs that I added locally while I
was hunting bugs.

Also part of #677.
2023-01-06 17:19:00 +00:00
Nick Mathewson 3eebe33678 ptmgr: Add more logging to IPC code.
This is based on logs that I added locally while I was trying to
debug some startup issues.  Hopefully they'll make things easier the
next time there's something to debug.

Part of #677.
2023-01-06 17:19:00 +00:00
eta b525fccfb0 Merge branch 'ya-lint' into 'main'
tor-linkspec: Fix an unused lint

See merge request tpo/core/arti!935
2023-01-06 17:16:27 +00:00
eta 118050e54c Merge branch 'test-lints' into 'main'
Add test lint blocks to all "mod test"

See merge request tpo/core/arti!937
2023-01-06 17:16:09 +00:00
eta fbae20537c Merge branch 'bug589a' into 'main'
Remove allow(unreachable_pub) from tor-guardmgr/src/lib.rs

Closes #589

See merge request tpo/core/arti!944
2023-01-06 17:14:03 +00:00
eta d869676263 Merge branch 'socks-resolve-ip' into 'main'
resolve ip through socks by parsing them

Closes #714

See merge request tpo/core/arti!957
2023-01-06 17:08:25 +00:00
Nick Mathewson 306e72c566 llcrypto: Implement secret-key blinding.
Closes #719.

Due to a difference between ed25519-dalek and ed25519-donna,
converting these secret keys directly to public keys does not work.
I've documented this in a "Limitations" section.
2023-01-06 12:02:49 -05:00
eta 246a5f1e56 Merge branch 'ctbytes' into 'main'
Add a new "CtByteArray" type, and use it in Id types.

See merge request tpo/core/arti!962
2023-01-06 16:41:29 +00:00
Nick Mathewson 9d3f19fd38 Add a new "CtByteArray" type, and use it in Id types.
This type provides a common implementation for types that are
implemented as arrays of bytes that should only be compared
with constant-time comparisons.
2023-01-05 12:34:14 -05:00
Michael van Straten 0d05a61381 Temporary fix for #715 and #569 2023-01-05 00:00:47 +01:00
Ian Jackson a7035d08a1 Merge branch 'tor-rtmock-rfc3399' into 'main'
Use parse_rfc3339() in the tor-rtmock crate

See merge request tpo/core/arti!943
2023-01-04 14:32:13 +00:00
Ian Jackson 8f91bc5ef9 Merge branch 'tor-proto-use-rfc3339' into 'main'
Use parse_rfc3339() in the tor-proto crate

See merge request tpo/core/arti!942
2023-01-04 14:31:07 +00:00
Ian Jackson 0ac7dfbd9e Merge branch 'tor-netdoc-rfc3399' into 'main'
Use parse_rfc3339() in the tor-netdoc crate

See merge request tpo/core/arti!941
2023-01-04 14:30:08 +00:00
trinity-1686a 29f1d9012d resolve ip through socks by parsing them 2023-01-03 17:53:16 +01:00