| 1 | /* |
| 2 | * Copyright (c) 2014, Yawning Angel <yawning at schwanenlied dot me> |
| 3 | * All rights reserved. |
| 4 | * |
| 5 | * Redistribution and use in source and binary forms, with or without |
| 6 | * modification, are permitted provided that the following conditions are met: |
| 7 | * |
| 8 | * * Redistributions of source code must retain the above copyright notice, |
| 9 | * this list of conditions and the following disclaimer. |
| 10 | * |
| 11 | * * Redistributions in binary form must reproduce the above copyright notice, |
| 12 | * this list of conditions and the following disclaimer in the documentation |
| 13 | * and/or other materials provided with the distribution. |
| 14 | * |
| 15 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 16 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 17 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 18 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE |
| 19 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 20 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 21 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 24 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 25 | * POSSIBILITY OF SUCH DAMAGE. |
| 26 | */ |
| 27 | |
| 28 | package uniformdhscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/ |
| 29 | |
| 30 | import ( |
| 31 | "bytesscip-go gomod github.com/golang/go/src go1.22.0 bytes/" |
| 32 | "crypto/randscip-go gomod github.com/golang/go/src go1.22.0 `crypto/rand`/" |
| 33 | "encoding/hexscip-go gomod github.com/golang/go/src go1.22.0 `encoding/hex`/" |
| 34 | "testingscip-go gomod github.com/golang/go/src go1.22.0 testing/" |
| 35 | ) |
| 36 | |
| 37 | const ( |
| 38 | xPrivStrscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/xPrivStr. = "6f592d676f536874746f20686e6b776f" + |
| 39 | "20736874206561676574202e6f592d67" + |
| 40 | "6f536874746f20687369742065686720" + |
| 41 | "74612e655920676f532d746f6f686874" + |
| 42 | "6920207368742065656b20796e612064" + |
| 43 | "7567726169646e616f20206668742065" + |
| 44 | "61676574202e61507473202c72707365" + |
| 45 | "6e652c746620747572752c6561206c6c" + |
| 46 | "612065726f20656e6920206e6f592d67" + |
| 47 | "6f536874746f2e68482020656e6b776f" + |
| 48 | "2073687772652065687420656c4f2064" + |
| 49 | "6e4f736562206f72656b74207268756f" |
| 50 | |
| 51 | xPubStrscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/xPubStr. = "76a3d17d5c55b03e865fa3e8267990a7" + |
| 52 | "24baa24b0bdd0cc4af93be8de30be120" + |
| 53 | "d5533c91bf63ef923b02edcb84b74438" + |
| 54 | "3f7de232cca6eb46d07cad83dcaa317f" + |
| 55 | "becbc68ca13e2c4019e6a36531067450" + |
| 56 | "04aecc0be1dff0a78733fb0e7d5cb7c4" + |
| 57 | "97cab77b1331bf347e5f3a7847aa0bc0" + |
| 58 | "f4bc64146b48407fed7b931d16972d25" + |
| 59 | "fb4da5e6dc074ce2a58daa8de7624247" + |
| 60 | "cdf2ebe4e4dfec6d5989aac778c87559" + |
| 61 | "d3213d6040d4111ce3a2acae19f9ee15" + |
| 62 | "32509e037f69b252fdc30243cbbce9d0" |
| 63 | |
| 64 | yPrivStrscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/yPrivStr. = "736562206f72656b74207268756f6867" + |
| 65 | "6f2020666c6f2c646120646e77206568" + |
| 66 | "657254206568207968736c61206c7262" + |
| 67 | "6165206b68746f726775206867616961" + |
| 68 | "2e6e482020656e6b776f207368777265" + |
| 69 | "2065685479656820766120657274646f" + |
| 70 | "652072616874732766206569646c2c73" + |
| 71 | "6120646e772065686572542065682079" + |
| 72 | "74736c69206c72746165206468746d65" + |
| 73 | "202c6e612064687720796f6e6f20656e" + |
| 74 | "63206e61622068656c6f206468546d65" + |
| 75 | "61202073685479657420657264610a2e" |
| 76 | |
| 77 | yPubStrscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/yPubStr. = "d04e156e554c37ffd7aba749df662350" + |
| 78 | "1e4ff4466cb12be055617c1a36872237" + |
| 79 | "36d2c3fdce9ee0f9b27774350849112a" + |
| 80 | "a5aeb1f126811c9c2f3a9cb13d2f0c3a" + |
| 81 | "7e6fa2d3bf71baf50d839171534f227e" + |
| 82 | "fbb2ce4227a38c25abdc5ba7fc430111" + |
| 83 | "3a2cb2069c9b305faac4b72bf21fec71" + |
| 84 | "578a9c369bcac84e1a7dcf0754e342f5" + |
| 85 | "bc8fe4917441b88254435e2abaf297e9" + |
| 86 | "3e1e57968672d45bd7d4c8ba1bc3d314" + |
| 87 | "889b5bc3d3e4ea33d4f2dfdd34e5e5a7" + |
| 88 | "2ff24ee46316d4757dad09366a0b66b3" |
| 89 | |
| 90 | ssStrscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/ssStr. = "78afaf5f457f1fdb832bebc397644a33" + |
| 91 | "038be9dba10ca2ce4a076f327f3a0ce3" + |
| 92 | "151d477b869ee7ac467755292ad8a77d" + |
| 93 | "b9bd87ffbbc39955bcfb03b1583888c8" + |
| 94 | "fd037834ff3f401d463c10f899aa6378" + |
| 95 | "445140b7f8386a7d509e7b9db19b677f" + |
| 96 | "062a7a1a4e1509604d7a0839ccd5da61" + |
| 97 | "73e10afd9eab6dda74539d60493ca37f" + |
| 98 | "a5c98cd9640b409cd8bb3be2bc5136fd" + |
| 99 | "42e764fc3f3c0ddb8db3d87abcf2e659" + |
| 100 | "8d2b101bef7a56f50ebc658f9df1287d" + |
| 101 | "a81359543e77e4a4cfa7598a4152e4c0" |
| 102 | ) |
| 103 | |
| 104 | var xPrivscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/xPriv., xPubscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/xPub., yPrivscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/yPriv., yPubscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/yPub., ssscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/ss. []byte |
| 105 | |
| 106 | // TestGenerateKeyOdd tests creating a UniformDH keypair with a odd private |
| 107 | // key. |
| 108 | func TestGenerateKeyOddscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/TestGenerateKeyOdd().(t *testingscip-go gomod github.com/golang/go/src go1.22.0 testing/.Tscip-go gomod github.com/golang/go/src go1.22.0 testing/T#) { |
| 109 | xX, err := generateKeyscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/generateKey().(xPrivscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/xPriv.) |
| 110 | if err != nil { |
| 111 | t.Fatalscip-go gomod github.com/golang/go/src go1.22.0 testing/common#Fatal().("generateKey(xPriv) failed:", err) |
| 112 | } |
| 113 | |
| 114 | xPubGen, err := xX.PublicKeyscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/PrivateKey#PublicKey..Bytesscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/PublicKey#Bytes().() |
| 115 | if err != nil { |
| 116 | t.Fatalscip-go gomod github.com/golang/go/src go1.22.0 testing/common#Fatal().("xX.PublicKey.Bytes() failed:", err) |
| 117 | } |
| 118 | if 0 != bytesscip-go gomod github.com/golang/go/src go1.22.0 bytes/.Comparescip-go gomod github.com/golang/go/src go1.22.0 bytes/Compare().(xPubGen, xPubscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/xPub.) { |
| 119 | t.Fatalscip-go gomod github.com/golang/go/src go1.22.0 testing/common#Fatal().("Generated public key does not match known answer") |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | // TestGenerateKeyEven tests creating a UniformDH keypair with a even private |
| 124 | // key. |
| 125 | func TestGenerateKeyEvenscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/TestGenerateKeyEven().(t *testingscip-go gomod github.com/golang/go/src go1.22.0 testing/.Tscip-go gomod github.com/golang/go/src go1.22.0 testing/T#) { |
| 126 | yY, err := generateKeyscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/generateKey().(yPrivscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/yPriv.) |
| 127 | if err != nil { |
| 128 | t.Fatalscip-go gomod github.com/golang/go/src go1.22.0 testing/common#Fatal().("generateKey(yPriv) failed:", err) |
| 129 | } |
| 130 | |
| 131 | yPubGen, err := yY.PublicKeyscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/PrivateKey#PublicKey..Bytesscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/PublicKey#Bytes().() |
| 132 | if err != nil { |
| 133 | t.Fatalscip-go gomod github.com/golang/go/src go1.22.0 testing/common#Fatal().("yY.PublicKey.Bytes() failed:", err) |
| 134 | } |
| 135 | if 0 != bytesscip-go gomod github.com/golang/go/src go1.22.0 bytes/.Comparescip-go gomod github.com/golang/go/src go1.22.0 bytes/Compare().(yPubGen, yPubscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/yPub.) { |
| 136 | t.Fatalscip-go gomod github.com/golang/go/src go1.22.0 testing/common#Fatal().("Generated public key does not match known answer") |
| 137 | } |
| 138 | } |
| 139 | |
| 140 | // TestHandshake tests conductiong a UniformDH handshake with know values. |
| 141 | func TestHandshakescip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/TestHandshake().(t *testingscip-go gomod github.com/golang/go/src go1.22.0 testing/.Tscip-go gomod github.com/golang/go/src go1.22.0 testing/T#) { |
| 142 | xX, err := generateKeyscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/generateKey().(xPrivscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/xPriv.) |
| 143 | if err != nil { |
| 144 | t.Fatalscip-go gomod github.com/golang/go/src go1.22.0 testing/common#Fatal().("generateKey(xPriv) failed:", err) |
| 145 | } |
| 146 | yY, err := generateKeyscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/generateKey().(yPrivscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/yPriv.) |
| 147 | if err != nil { |
| 148 | t.Fatalscip-go gomod github.com/golang/go/src go1.22.0 testing/common#Fatal().("generateKey(yPriv) failed:", err) |
| 149 | } |
| 150 | |
| 151 | xY, err := Handshakescip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/Handshake().(xX, &yY.PublicKeyscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/PrivateKey#PublicKey.) |
| 152 | if err != nil { |
| 153 | t.Fatalscip-go gomod github.com/golang/go/src go1.22.0 testing/common#Fatal().("Handshake(xX, yY.PublicKey) failed:", err) |
| 154 | } |
| 155 | yX, err := Handshakescip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/Handshake().(yY, &xX.PublicKeyscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/PrivateKey#PublicKey.) |
| 156 | if err != nil { |
| 157 | t.Fatalscip-go gomod github.com/golang/go/src go1.22.0 testing/common#Fatal().("Handshake(yY, xX.PublicKey) failed:", err) |
| 158 | } |
| 159 | |
| 160 | if 0 != bytesscip-go gomod github.com/golang/go/src go1.22.0 bytes/.Comparescip-go gomod github.com/golang/go/src go1.22.0 bytes/Compare().(xY, yX) { |
| 161 | t.Fatalscip-go gomod github.com/golang/go/src go1.22.0 testing/common#Fatal().("Generated shared secrets do not match between peers") |
| 162 | } |
| 163 | if 0 != bytesscip-go gomod github.com/golang/go/src go1.22.0 bytes/.Comparescip-go gomod github.com/golang/go/src go1.22.0 bytes/Compare().(xY, ssscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/ss.) { |
| 164 | t.Fatalscip-go gomod github.com/golang/go/src go1.22.0 testing/common#Fatal().("Generated shared secret does not match known value") |
| 165 | } |
| 166 | } |
| 167 | |
| 168 | // Benchmark UniformDH key generation + exchange. THe actual time taken per |
| 169 | // peer is half of the reported time as this does 2 key generation an |
| 170 | // handshake operations. |
| 171 | func BenchmarkHandshakescip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/BenchmarkHandshake().(b *testingscip-go gomod github.com/golang/go/src go1.22.0 testing/.Bscip-go gomod github.com/golang/go/src go1.22.0 testing/B#) { |
| 172 | for i := 0; i < b.Nscip-go gomod github.com/golang/go/src go1.22.0 testing/B#N.; i++ { |
| 173 | xX, err := GenerateKeyscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/GenerateKey().(randscip-go gomod github.com/golang/go/src go1.22.0 `crypto/rand`/.Readerscip-go gomod github.com/golang/go/src go1.22.0 `crypto/rand`/Reader.) |
| 174 | if err != nil { |
| 175 | b.Fatalscip-go gomod github.com/golang/go/src go1.22.0 testing/common#Fatal().("Failed to generate xX keypair", err) |
| 176 | } |
| 177 | |
| 178 | yY, err := GenerateKeyscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/GenerateKey().(randscip-go gomod github.com/golang/go/src go1.22.0 `crypto/rand`/.Readerscip-go gomod github.com/golang/go/src go1.22.0 `crypto/rand`/Reader.) |
| 179 | if err != nil { |
| 180 | b.Fatalscip-go gomod github.com/golang/go/src go1.22.0 testing/common#Fatal().("Failed to generate yY keypair", err) |
| 181 | } |
| 182 | |
| 183 | xY, err := Handshakescip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/Handshake().(xX, &yY.PublicKeyscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/PrivateKey#PublicKey.) |
| 184 | if err != nil { |
| 185 | b.Fatalscip-go gomod github.com/golang/go/src go1.22.0 testing/common#Fatal().("Handshake(xX, yY.PublicKey) failed:", err) |
| 186 | } |
| 187 | yX, err := Handshakescip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/Handshake().(yY, &xX.PublicKeyscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/PrivateKey#PublicKey.) |
| 188 | if err != nil { |
| 189 | b.Fatalscip-go gomod github.com/golang/go/src go1.22.0 testing/common#Fatal().("Handshake(yY, xX.PublicKey) failed:", err) |
| 190 | } |
| 191 | |
| 192 | _ = xY |
| 193 | _ = yX |
| 194 | } |
| 195 | } |
| 196 | |
| 197 | func initscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/init().() { |
| 198 | // Load the test vectors into byte slices. |
| 199 | var err error |
| 200 | xPrivscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/xPriv., err = hexscip-go gomod github.com/golang/go/src go1.22.0 `encoding/hex`/.DecodeStringscip-go gomod github.com/golang/go/src go1.22.0 `encoding/hex`/DecodeString().(xPrivStrscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/xPrivStr.) |
| 201 | if err != nil { |
| 202 | panic("hex.DecodeString(xPrivStr) failed") |
| 203 | } |
| 204 | xPubscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/xPub., err = hexscip-go gomod github.com/golang/go/src go1.22.0 `encoding/hex`/.DecodeStringscip-go gomod github.com/golang/go/src go1.22.0 `encoding/hex`/DecodeString().(xPubStrscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/xPubStr.) |
| 205 | if err != nil { |
| 206 | panic("hex.DecodeString(xPubStr) failed") |
| 207 | } |
| 208 | yPrivscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/yPriv., err = hexscip-go gomod github.com/golang/go/src go1.22.0 `encoding/hex`/.DecodeStringscip-go gomod github.com/golang/go/src go1.22.0 `encoding/hex`/DecodeString().(yPrivStrscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/yPrivStr.) |
| 209 | if err != nil { |
| 210 | panic("hex.DecodeString(yPrivStr) failed") |
| 211 | } |
| 212 | yPubscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/yPub., err = hexscip-go gomod github.com/golang/go/src go1.22.0 `encoding/hex`/.DecodeStringscip-go gomod github.com/golang/go/src go1.22.0 `encoding/hex`/DecodeString().(yPubStrscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/yPubStr.) |
| 213 | if err != nil { |
| 214 | panic("hex.DecodeString(yPubStr) failed") |
| 215 | } |
| 216 | ssscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/ss., err = hexscip-go gomod github.com/golang/go/src go1.22.0 `encoding/hex`/.DecodeStringscip-go gomod github.com/golang/go/src go1.22.0 `encoding/hex`/DecodeString().(ssStrscip-go gomod gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird . `gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/common/uniformdh`/ssStr.) |
| 217 | if err != nil { |
| 218 | panic("hex.DecodeString(ssStr) failed") |
| 219 | } |
| 220 | } |