Skip to content

Conversation

@vasild
Copy link
Contributor

@vasild vasild commented Sep 12, 2022

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 #26062

@fanquake fanquake added the P2P label Sep 12, 2022
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.
@fanquake fanquake added this to the 24.0 milestone Sep 12, 2022
Copy link
Member

@jonatack jonatack left a 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
Copy link
Member

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);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Member

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."

Copy link
Contributor Author

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.
@vasild vasild force-pushed the i2p_transient_addr_type branch from 5924a25 to 8b2891a Compare September 12, 2022 10:56
@vasild
Copy link
Contributor Author

vasild commented Sep 12, 2022

5924a25a24...8b2891a6d1: extend comment, #26065 (comment)

Copy link

@sama11y sama11y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bitcoin bitcoin deleted a comment from sama11y Sep 13, 2022
@glozow glozow requested a review from mzumsande September 15, 2022 10:20
@mzumsande
Copy link
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.

@sipa
Copy link
Member

sipa commented Sep 15, 2022

utACK 8b2891a; didn't test but verified this matches the documentation

EDIT: apologies for the accidental close!

@sipa sipa closed this Sep 15, 2022
@sipa sipa reopened this Sep 15, 2022
@fanquake fanquake merged commit 19526d9 into bitcoin:master Sep 16, 2022
@vasild vasild deleted the i2p_transient_addr_type branch September 16, 2022 09:16
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
@ghost ghost mentioned this pull request Sep 29, 2022
@bitcoin bitcoin locked and limited conversation to collaborators Sep 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

I2P: Transient destinations should be SIGNATURE_TYPE=7

6 participants