summaryrefslogtreecommitdiff
path: root/7e/5f50cfdfd0c4ea566be4adee4b79ceeb3ad57d
blob: f63410d3f4b1adda74b894ee2f91e2293bcb3304 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
Return-Path: <vitteaymeric@gmail.com>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
	[172.17.192.35])
	by mail.linuxfoundation.org (Postfix) with ESMTPS id E2085C6E
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Wed,  6 Mar 2019 10:37:59 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.7.6
Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com
	[209.85.221.41])
	by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 72C2B12E
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Wed,  6 Mar 2019 10:37:58 +0000 (UTC)
Received: by mail-wr1-f41.google.com with SMTP id w6so12793372wrs.4
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Wed, 06 Mar 2019 02:37:58 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
	h=subject:references:to:from:openpgp:autocrypt:message-id:date
	:user-agent:mime-version:in-reply-to:content-language;
	bh=fMQEJW1ibYkgsU656jJ1vFl9UzWe8JnC6BYz/MnpPpg=;
	b=ntKFWzP416okG/AJzRyBhsj+myqCK0JQPri8L0NjOi3G6hfaeyX2P+rpY9KgcBrqRI
	nTP2NtrlgxG+OYQkrGS+RHZotBblh9eCLo8I2VLCFEQoWwJxDG9TM4Hk0S6oPL4LiQa+
	X0xreuwPcGeevZ05hu1QptocORMCBvajTuGN1XBm54H5AGx2keXEQfHeMXcqpEtrBRoV
	xWvUQwY1VfyewAlHCsh5A+865uPoqJLURBXt3baV98r2iB4N35Q9+6YGvdBLrPuZNZFr
	WzSirb+JQq3YThoUTfVQUHMm6qyqTOcw/l20/yeOVI3swVd5VP0d8fHAgPJ126oDpRPU
	oz5Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:subject:references:to:from:openpgp:autocrypt
	:message-id:date:user-agent:mime-version:in-reply-to
	:content-language;
	bh=fMQEJW1ibYkgsU656jJ1vFl9UzWe8JnC6BYz/MnpPpg=;
	b=T2wdCAQuLLUN/TdiCb6D5RCCWaubWgMEqusiYnYII/1eptY95evYTaARoAWwzRoeFs
	zat7KKFbCQ4cYISCU18cwnaGfIJQterh4AS5dB4pX/GwD8uLDHlDQp/uPtMTKdApXPPD
	S55iinRUMYcjvBF1AsHO3/yKYrNix1Z9TnLRk3RkQM5IJEzlBQNXGZxBMk2bpoHfROAe
	D/Q7w1CWcnzzKsjz5ef3ruzuD4VKpv9MThFpDDhhpWTfF+hrTe1XCSWozFkb+KgUIu2g
	lUYRy60MrmSAJSrXX35TS+okZEmsNh+dnd5OHeftbVymCXaisNPletmz76PmS+P8jFP9
	mWFw==
X-Gm-Message-State: APjAAAVAe6E07o+aWKqwPYpjqn7J+koG3ZjDR0p6vKY1EqDYeAQry78d
	mVzoMa+i+RJMzNilMuXOYBcryNcy
X-Google-Smtp-Source: APXvYqz7ZCfm/x3sS9sAgZztbxB4pTTL49uxsdXK1hkPzWIA5kVCRzXnv2nCFuyfMv5JDL54fl8iKw==
X-Received: by 2002:adf:f792:: with SMTP id q18mr2346571wrp.324.1551868676853; 
	Wed, 06 Mar 2019 02:37:56 -0800 (PST)
