i2p: use the same destination type for transient and persistent addresses #26065

pull vasild wants to merge 1 commits into bitcoin:master from vasild:i2p_transient_addr_type changing 1 files +2 −1
  1. vasild commented at 9:33 am on September 12, 2022: contributor

    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 https://github.com/bitcoin/bitcoin/issues/26062

  2. fanquake added the label P2P on Sep 12, 2022
  3. vasild referenced this in commit 2b781ad66e on Sep 12, 2022
  4. fanquake added this to the milestone 24.0 on Sep 12, 2022
  5. in src/i2p.cpp:382 in 5924a25a24 outdated
    377@@ -378,7 +378,7 @@ void Session::CreateIfNotCreatedAlready()
    378         // in the reply in DESTINATION=.
    379         const Reply& reply = SendRequestAndGetReply(
    380             *sock,
    381-            strprintf("SESSION CREATE STYLE=STREAM ID=%s DESTINATION=TRANSIENT", session_id));
    382+            strprintf("SESSION CREATE STYLE=STREAM ID=%s DESTINATION=TRANSIENT SIGNATURE_TYPE=7", session_id));
    


    jonatack commented at 9:52 am on September 12, 2022:

    Should this code doc in src/i2p.cpp be updated?

    0void Session::DestGenerate(const Sock& sock)
    1{
    2    // https://geti2p.net/spec/common-structures#key-certificates
    3    // "7" or "EdDSA_SHA512_Ed25519" - "Recent Router Identities and Destinations".
    4    // Use "7" because i2pd <2.24.0 does not recognize the textual form.
    5    const Reply& reply = SendRequestAndGetReply(sock, "DEST GENERATE SIGNATURE_TYPE=7", false);
    

    vasild commented at 10:24 am on September 12, 2022:
    Why?

    jonatack commented at 10:35 am on September 12, 2022:
    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."

    vasild commented at 10:56 am on September 12, 2022:
    Done.
  6. jonatack commented at 9:53 am on September 12, 2022: contributor
    Concept ACK
  7. i2p: use the same destination type for transient and persistent addresses
    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.
    8b2891a6d1
  8. vasild force-pushed on Sep 12, 2022
  9. vasild commented at 10:56 am on September 12, 2022: contributor
    5924a25a24...8b2891a6d1: extend comment, #26065 (review)
  10. sama11y approved
  11. sama11y commented at 10:15 am on September 13, 2022: none
    8b2891a6d10f4a3875010d2e8eafd78bcf378952
  12. bitcoin deleted a comment on Sep 13, 2022
  13. glozow requested review from mzumsande on Sep 15, 2022
  14. mzumsande commented at 4:05 pm on September 15, 2022: contributor

    ACK 8b2891a6d10f4a3875010d2e8eafd78bcf378952

    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.

  15. sipa commented at 6:19 pm on September 15, 2022: member

    utACK 8b2891a6d10f4a3875010d2e8eafd78bcf378952; didn’t test but verified this matches the documentation

    EDIT: apologies for the accidental close!

  16. sipa closed this on Sep 15, 2022

  17. sipa reopened this on Sep 15, 2022

  18. fanquake merged this on Sep 16, 2022
  19. fanquake closed this on Sep 16, 2022

  20. vasild deleted the branch on Sep 16, 2022
  21. sidhujag referenced this in commit 840db72540 on Sep 20, 2022
  22. bitcoin locked this on Sep 16, 2023


vasild jonatack sama11y mzumsande sipa


mzumsande

Labels
P2P

Milestone
24.0


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-09-29 01:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me