-
Notifications
You must be signed in to change notification settings - Fork 38.7k
i2p: use the same destination type for transient and persistent addresses #26065
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK
src/i2p.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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);There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
…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
|
|
sama11y
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
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. |
|
utACK 8b2891a; didn't test but verified this matches the documentation EDIT: apologies for the accidental close! |
… 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
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