Commit Graph

403 Commits (16be86a5c3d7951830f0f4e14de2197b057836ff)

Author SHA1 Message Date
Stephen Shelton 16be86a5c3
Merge pull request #1116 from tewinget/short-path-names
path builder prints hops, rest print short name
5 years ago
Thomas Winget fc56a018e5 path builder prints hops, rest print short name 5 years ago
Jeff 7c5a721457
Merge pull request #1114 from notlesh/redundant-introset-lookup-improvements-2020-02-20
Redundant introset lookup improvements
5 years ago
Stephen Shelton 0429bafbb3
Merge pull request #1111 from notlesh/redundant-introset-propagation-2020-02-19
Redundant introset propagation
5 years ago
Stephen Shelton 66cb30fa58
Refactor: remove recursionDepth from DHT lookups 5 years ago
Stephen Shelton dff9aeb250
Propagate Introset publishing redundantly 5 years ago
Jason Rhinelander ac1486d0be Replace absl::optional with optional-lite
Step 1 of removing abseil from lokinet.

For the most part this is a drop-in replacement, but there are also a
few changes here to the JSONRPC layer that were needed to work around
current gcc 10 dev snapshot:

- JSONRPC returns a json now instead of an optional<json>.  It doesn't
  make any sense to have a json rpc call that just closes the connection
  with returning anything.  Invoked functions can return a null (default
  constructed) result now if they don't have anything to return (such a
  null value won't be added as "result").
5 years ago
Jeff Becker 827ca0bda7
make catch2 a submodule 5 years ago
Stephen Shelton 7842889fef Add NodeDB tests around FindClosestTo() 5 years ago
Stephen Shelton 9dfcfbc3ac Bencode/decode relayOrder in lexigraphical order, make it uint64_t 5 years ago
Stephen Shelton 906803e387 Refactor DHT introset lookups to use redundant lookup strategy 5 years ago
Jeff Becker e35d17764a * add path::Path::UniqueEndpointSet_t
* start using check2 for new unit tests
* unit test for path::Path::UniqueEndpointSet_t
5 years ago
Jason Rhinelander 8aacc2d317 Update deprecated gtest macros
gtest ~renamed INSTANTIATE_TEST_CASE_P to INSTANTIATE_TEST_SUITE_P and
added a "backwards compatibility" shim, but the shim fails at compile
time if you pass in an empty fourth argument.
5 years ago
Jeff 186dba45cb
Merge pull request #956 from notlesh/km-testing
Implement KeyManager tests
5 years ago
Jason Rhinelander 0497fb9ccb Another big-endian fix 5 years ago
Jason Rhinelander 5f642e4f01 Zero-initialize test array 5 years ago
Jeff 8230b1152e
Merge pull request #1072 from majestrate/2020-01-25-router-version
add router version
5 years ago
Jeff Becker 1318846a08
test/service/test_llarp_service_identity.cpp:
* remove failing irrelevent test
* add expect_call in EnsureKeys to match expected bevahior
5 years ago
Stephen Shelton 8921125924
Fix buffer overflow when version encodes too many integers 5 years ago
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.
5 years ago
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.
5 years ago
Jeff Becker 9153f726c5 const correctness 5 years ago
Stephen Shelton cfabe72587
Fix RouterVersion::IsEmpty() and RouterVersion::Clear() 5 years ago
Stephen Shelton f0571a9f2c
Fix IsCompatableWith() logic WRT emptyRouterVersion, add unit tests 5 years ago
Thomas Winget a487982c49 initial implementation of blinded sign -- not working yet 5 years ago
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.
5 years ago
Jeff Becker 0f13591802
does not work 5 years ago
Jeff Becker 99eb7726ff
initial dht key blinding 5 years ago
Jeff Becker 9efd796145
initial wack at 0.7.0 dht fixes 5 years ago
Jeff Becker 2c0dc12f39
refactor single char variables in DHT (mostly) 5 years ago
Jeff Becker 3b66cf6e75
dht fixes, disable iterative lookups on clients, revert "fixes" from 0.6.3, pass in recursion depth from introset lookup 5 years ago
Stephen Shelton 9a65f19bb0
Add test to ensure config loading impacts runtime log level 5 years ago
Stephen Shelton 43998f97c8
Add unit tests for LogLevelToName and LogLevelToString 5 years ago
Jeff Becker 28752f85b7
improve test cases 5 years ago
Jeff Becker 8d11519eb2
unit tests for logging levels 5 years ago
Rick V 636957f3f9
happy new year 5 years ago
Jeff Becker 562f3f07ab
add unit test for decaying hash set 5 years ago
Jason Rhinelander 1b710455a7 Disallow AlignedBuffer < 8 bytes; add oddball buffer sizes 5 years ago
Jeff Becker 16c7e7dd33 fix unit tests 5 years ago
Thomas Winget f4c9e09d44 remove obsolete timer-related code 5 years ago
Rick V ccd936feb1
the internal windows toolchain _already_ provides a default manifest 5 years ago
Rick V fd6602bf05
fix versiontag 5 years ago
Rick V e144d9e762
fix test suite 5 years ago
Rick V 6d49ffd60b
include all platform dependencies transitively 5 years ago
Rick V e15c57c114
get ready for v0.6
bump version

don't ship the shared object
5 years ago
Jeff Becker 9fa2b5c92a
remove undeeded test case 5 years ago
Jeff Becker fcf0ae2b9e
prune unused files. 5 years ago
Stephen Shelton 332f33b049 Remove FS_LIB conditionals 5 years ago
Stephen Shelton e3c752f4ab Another attempt to make travis-ci's xenial happy 5 years ago
Stephen Shelton 0dbbf30de5 Fix for travis-ci xenial build 5 years ago