| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This code was needed with the old version of dalek-cryptography,
which wasn't compatible with up-to-date versions of the `rand`
crate(s). But now that we've upgraded, we can drop this.
(We could have left it around and deprecated it, but we are already
making a breaking change to tor-llcrypto by upgrading
dalek-cryptography.)
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The main changes that we have to adjust for are as follows:
* In x25519-dalek:
* `StaticSecret` is now behind a feature.
* `StaticSecret::new` is deprecated in favor of
`StaticSecret::random_from_rng`.
* StaticSecret no longer does its own clamping.
* In ed25519-dalek:
* `SecretKey` has (in effect) been renamed to `SigningKey`. The name
`SecretKey` is now an alias for `[u8; 32]`.
* `SigningKey` is effectively a keypair, since it contains a
public key as well.
* `PublicKey` has been renamed to `VerifyingKey`.
* The functions to extract a signing key and verifying key have
been renamed as you might expect.
* `ExpandedSecretKey` has been moved to `hasmat` and no longer
implements `sign`.
* `ExpanededSecretKey` now has as its elements a scalar and a hash
prefix.
* Various functions that took `&[u8]` now take `&[u8; N]`.
* We no longer need a wrapper for older versions of rand.
There is a single test in tor-keymgr that does not pass. I've
marked it as ignore for now, in hopes that @gabi-250 can help me
figure it out.
This closes #808. There are several changes I want to make before
we merge, however. They are marked with TODO DALEK.
|
| |\
| |
| |
| |
| |
| |
| | |
tor-keymgr: Derive Builder for KeyMgr.
Closes #1114
See merge request tpo/core/arti!1760
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
`KeyMgr` is soon going to have more fields, so now is a good time to
derive `Builder` for it.
Closes #1114
|
| |\ \
| | |
| | |
| | |
| | | |
tor-hsservice: improve Debug and serde
See merge request tpo/core/arti!1765
|
| | |/
| |
| |
| |
| | |
I found myself wanting to dump the IPT manager state in debug output
and the default Rust output was far too verbose.
|
| | | |
|
| | |
| |
| |
| | |
We're going to need to call this on startup to reestablish existing IPTs.
|
| | | |
|
| | |
| |
| |
| |
| | |
We are going to want to call this during startup, when we don't have
an IptManager yet.
|
| | |
| |
| |
| |
| | |
This will mean if we refer to it in more places, we'll still only have
one place to change it.
|
| | |
| |
| |
| |
| | |
Let's avoid cluttering the core algorithm file with this, which is
going to expand.
|
| | |
| |
| |
| | |
We're going to use time_store, which works nicely with Instants.
|
| | | |
|
| | |
| |
| |
| | |
There's a keymgr in imm now, so just use that.
|
| | |
| |
| |
| | |
As per the TODO.
|
| | |
| |
| |
| | |
Mandatory format degradation.
|
| | |
| |
| |
| | |
Prepare for persistence.
|
| | |
| |
| |
| |
| | |
We're going to add another field here. No functional change, just
much churn.
|
| |/
|
|
|
|
|
|
| |
This struct is going to be responsible for loading and storing
some persistent state, so it makes sense for it to handle
initialisation.
This also reduces duplication.
|
| |
|
|
|
|
| |
We want the configuration, at least, so that we can see our DoS
settings. I expect we'll also want the watcher so that we can
see _changes_ in the DoS settings.
|
| | |
|
| |
|
|
|
|
|
| |
Downcasting is tricksy. We need to try the downcast on a
type-erased &IptEstablisher, not &Box<dyn Any>, and if we don't
dereference nothing tells us it's wrong since &Box<dyn Any>
also implements and we end up with &Box<dyn Any> as &dyn Any.
|
| | |
|
| |
|
|
|
|
| |
If it's due to lack of useable netdir, that's normal during startup,
so don't log it. Hopefully something else somewhere will log if a
consensus can't be obtained.
|
| | |
|
| |
|
|
| |
We want to pass one of these to info_report!, which demands HasKind.
|
| |\
| |
| |
| |
| | |
tor-hsservice: ipt_mgr: Track notional estab started for faulty IPTs
See merge request tpo/core/arti!1686
|
| | | |
|
| | |
| |
| |
| | |
An IPT can go from Faulty to Good.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
The nickname is needed for retrieving keys from the keystore.
|
| |/ |
|
| |
|
|
| |
And add a TODO HSS for improving it.
|
| | |
|
| |
|
|
|
| |
This doesn't test all the code paths, but it does test the main path
of execution (and detected a couple of bugs).
|
| |
|
|
|
| |
We're want to be able to return a mutable borrow of a field in the
mock state. This means we must make `Rng` a GAT.
|
| |
|
|
|
|
| |
This involves plumbing the duration through. Also it involved
breaking out the multiplication by two into an addition, since if we
were to change the factor we'd want to print the scaled value.
|
| |
|
|
|
| |
We're going to improve the "establishing_very_recently" one in a
moment.
|
| |
|
|
|
| |
Add a colon. This is going to be the style for our trace and debug
output.
|
| |
|
|
|
| |
If the time we're supposed to wait is zero, something has gone wrong.
We'd probably just go round again and loop indefinitely.
|
| |
|
|
| |
This is a backstop to stop us just spinning. Instead, we crash.
|
| |
|
|
|
| |
We never called the `started_establishing_very_recently` machinery.
Do so.
|
| |
|
|
|
| |
lifetime is passed in the IptSet and doesn't want to be made absolute
here.
|
| |
|
|
|
|
|
| |
This calculation is now done elsewhere: the addition of
IPT_PUBLISH_EXPIRY_SLOP happens in IptSet::note_publication_attempt
and the storage in the manager's data structure is done by
IptManager::import_new_expiry_times.
|
| | |
|
| |
|
|
| |
(We try to avoid making tons and tons of copies of a secret key.)
|