Jason Rhinelander
860c5efd47
Derived key fixes
...
The reason things weren't working here is because libsodium does
something completely unintuitive and called the seed the "secret key"
when it isn't, it's the seed.
This adds a new PrivateKey class (alongside the existing SecretKey and
PubKey) that holds just a private key value but no seed -- which we need
to do because there is no way we can get a seed after calculating a
derived keypair.
With these changes, we now generate exactly the same keys and subkeys as
Tor (and a new test case uses values generated in Tor to verify this).
This is incomplete -- the subkey signing code is still not implemented;
it has to be adapted to create a signature from a PrivateKey rather than
a SecretKey which will probably requiring working around/reimplementing
some of what libsodium does for creating a signature since it expects
"secret keys" i.e. the seed.
2020-01-30 12:34:05 -04:00
Jeff Becker
0f13591802
does not work
2020-01-28 16:55:36 -05:00
Jeff Becker
99eb7726ff
initial dht key blinding
2020-01-27 16:30:41 -05:00
Jeff Becker
1543284f6b
make it compile
2020-01-27 11:56:07 -05:00
Jeff Becker
4f81b913ef
make router version member optional on serialization
2020-01-27 11:55:19 -05:00
Jeff Becker
9efd796145
initial wack at 0.7.0 dht fixes
2020-01-27 11:54:51 -05:00
jeff
f6813717b5
Merge branch '2020-01-25-router-version' of ssh://github.com/majestrate/loki-network into 2020-01-25-router-version
2020-01-25 14:05:35 -05:00
jeff
898c98b170
use double braces
2020-01-25 14:04:21 -05:00
Jeff Becker
bb6dce486f
don't use a pointer
2020-01-25 12:41:34 -05:00
Jeff Becker
8c82bfe5bf
operator !=
2020-01-25 12:39:00 -05:00
Jeff Becker
03c13f4261
make it compile
2020-01-25 12:38:12 -05:00
jeff
816070be62
dont inherit std::array
2020-01-25 12:21:28 -05:00
jeff
fa30a6f9b2
router version
2020-01-25 11:29:01 -05:00
jeff
f728e6016b
router version
2020-01-25 11:28:07 -05:00
Jeff
227926a525
Merge pull request #1071 from majestrate/dont-always-use-bootstrap-in-explore-2020-01-23
...
don't always use bootstrap when exploring
2020-01-23 13:05:42 -05:00
Jeff Becker
b280bac141
don't always use bootstrap when exploring
2020-01-23 12:49:33 -05:00
Jeff
68b22735d9
Merge pull request #1070 from majestrate/monotonic-time-2020-01-23
...
make all timestamps monotonic and run loopback testnet at 1/5 speed
2020-01-23 12:14:56 -05:00
Jeff Becker
7146857df6
use static initialization for started times
2020-01-23 12:14:26 -05:00
Jeff Becker
7aa1b2c27c
monotonic time and run testnet at 20% realtime
2020-01-23 12:14:25 -05:00
Jeff
0edad0a817
Merge pull request #1069 from majestrate/refactor-single-char-variables-2020-01-23
...
Refactor single char variables in dht messages
2020-01-23 12:12:33 -05:00
Jeff Becker
626b2a6196
return true
2020-01-23 12:10:58 -05:00
Jeff Becker
e87b754906
fix recursion depth on introset lookup
2020-01-23 12:10:58 -05:00
Jeff Becker
2c0dc12f39
refactor single char variables in DHT (mostly)
2020-01-23 12:10:58 -05:00
Jeff Becker
ae8bb3751b
connect to closest for RC lookups too
2020-01-23 12:10:58 -05:00
Jeff Becker
49f696de9c
connect to closer nodes for introset lookups
2020-01-23 12:10:57 -05:00
Jeff Becker
3b66cf6e75
dht fixes, disable iterative lookups on clients, revert "fixes" from 0.6.3, pass in recursion depth from introset lookup
2020-01-22 17:08:05 -05:00
Jeff
d059723f30
Merge pull request #1066 from notlesh/remove-dead-code-2020-01-22
...
Remove dead code (AbstractRouter::EnsureRouter())
2020-01-22 13:34:12 -05:00
Stephen Shelton
fba12093ac
Remove dead code (AbstractRouter::EnsureRouter())
2020-01-22 11:15:40 -07:00
Jeff
51e4b47cf8
Merge pull request #1061 from majestrate/fix-log-level-2020-01-20
...
configurable log level
2020-01-21 15:58:49 -05:00
Stephen Shelton
9a65f19bb0
Add test to ensure config loading impacts runtime log level
2020-01-21 12:33:04 -07:00
Stephen Shelton
43998f97c8
Add unit tests for LogLevelToName and LogLevelToString
2020-01-21 12:15:04 -07:00
Jeff Becker
28752f85b7
improve test cases
2020-01-21 13:35:52 -05:00
Jeff Becker
8d11519eb2
unit tests for logging levels
2020-01-21 13:21:11 -05:00
Jeff
974aafec60
Merge pull request #1064 from majestrate/fix-deadlock-outbound-message-handler-2020-01-21
...
don't deadlock on path queue removal if full
2020-01-21 12:52:08 -05:00
Jeff Becker
1165466d56
don't deadlock when we want to remove lots of paths, flush queue instead when full
2020-01-21 12:28:23 -05:00
Jeff Becker
2f02073cac
unsigned char
2020-01-20 16:16:00 -05:00
Jeff
dd2e5cd38c
Merge pull request #1062 from jagerman/lokid-rpc-optimization
...
Add support for lokid's "unchanged" response
2020-01-20 16:15:18 -05:00
Jeff Becker
c69eb2c970
off -> none
2020-01-20 16:12:19 -05:00
Jeff Becker
ef0595602b
reduce number of values for LogLevelFromString
2020-01-20 16:11:34 -05:00
Jeff Becker
40876a6e3f
configurable log level
2020-01-20 16:00:08 -05:00
Jason Rhinelander
95b0eeda29
Add support for lokid's "unchanged" response
...
If we pass the last block hash to lokid it can give us an "unchanged"
response instead of the service node states to tell us that there is no
updated needed.
2020-01-20 16:47:08 -04:00
Jason Rhinelander
1ba1e04390
Separate json SN parsing definition/declaration
...
No changes to code here (committing this separately to make the changes
in the following commit easier to follow).
2020-01-20 16:43:27 -04:00
Jeff
5be1865318
Merge pull request #1059 from majestrate/bump-version-0.6.4-2020-01-19
...
bump version for 0.6.4
2020-01-19 12:55:25 -05:00
Jeff Becker
c86fb19187
bump version for 0.6.4
2020-01-19 07:18:58 -05:00
Jeff
53adfe0e71
Merge pull request #1053 from majestrate/link-layer-priority-2020-01-17
...
link layer message priority
2020-01-18 17:05:49 -05:00
Jeff Becker
12899701c5
inform congestion on tail drop
2020-01-18 17:03:24 -05:00
Jeff Becker
860891b6a6
tail drop
2020-01-18 16:59:50 -05:00
Jeff Becker
4185d47d4b
link layer message priority
2020-01-18 16:55:45 -05:00
Jeff
a681c28e5f
Merge pull request #1050 from majestrate/tweak-limits-2020-01-16
...
Tweak limits
2020-01-18 16:55:11 -05:00
Jeff Becker
c3f99e1b5c
make format
2020-01-18 16:53:42 -05:00