Nick Mathewson
5f54be2234
Give up on suppressing that nightly-only clippy warning
2020-09-18 19:28:55 -04:00
Nick Mathewson
5e1e77a363
Make consensus documents valid DistDelay seconds earlier.
...
This will prevent arti from hitting the same issue as
https://gitlab.torproject.org/tpo/core/tor/-/issues/25756
2020-09-18 19:24:06 -04:00
Nick Mathewson
6a2c803f98
Resolve some nightly-only clippy warnings
2020-09-17 19:13:56 -04:00
Nick Mathewson
eb24b6f019
Fix a panic bug in microdesc parsing.
...
Found by fuzzing! The issue was that we were relying on the
arguments slice being within the input string, but we were sometimes
using a different _empty_ slice when there were no arguments.
I've noted a better solution in a comment.
2020-09-17 19:07:38 -04:00
Nick Mathewson
91db8ab6fb
Add fuzzers for certs, netdoc, and proto.
...
This was remarkably simple.
2020-09-17 19:06:56 -04:00
Nick Mathewson
f256847f82
Sort linkspecs in the same order as tor does
2020-09-17 15:33:18 -04:00
Nick Mathewson
ba546a798d
use more correct expiration times
2020-09-17 15:19:12 -04:00
Nick Mathewson
e3a524a659
More tests for tor_bytes::impl
2020-09-15 11:39:09 -04:00
Nick Mathewson
94792f583b
tor_bytes: Remove an extraneous println
2020-09-15 11:26:44 -04:00
Nick Mathewson
af7052657e
bytes: add tests for impl.rs
2020-09-15 11:06:58 -04:00
Nick Mathewson
054a5e5582
bytes: add tests for Writer trait
2020-09-14 18:25:50 -04:00
Nick Mathewson
294f2a5241
bytes: more test for Reader.
2020-09-14 18:05:47 -04:00
Nick Mathewson
963ab969cf
Add test for failing RSA identity construction
2020-09-13 17:44:34 -04:00
Nick Mathewson
41ca4eb154
Add some test vectors for rsa, taken from chutney
2020-09-13 17:39:01 -04:00
Nick Mathewson
9a94f11938
Now that the rsa crate has pkcs1 decoding, use it.
...
Also, instead of implementing an otherwise-derivable Hash for rsa
public keys, tell clippy not to worry that we're defining
partialeq but not hash.
2020-09-13 17:37:11 -04:00
Nick Mathewson
3d5f8cfec5
update wishlist: the rsa crate now supports oaep
2020-09-13 13:05:07 -04:00
Nick Mathewson
dcc155027d
stop exposing rsa::errors::Result.
2020-09-13 13:04:19 -04:00
Nick Mathewson
fe5a05497f
Add unit test for ValidatableEd25519Signature
2020-09-13 12:41:59 -04:00
Nick Mathewson
b3acc7f90f
caret tests: Test debug output for caret_enum
2020-09-13 12:24:53 -04:00
Nick Mathewson
2040db71d0
Add test vectors for curve25519->ed25519 parts of llcrypto
...
Also add a terminating NUL byte to a derivation string, to ensure
that our results match Tor's results. (This does not actually serve
a purpose FWICT.)
2020-09-13 12:10:56 -04:00
Nick Mathewson
6c4944ab3e
llcrypto: Fix a bug in ed25519->curve25519 secret key conversion
...
We were taking the sign bit from the _secret_ key, which is totally
incorrect. Instead it needs to be taken from the _public_ key.
Additionally, add a unit test for ed25519->curve25519 code.
2020-09-13 12:10:56 -04:00
Nick Mathewson
8fee269f94
llcrypto: tests for rsa kludge
2020-09-13 12:10:56 -04:00
Nick Mathewson
4fde455717
More tests for caret_int.
2020-09-13 09:19:12 -04:00
Nick Mathewson
624a70d22b
yet more readme updtes
2020-09-13 08:49:59 -04:00
Nick Mathewson
d4281b110e
Add documentation for tor-netdir crate
2020-09-13 08:27:55 -04:00
Nick Mathewson
3ef7f2bb3d
more readme tweaks
2020-09-12 21:47:55 -04:00
Nick Mathewson
c52bcfd1d7
Explain the demo in the readme.
2020-09-12 21:46:32 -04:00
Nick Mathewson
ee9b871bc5
Make client-demo launch a request to www.torproject.org:80
2020-09-12 21:32:00 -04:00
Nick Mathewson
02fc8b2528
Implement extend2/extended2 handshake.
...
This is not a production-ready implementation: it will break if a
circuit is used for anything while an extend is pending.
Client-demo can now build 3-hop circuits.
2020-09-12 20:48:07 -04:00
Nick Mathewson
df0ebf857f
Make more types implement Debug.
2020-09-12 20:45:59 -04:00
Nick Mathewson
7a72e093f4
tor_bytes::Reader: fix a bug in truncate.
2020-09-12 20:44:57 -04:00
Nick Mathewson
a9181131d2
Fix a bug in encoding extend2 cells.
2020-09-12 20:44:25 -04:00
Nick Mathewson
dc287d4457
WIP: extend.
2020-09-12 17:01:15 -04:00
Nick Mathewson
d1039dda9b
Simple functions to send and receive relay cells.
2020-09-12 16:25:10 -04:00
Nick Mathewson
3e342a69ae
Add a function to pad relay cells.
2020-09-12 15:55:04 -04:00
Nick Mathewson
2fb71d2b13
Refactoring around our 509-byte array type.
2020-09-12 15:47:12 -04:00
Nick Mathewson
c978480aae
more todo edits
2020-09-12 15:46:38 -04:00
Nick Mathewson
341e557b4c
Revise TODO; add some milestones.
2020-09-12 14:26:26 -04:00
Nick Mathewson
74798337dd
Ntor handshake (first hop) is go.
2020-09-11 20:00:26 -04:00
Nick Mathewson
e10fc436a9
Wrap ntor handshake in appropriate trait.
2020-09-11 19:45:15 -04:00
Nick Mathewson
b2c2fb66c9
Parameterize the circuit create code.
2020-09-11 19:35:38 -04:00
Nick Mathewson
b29f9f0772
Make create_fast implementation a little more generic.
2020-09-11 19:15:27 -04:00
Nick Mathewson
a4697e4528
For circuits: Implement first hop create via create_fast.
2020-09-11 19:00:55 -04:00
Nick Mathewson
a62717690b
proto: add minimal (raw) circuit support.
...
This is about enough to make a circuit, send a create_fast cell, and
get a created_fast cell back.
2020-09-11 15:10:34 -04:00
Nick Mathewson
f20eb2f43f
proto::channel: add piping to move cells around.
...
There's a "reactor" task to move cells to the appropriate circuit,
and a "send_cell" to send a cell directly.
This is client-only for now.
2020-09-11 13:58:05 -04:00
Nick Mathewson
49bbb4baa6
Turn channel into a handle-to-inner type.
...
I think I'll likely be refactoring this a _bunch_ before I actually
get to use this.
2020-09-10 13:19:39 -04:00
Nick Mathewson
812056d663
Move channel handshake into its own module.
2020-09-10 12:43:55 -04:00
Nick Mathewson
567af1a82e
update readme
2020-09-09 19:27:47 -04:00
Nick Mathewson
ee71abe560
Pare down and sort dependencies
2020-09-09 19:17:49 -04:00
Nick Mathewson
9f30b47cb7
Run cargo upgrade, except for stream-cipher.
2020-09-09 19:06:00 -04:00