Received: from ?IPv6:2a01:cb1d:44:6500:9d6d:71b2:cb71:cb17?
	([2a01:cb1d:44:6500:9d6d:71b2:cb71:cb17])
	by smtp.googlemail.com with ESMTPSA id
	z129sm1770464wmc.33.2019.03.06.02.37.55
	for <bitcoin-dev@lists.linuxfoundation.org>
	(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
	Wed, 06 Mar 2019 02:37:56 -0800 (PST)
References: <CAK=nyAwFtdV1e4ecu8hq+efDo0TXqrVDw=rLRCur0t8_07O-CA@mail.gmail.com>
To: Bitcoin Dev <bitcoin-dev@lists.linuxfoundation.org>
From: Aymeric Vitte <vitteaymeric@gmail.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ad06059ab@gmail.com>
Date: Wed, 6 Mar 2019 11:37:59 +0100
User-Agent: Mozilla/5.0 (Windows NT 6.3; rv:60.0) Gecko/20100101
	Thunderbird/60.5.1
MIME-Version: 1.0
In-Reply-To: <CAK=nyAwFtdV1e4ecu8hq+efDo0TXqrVDw=rLRCur0t8_07O-CA@mail.gmail.com>
Content-Type: multipart/alternative;
	boundary="------------6389F4B7F43C85200D8AB63D"
Content-Language: fr
X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,
	DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, HTML_MESSAGE,
	RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
	smtp1.linux-foundation.org
X-Mailman-Approved-At: Wed, 06 Mar 2019 14:36:47 +0000
Subject: [bitcoin-dev] Fwd: BIP proposal - Signatures of Messages using
 Bitcoin Private Keys
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Bitcoin Protocol Discussion <bitcoin-dev.lists.linuxfoundation.org>
List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=subscribe>
X-List-Received-Date: Wed, 06 Mar 2019 10:38:00 -0000

This is a multi-part message in MIME format.
--------------6389F4B7F43C85200D8AB63D
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

Re-sending to the list since it never made it

BIP or not, at least this process desserves to be documented precisely


-------- Message transféré --------
Sujet : 	Re: [bitcoin-dev] BIP proposal - Signatures of Messages using
Bitcoin Private Keys
Date : 	Mon, 18 Feb 2019 16:29:34 -0800
De : 	Christopher Gilliard <christopher.gilliard@gmail.com>
Pour : 	Aymeric Vitte <vitteaymeric@gmail.com>
Copie à : 	Bitcoin Protocol Discussion
<bitcoin-dev@lists.linuxfoundation.org>



Trying the four possible options (p2pkh compressed, p2pkh uncompressed,
seg3, and bech32) is certainly a possibility and in fact, that's what I
ended up doing because not every wallet implements something like this,
but if there is a header field currently in use, it seemed reasonable to
me to use it specify which type of key is being used. If the header
includes whether the key is compressed or not compressed it seems
logical to include all data about what type of key it is and not just
this one type of information. That's why I thought the solution made
sense and I wrote it up.

On Mon, Feb 18, 2019 at 3:50 PM Aymeric Vitte <vitteaymeric@gmail.com
<mailto:vitteaymeric@gmail.com>> wrote:

    Ah, OK, that's of course a good thing to document this undocumented
    (and strange) stuff, as a matter of fact I implemented it after
    reading your post (because this was on my todo list since some time)
    and got annoyed quickly, mainly by what is doing
    formatMessageForSigning (which is quite trivial when you know it but
    would be good to document precisely)

    So, yes, it's a good idea to write this, regarding the header I
    still don't see the use, testing the different possibilities is not
    a big deal, why the signature format is not the same as transactions
    one is mysterious too

    Le 19/02/2019 à 00:24, Christopher Gilliard a écrit :
>     The proposal includes actual code that does verification, but I
>     didn't include code for signing. I thought it could be inferred,
>     but I could at least include a description of how to sign. I am
>     not sure exactly what part you are referring to by "keys speech",
>     but the signatures are done by ECDSA keys so it's hard to not
>     include anything about keys even though that's not the main topic.
>     The "Background on ECDSA keys" section was mainly meant to give
>     background about what kind of keys Bitcoin uses, for people who
>     already know that they can easily skip this section so I would
>     probably think it's best just to leave in.  Maybe it should be at
>     the end as an addendum though. Yes, I did not invent any of this,
>     I'm just documenting what people actually seem to do because I had
>     to verify signatures as part of a project I'm working on. I would
>     have liked to have had this document when I started the project so
>     I thought it might be useful to others since as far as I can tell
>     this was not specified anywhere. The reason for including this
>     data in the header is the same that compressed/uncompressed is
>     included in the header so that you know which type of key the
>     signature is from and you don't have to try all options to see if
>     any matches. This is why Trezor did that way and why I documented
>     it. I'm sure there are other ways to do this, but since this is
>     out there in the field being used and is a reasonable solution, I
>     thought I'd write it up.
>
>     On Mon, Feb 18, 2019 at 2:59 PM Aymeric Vitte
>     <vitteaymeric@gmail.com <mailto:vitteaymeric@gmail.com>> wrote:
>
>         Then, since you wrote this proposal, maybe you should add the
>         very precise description of the signing/verification process
>         since it is documented nowhere
>
>         I don't get the use of the speech regarding keys while it
>         should focus on signatures which are summarized in a vague
>         sentence inspired by your ref [2] with a not very logical link
>         to the next paragraph stating that r,s should be 32B and the
>         whole thing 65B with a header of 1B, you did not invent it,
>         that's probably the rule, not sure where it is specified again
>         and for what purpose, the header seems completely of no use
>         especially when you extend to segwit/bech32 since you just
>         have to check that related compressed key matches
>
>         Le 17/02/2019 à 15:14, Christopher Gilliard via bitcoin-dev a
>         écrit :
>>         I have written up a proposed BIP. It has to do with Signature
>>         formats when using Bitcoin Private keys. It is
>>         here: https://github.com/cgilliard/BIP/blob/master/README.md
>>
>>         This BIP was written up as suggested in this github
>>         issue: https://github.com/bitcoin/bitcoin/issues/10542
>>
>>         Note that the proposal is inline with the implementation that
>>         Trezor implemented in the above issue.
>>
>>         Any feedback would be appreciated. Please let me know what
>>         the steps are with regards to getting a BIP number assigned
>>         or any other process steps required.
>>
>>         Regards,
>>         Chris
>>
>>         _______________________________________________
>>         bitcoin-dev mailing list
>>         bitcoin-dev@lists.linuxfoundation.org <mailto:bitcoin-dev@lists.linuxfoundation.org>
>>         https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>
>         -- 
>         Move your coins by yourself (browser version): https://peersm.com/wallet
>         Bitcoin transactions made simple: https://github.com/Ayms/bitcoin-transactions
>         Zcash wallets made simple: https://github.com/Ayms/zcash-wallets
>         Bitcoin wallets made simple: https://github.com/Ayms/bitcoin-wallets
>         Get the torrent dynamic blocklist: http://peersm.com/getblocklist
>         Check the 10 M passwords list: http://peersm.com/findmyass
>         Anti-spies and private torrents, dynamic blocklist: http://torrent-live.org
>         Peersm : http://www.peersm.com
>         torrent-live: https://github.com/Ayms/torrent-live
>         node-Tor : https://www.github.com/Ayms/node-Tor
>         GitHub : https://www.github.com/Ayms
>
    -- 
    Move your coins by yourself (browser version): https://peersm.com/wallet
    Bitcoin transactions made simple: https://github.com/Ayms/bitcoin-transactions
    Zcash wallets made simple: https://github.com/Ayms/zcash-wallets
    Bitcoin wallets made simple: https://github.com/Ayms/bitcoin-wallets
    Get the torrent dynamic blocklist: http://peersm.com/getblocklist
    Check the 10 M passwords list: http://peersm.com/findmyass
    Anti-spies and private torrents, dynamic blocklist: http://torrent-live.org
    Peersm : http://www.peersm.com
    torrent-live: https://github.com/Ayms/torrent-live
    node-Tor : https://www.github.com/Ayms/node-Tor
    GitHub : https://www.github.com/Ayms


--------------6389F4B7F43C85200D8AB63D
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit

<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Re-sending to the list since it never made it</p>
    <p>BIP or not, at least this process desserves to be documented
      precisely<br>
    </p>
    <div class="moz-forward-container"><br>
      -------- Message transféré --------
      <table class="moz-email-headers-table" cellspacing="0"
        cellpadding="0" border="0">
        <tbody>
          <tr>
            <th valign="BASELINE" nowrap="nowrap" align="RIGHT">Sujet :
            </th>
            <td>Re: [bitcoin-dev] BIP proposal - Signatures of Messages
              using Bitcoin Private Keys</td>
          </tr>
          <tr>
            <th valign="BASELINE" nowrap="nowrap" align="RIGHT">Date : </th>
            <td>Mon, 18 Feb 2019 16:29:34 -0800</td>
          </tr>
          <tr>
            <th valign="BASELINE" nowrap="nowrap" align="RIGHT">De : </th>
            <td>Christopher Gilliard
              <a class="moz-txt-link-rfc2396E" href="mailto:christopher.gilliard@gmail.com">&lt;christopher.gilliard@gmail.com&gt;</a></td>
          </tr>
          <tr>
            <th valign="BASELINE" nowrap="nowrap" align="RIGHT">Pour : </th>
            <td>Aymeric Vitte <a class="moz-txt-link-rfc2396E" href="mailto:vitteaymeric@gmail.com">&lt;vitteaymeric@gmail.com&gt;</a></td>
          </tr>
          <tr>
            <th valign="BASELINE" nowrap="nowrap" align="RIGHT">Copie
              à : </th>
            <td>Bitcoin Protocol Discussion
              <a class="moz-txt-link-rfc2396E" href="mailto:bitcoin-dev@lists.linuxfoundation.org">&lt;bitcoin-dev@lists.linuxfoundation.org&gt;</a></td>
          </tr>
        </tbody>
      </table>
      <br>
      <br>
      <div dir="ltr">Trying the four possible options (p2pkh compressed,
        p2pkh uncompressed, seg3, and bech32) is certainly a possibility
        and in fact, that's what I ended up doing because not every
        wallet implements something like this, but if there is a header
        field currently in use, it seemed reasonable to me to use it
        specify which type of key is being used. If the header includes
        whether the key is compressed or not compressed it seems logical
        to include all data about what type of key it is and not just
        this one type of information. That's why I thought the solution
        made sense and I wrote it up.</div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Mon, Feb 18, 2019 at 3:50
          PM Aymeric Vitte &lt;<a href="mailto:vitteaymeric@gmail.com"
            moz-do-not-send="true">vitteaymeric@gmail.com</a>&gt; wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div bgcolor="#FFFFFF">
            <p>Ah, OK, that's of course a good thing to document this
              undocumented (and strange) stuff, as a matter of fact I
              implemented it after reading your post (because this was
              on my todo list since some time) and got annoyed quickly,
              mainly by what is doing formatMessageForSigning (which is
              quite trivial when you know it but would be good to
              document precisely)</p>
            <p>So, yes, it's a good idea to write this, regarding the
              header I still don't see the use, testing the different
              possibilities is not a big deal, why the signature format
              is not the same as transactions one is mysterious too<br>
            </p>
            <div class="gmail-m_3218010408267466317moz-cite-prefix">Le
              19/02/2019 à 00:24, Christopher Gilliard a écrit :<br>
            </div>
            <blockquote type="cite">
              <div dir="ltr">The proposal includes actual code that does
                verification, but I didn't include code for signing. I
                thought it could be inferred, but I could at least
                include a description of how to sign. I am not sure
                exactly what part you are referring to by "keys speech",
                but the signatures are done by ECDSA keys so it's hard
                to not include anything about keys even though that's
                not the main topic. The "Background on ECDSA keys"
                section was mainly meant to give background about what
                kind of keys Bitcoin uses, for people who already know
                that they can easily skip this section so I would
                probably think it's best just to leave in.  Maybe it
                should be at the end as an addendum though. Yes, I did
                not invent any of this, I'm just documenting what people
                actually seem to do because I had to verify signatures
                as part of a project I'm working on. I would have liked
                to have had this document when I started the project so
                I thought it might be useful to others since as far as I
                can tell this was not specified anywhere. The reason for
                including this data in the header is the same that
                compressed/uncompressed is included in the header so
                that you know which type of key the signature is from
                and you don't have to try all options to see if any
                matches. This is why Trezor did that way and why I
                documented it. I'm sure there are other ways to do this,
                but since this is out there in the field being used and
                is a reasonable solution, I thought I'd write it up.</div>
              <br>
              <div class="gmail_quote">
                <div dir="ltr" class="gmail_attr">On Mon, Feb 18, 2019
                  at 2:59 PM Aymeric Vitte &lt;<a
                    href="mailto:vitteaymeric@gmail.com" target="_blank"
                    moz-do-not-send="true">vitteaymeric@gmail.com</a>&gt;
                  wrote:<br>
                </div>
                <blockquote class="gmail_quote" style="margin:0px 0px
                  0px 0.8ex;border-left:1px solid
                  rgb(204,204,204);padding-left:1ex">
                  <div bgcolor="#FFFFFF">
                    <p>Then, since you wrote this proposal, maybe you
                      should add the very precise description of the
                      signing/verification process since it is
                      documented nowhere</p>
                    <p>I don't get the use of the speech regarding keys
                      while it should focus on signatures which are
                      summarized in a vague sentence inspired by your
                      ref [2] with a not very logical link to the next
                      paragraph stating that r,s should be 32B and the
                      whole thing 65B with a header of 1B, you did not
                      invent it, that's probably the rule, not sure
                      where it is specified again and for what purpose,
                      the header seems completely of no use especially
                      when you extend to segwit/bech32 since you just
                      have to check that related compressed key matches<br>
                    </p>
                    <div
class="gmail-m_3218010408267466317gmail-m_416822245153225270moz-cite-prefix">Le
                      17/02/2019 à 15:14, Christopher Gilliard via
                      bitcoin-dev a écrit :<br>
                    </div>
                    <blockquote type="cite">
                      <div dir="ltr">
                        <div dir="ltr">
                          <div dir="ltr">I have written up a proposed
                            BIP. It has to do with Signature formats
                            when using Bitcoin Private keys. It is
                            here: <a
                              href="https://github.com/cgilliard/BIP/blob/master/README.md"
                              target="_blank" moz-do-not-send="true">https://github.com/cgilliard/BIP/blob/master/README.md</a></div>
                          <div dir="ltr"><br>
                          </div>
                          <div>This BIP was written up as suggested in
                            this github issue: <a
                              href="https://github.com/bitcoin/bitcoin/issues/10542"
                              target="_blank" moz-do-not-send="true">https://github.com/bitcoin/bitcoin/issues/10542</a></div>
                          <div><br>
                          </div>
                          <div>Note that the proposal is inline with the
                            implementation that Trezor implemented in
                            the above issue.</div>
                          <div dir="ltr"><br>
                          </div>
                          <div>Any feedback would be appreciated. Please
                            let me know what the steps are with regards
                            to getting a BIP number assigned or any
                            other process steps required.</div>
                          <div><br>
                          </div>
                          <div>Regards,</div>
                          <div>Chris</div>
                        </div>
                      </div>
                      <br>
                      <fieldset
class="gmail-m_3218010408267466317gmail-m_416822245153225270mimeAttachmentHeader"></fieldset>
                      <pre class="gmail-m_3218010408267466317gmail-m_416822245153225270moz-quote-pre">_______________________________________________
bitcoin-dev mailing list
<a class="gmail-m_3218010408267466317gmail-m_416822245153225270moz-txt-link-abbreviated" href="mailto:bitcoin-dev@lists.linuxfoundation.org" target="_blank" moz-do-not-send="true">bitcoin-dev@lists.linuxfoundation.org</a>
<a class="gmail-m_3218010408267466317gmail-m_416822245153225270moz-txt-link-freetext" href="https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev" target="_blank" moz-do-not-send="true">https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev</a>
</pre>
                    </blockquote>
                    <pre class="gmail-m_3218010408267466317gmail-m_416822245153225270moz-signature" cols="72">-- 
Move your coins by yourself (browser version): <a class="gmail-m_3218010408267466317gmail-m_416822245153225270moz-txt-link-freetext" href="https://peersm.com/wallet" target="_blank" moz-do-not-send="true">https://peersm.com/wallet</a>
Bitcoin transactions made simple: <a class="gmail-m_3218010408267466317gmail-m_416822245153225270moz-txt-link-freetext" href="https://github.com/Ayms/bitcoin-transactions" target="_blank" moz-do-not-send="true">https://github.com/Ayms/bitcoin-transactions</a>
Zcash wallets made simple: <a class="gmail-m_3218010408267466317gmail-m_416822245153225270moz-txt-link-freetext" href="https://github.com/Ayms/zcash-wallets" target="_blank" moz-do-not-send="true">https://github.com/Ayms/zcash-wallets</a>
Bitcoin wallets made simple: <a class="gmail-m_3218010408267466317gmail-m_416822245153225270moz-txt-link-freetext" href="https://github.com/Ayms/bitcoin-wallets" target="_blank" moz-do-not-send="true">https://github.com/Ayms/bitcoin-wallets</a>
Get the torrent dynamic blocklist: <a class="gmail-m_3218010408267466317gmail-m_416822245153225270moz-txt-link-freetext" href="http://peersm.com/getblocklist" target="_blank" moz-do-not-send="true">http://peersm.com/getblocklist</a>
Check the 10 M passwords list: <a class="gmail-m_3218010408267466317gmail-m_416822245153225270moz-txt-link-freetext" href="http://peersm.com/findmyass" target="_blank" moz-do-not-send="true">http://peersm.com/findmyass</a>
Anti-spies and private torrents, dynamic blocklist: <a class="gmail-m_3218010408267466317gmail-m_416822245153225270moz-txt-link-freetext" href="http://torrent-live.org" target="_blank" moz-do-not-send="true">http://torrent-live.org</a>
Peersm : <a class="gmail-m_3218010408267466317gmail-m_416822245153225270moz-txt-link-freetext" href="http://www.peersm.com" target="_blank" moz-do-not-send="true">http://www.peersm.com</a>
torrent-live: <a class="gmail-m_3218010408267466317gmail-m_416822245153225270moz-txt-link-freetext" href="https://github.com/Ayms/torrent-live" target="_blank" moz-do-not-send="true">https://github.com/Ayms/torrent-live</a>
node-Tor : <a class="gmail-m_3218010408267466317gmail-m_416822245153225270moz-txt-link-freetext" href="https://www.github.com/Ayms/node-Tor" target="_blank" moz-do-not-send="true">https://www.github.com/Ayms/node-Tor</a>
GitHub : <a class="gmail-m_3218010408267466317gmail-m_416822245153225270moz-txt-link-freetext" href="https://www.github.com/Ayms" target="_blank" moz-do-not-send="true">https://www.github.com/Ayms</a></pre>
                  </div>
                </blockquote>
              </div>
            </blockquote>
            <pre class="gmail-m_3218010408267466317moz-signature" cols="72">-- 
Move your coins by yourself (browser version): <a class="gmail-m_3218010408267466317moz-txt-link-freetext" href="https://peersm.com/wallet" target="_blank" moz-do-not-send="true">https://peersm.com/wallet</a>
Bitcoin transactions made simple: <a class="gmail-m_3218010408267466317moz-txt-link-freetext" href="https://github.com/Ayms/bitcoin-transactions" target="_blank" moz-do-not-send="true">https://github.com/Ayms/bitcoin-transactions</a>
Zcash wallets made simple: <a class="gmail-m_3218010408267466317moz-txt-link-freetext" href="https://github.com/Ayms/zcash-wallets" target="_blank" moz-do-not-send="true">https://github.com/Ayms/zcash-wallets</a>
Bitcoin wallets made simple: <a class="gmail-m_3218010408267466317moz-txt-link-freetext" href="https://github.com/Ayms/bitcoin-wallets" target="_blank" moz-do-not-send="true">https://github.com/Ayms/bitcoin-wallets</a>
Get the torrent dynamic blocklist: <a class="gmail-m_3218010408267466317moz-txt-link-freetext" href="http://peersm.com/getblocklist" target="_blank" moz-do-not-send="true">http://peersm.com/getblocklist</a>
Check the 10 M passwords list: <a class="gmail-m_3218010408267466317moz-txt-link-freetext" href="http://peersm.com/findmyass" target="_blank" moz-do-not-send="true">http://peersm.com/findmyass</a>
Anti-spies and private torrents, dynamic blocklist: <a class="gmail-m_3218010408267466317moz-txt-link-freetext" href="http://torrent-live.org" target="_blank" moz-do-not-send="true">http://torrent-live.org</a>
Peersm : <a class="gmail-m_3218010408267466317moz-txt-link-freetext" href="http://www.peersm.com" target="_blank" moz-do-not-send="true">http://www.peersm.com</a>
torrent-live: <a class="gmail-m_3218010408267466317moz-txt-link-freetext" href="https://github.com/Ayms/torrent-live" target="_blank" moz-do-not-send="true">https://github.com/Ayms/torrent-live</a>
node-Tor : <a class="gmail-m_3218010408267466317moz-txt-link-freetext" href="https://www.github.com/Ayms/node-Tor" target="_blank" moz-do-not-send="true">https://www.github.com/Ayms/node-Tor</a>
GitHub : <a class="gmail-m_3218010408267466317moz-txt-link-freetext" href="https://www.github.com/Ayms" target="_blank" moz-do-not-send="true">https://www.github.com/Ayms</a></pre>
          </div>
        </blockquote>
      </div>
    </div>
  </body>
</html>

--------------6389F4B7F43C85200D8AB63D--