6 Commits

Author SHA1 Message Date
Arnaud
99884b5971
Rename Codex to Logos Storage (#108) 2025-12-15 13:46:04 +01:00
Jacek Sieka
6c7de03622
chore: bump stew et al (#107)
* fix use of deprecated imports
* bump stew
* `results` is its own package
* drop protobuf_serialization
* force leveldb version
2025-12-11 13:47:10 +01:00
Eric
14d4dd97e9
toBytes -> toBytesBE 2025-02-13 12:15:00 +11:00
Eric
bc27eebb85
fix pinned deps
Leaving nim-datastore as a commit hash until it has a relevant release tag
2025-02-13 12:08:09 +11:00
Csaba Kiraly
91b2eaec89
Fix: arrive to working keys in case of simultaneous cross connect (#84)
* improve tracing of message exchange

run e.g. as
```
nim c -r -d:debug -d:chronicles_enabled=on -d:chronicles_log_level=TRACE -d:chronicles_sinks=textlines[nocolors,stdout] tests/dht/test_providers.nim >err
```

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>

* add debug on Handshake timeour

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>

* queue messages during handshake and send later

If a handshake was already in progress, messages were dropped.
Instead of this, it is better to queue these and send as soon
as the handshake is finished and thus the encryption key is known.

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>

* rename handshakeInProgress to keyexchangeInProgress

Handshake is also a name of a message, which makes previous
name less clear.

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>

* keyexchangeInProgress: do not remove on handshake received

This is the wrong direction, not needed

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>

* fix cross-connect key exchange

Since key exchange can be started both ways simultaneously, and
these might not get finalised with UDP transport, we can't be
sure what encryption key will be used by the other side:
- the one derived in the key-exchange started by us,
- the one derived in the key-exchange started by the other node.
To alleviate this issue, we store two decryption keys in each session.

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>

---------

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2023-11-17 11:50:28 -08:00
Jaremy Creechley
c3d073c3da
finishing renaming 2023-07-12 14:57:26 -07:00