1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00
Commit graph

5056 commits

Author SHA1 Message Date
Jeff Becker
c60a83f7f4
update lokinet monitor to work with iwp 2020-02-07 12:27:17 -05:00
Jeff
e44449b2d5
Merge pull request #1084 from notlesh/reduce-client-log-output-2020-02-06
s/LogInfo/LogDebug/ @ explore message
2020-02-06 16:08:40 -05:00
Stephen Shelton
37e4f26be1
s/LogInfo/LogDebug @ 'signed/verify encrypted introset' 2020-02-06 12:05:43 -07:00
Stephen Shelton
2cade16c0e
s/LogInfo/LogDebug/ @ 'updating SN list' 2020-02-06 12:03:06 -07:00
Stephen Shelton
bc3184a126
s/LogInfo/LogDebug/ @ explore message 2020-02-06 11:57:39 -07:00
Jeff
4bc5b52762
Merge pull request #1082 from majestrate/log-build-after-send-2020-02-06
only mark path build success if delivered to first hop
2020-02-06 12:38:38 -05:00
Jeff Becker
499e346da6
notify delivery of path builds 2020-02-06 12:12:39 -05:00
Jeff
8230b1152e
Merge pull request #1072 from majestrate/2020-01-25-router-version
add router version
2020-02-04 17:40:46 -05:00
Jeff
702ab29ce4
Merge pull request #1080 from majestrate/fix-kdf-2020-02-03
don't derive x25519 key from ed25519 key
2020-02-04 12:30:22 -05:00
Jeff Becker
1318846a08
test/service/test_llarp_service_identity.cpp:
* remove failing irrelevent test
* add expect_call in EnsureKeys to match expected bevahior
2020-02-04 06:44:48 -05:00
Jeff Becker
e6174efa21
don't derive x25519 key from ed25519 key 2020-02-03 17:21:31 -05:00
Jeff
c122b460e1
Merge pull request #1075 from jagerman/dht-blinding
Dht blinding
2020-02-03 16:44:25 -05:00
Jason Rhinelander
73239f4c39 Use glob to find sodium source files
Manually changing the list every time we want to change the libsodium
version is painful.

I tested this glob against libsodium 1.0.17 and verified it produces the
same set of files (aside from the generated version.h), and that in
1.0.18 it produces the same set modulo upstream files removed/added.
2020-02-02 22:12:29 -04:00
Jason Rhinelander
b72a4296b7 Fix libsodium 1.0.18 URL 2020-02-02 21:37:09 -04:00
Jeff
c8417a7270
Merge pull request #1076 from majestrate/plug-memory-leak-2020-02-01
use std::shared_ptr not a bare pointer to prevent memleak
2020-02-02 18:12:15 -05:00
Jason Rhinelander
2b93ccb393 Bump libsodium required version to 1.0.18
We use crypto_core_ed25519_scalar_mul which is only exported by
libsodium >= 1.0.18.
2020-02-02 16:38:48 -04:00
Jason Rhinelander
8cd95c01b3 Abstract signing hash data location
This makes the interface a little cleaner by not requiring the class
user to know how we laid out the data in the object.
2020-02-02 16:38:48 -04:00
Jason Rhinelander
739ce92aeb Remove unused ristretto includes 2020-02-01 12:44:31 -04:00
Jeff Becker
ee752c00e6
make format 2020-02-01 10:28:10 -05:00
Jeff Becker
c014d21f84
use std::shared_ptr not a bare pointer to prevent memleak 2020-02-01 09:31:53 -05:00
Stephen Shelton
5631983716
Make format 2020-01-31 14:52:59 -07:00
Stephen Shelton
8921125924
Fix buffer overflow when version encodes too many integers 2020-01-31 14:48:00 -07:00
Jason Rhinelander
f1171ed7a2 make format 😠 🤮 2020-01-31 17:05:50 -04:00
Jason Rhinelander
46f3459b79 Fixed EncryptedIntroSet signing to use PrivateKey
We can generate both root and derived signatures from a PrivateKey, but
only root from a SecretKey, so just change it to use a PrivateKey.
2020-01-31 16:47:25 -04:00
Jason Rhinelander
cd8f26deff Use hash instead of random for signing hash data
This makes PrivateKey store both the key followed by the hash.  For
PrivateKeys based on SecretKeys this just means the second half of the
SHA-512 of the seed, and makes a PrivateKey constructed from a SecretKey
give an identical signature to signing directly with sodium.

For derived keys we use a ShortHash of the root key's signing hash
concatenated with the publicly known hash value, so that our derived key
signing hash will be different from the root signing hash and also
different for different derivation parameters.

This also changed one of the asserts in crypto_noop, but upon closer
inspection the copying of the secret key into the signature seems really
wrong, so just changed them to fill with 0s.
2020-01-31 16:47:25 -04:00
Jason Rhinelander
fe8a72750a Silence unused parameter warning 2020-01-31 16:47:25 -04:00
Jeff Becker
9153f726c5 const correctness 2020-01-31 16:47:25 -04:00
Stephen Shelton
cfabe72587
Fix RouterVersion::IsEmpty() and RouterVersion::Clear() 2020-01-31 13:31:00 -07:00
Stephen Shelton
f0571a9f2c
Fix IsCompatableWith() logic WRT emptyRouterVersion, add unit tests 2020-01-31 13:23:48 -07:00
Thomas Winget
afd87eedb4 NO CLAMPS YOU IDIOT!!! 2020-01-31 12:05:27 -04:00
Thomas Winget
a487982c49 initial implementation of blinded sign -- not working yet 2020-01-31 12:05:20 -04:00
Jason Rhinelander
f7cd10a82e Fix Recalculate()
Recalculate did what should have been the right thing but wasn't because
of libsodium's mislabelling the "seed" as the secret key.
2020-01-30 12:38:39 -04:00
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