diff options
author | fanquake <fanquake@gmail.com> | 2022-09-16 09:13:15 +0100 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2022-09-16 09:13:49 +0100 |
commit | 19526d937fbd16b3c868f4a7ecd2c076e71eb8fc (patch) | |
tree | 8514c4d88f7d507b0dafd110a8f569515c433fb3 /src | |
parent | 27351fb9159ecbbac358b86fd9d00c90b1d9a3bc (diff) | |
parent | 8b2891a6d10f4a3875010d2e8eafd78bcf378952 (diff) | |
download | bitcoin-19526d937fbd16b3c868f4a7ecd2c076e71eb8fc.tar.xz |
Merge bitcoin/bitcoin#26065: i2p: use the same destination type for transient and persistent addresses
8b2891a6d10f4a3875010d2e8eafd78bcf378952 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 https://github.com/bitcoin/bitcoin/issues/26062
ACKs for top commit:
mzumsande:
ACK 8b2891a6d10f4a3875010d2e8eafd78bcf378952
sipa:
utACK 8b2891a6d10f4a3875010d2e8eafd78bcf378952; didn't test but verified this matches the documentation
Tree-SHA512: 1b10e7e1e274b77609d08ee9cf9d73fef8c975c51aec452ce23e15fcf41709398c697087bfdece121b1fd26bc0501fc45857a91aaab679cadd0cbb37dd94c3a7
Diffstat (limited to 'src')
-rw-r--r-- | src/i2p.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/i2p.cpp b/src/i2p.cpp index f7d480988b..28be8009dc 100644 --- a/src/i2p.cpp +++ b/src/i2p.cpp @@ -325,6 +325,7 @@ 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. + // If SIGNATURE_TYPE is not specified, then the default one is DSA_SHA1. const Reply& reply = SendRequestAndGetReply(sock, "DEST GENERATE SIGNATURE_TYPE=7", false); m_private_key = DecodeI2PBase64(reply.Get("PRIV")); @@ -378,7 +379,7 @@ void Session::CreateIfNotCreatedAlready() // in the reply in DESTINATION=. const Reply& reply = SendRequestAndGetReply( *sock, - strprintf("SESSION CREATE STYLE=STREAM ID=%s DESTINATION=TRANSIENT", session_id)); + strprintf("SESSION CREATE STYLE=STREAM ID=%s DESTINATION=TRANSIENT SIGNATURE_TYPE=7", session_id)); m_private_key = DecodeI2PBase64(reply.Get("DESTINATION")); } else { |