i2p: use the same destination type for transient and persistent addresses#26065
Merged
fanquake merged 1 commit intobitcoin:masterfrom Sep 16, 2022
Merged
i2p: use the same destination type for transient and persistent addresses#26065fanquake merged 1 commit intobitcoin:masterfrom
fanquake merged 1 commit intobitcoin:masterfrom
Conversation
vasild
referenced
this pull request
Sep 12, 2022
Instead of providing our destination (private key) to the I2P proxy when creating the session, ask it to generate one for us and do not save it on disk.
jonatack
reviewed
Sep 12, 2022
src/i2p.cpp
Outdated
Member
There was a problem hiding this comment.
Should this code doc in src/i2p.cpp be updated?
void Session::DestGenerate(const Sock& sock)
{
// https://geti2p.net/spec/common-structures#key-certificates
// "7" or "EdDSA_SHA512_Ed25519" - "Recent Router Identities and Destinations".
// Use "7" because i2pd <2.24.0 does not recognize the textual form.
const Reply& reply = SendRequestAndGetReply(sock, "DEST GENERATE SIGNATURE_TYPE=7", false);
Member
There was a problem hiding this comment.
It might be good to state in one of the two places (e.g., maybe here before the Use "7" line) why SIGNATURE_TYPE needs to be specified, e.g. "If not specified, then the default one is DSA_SHA1 according to https://geti2p.net/en/docs/api/samv3."
…sses We generate our persistent I2P address with type `EdDSA_SHA512_Ed25519` (`DEST GENERATE SIGNATURE_TYPE=7`). Use the same type for our transient addresses which are created by the `SESSION CREATE ...` command. If not specified, then the default one is `DSA_SHA1` according to https://geti2p.net/en/docs/api/samv3.
5924a25 to
8b2891a
Compare
Contributor
Author
|
|
sama11y
approved these changes
Sep 13, 2022
Contributor
|
ACK 8b2891a Not too familiar with the details here, but the change matches the description in the i2p documentation and I tested that transient connections still work. |
Member
|
utACK 8b2891a; didn't test but verified this matches the documentation EDIT: apologies for the accidental close! |
sidhujag
pushed a commit
to syscoin/syscoin
that referenced
this pull request
Sep 20, 2022
… and persistent addresses 8b2891a i2p: use the same destination type for transient and persistent addresses (Vasil Dimov) Pull request description: We generate our persistent I2P address with type `EdDSA_SHA512_Ed25519` (`DEST GENERATE SIGNATURE_TYPE=7`). Use the same type for our transient addresses which are created by the `SESSION CREATE ...` command. If not specified, then the default one is `DSA_SHA1` according to https://geti2p.net/en/docs/api/samv3. Fixes bitcoin#26062 ACKs for top commit: mzumsande: ACK 8b2891a sipa: utACK 8b2891a; didn't test but verified this matches the documentation Tree-SHA512: 1b10e7e1e274b77609d08ee9cf9d73fef8c975c51aec452ce23e15fcf41709398c697087bfdece121b1fd26bc0501fc45857a91aaab679cadd0cbb37dd94c3a7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We generate our persistent I2P address with type
EdDSA_SHA512_Ed25519(DEST GENERATE SIGNATURE_TYPE=7).Use the same type for our transient addresses which are created by the
SESSION CREATE ...command. If not specified, then the default one isDSA_SHA1according to https://geti2p.net/en/docs/api/samv3.Fixes #26062