<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix"><br>
      <br>
      <br>
      <br>
      <br>
      <br>
      Manually quoting a reply from Andreas that was sent privately
      while the e-mail list was 2 days delayed delivering messages ....<br>
      <br>
      On 02/25/2015 02:45 AM, Andreas Schildbach wrote:<br>
      <blockquote type="cite">
        <pre wrap="">Bear in mind that the "bt:" scheme is already in use by ~700.000
installations. If we change the protocol except just wrapping a secure
layer, we should change the scheme to for example "bs:" (Bluetooth secure).</pre>
      </blockquote>
      <br>
      This bs: is not a bad idea. Is bts: any better/clearer than bs:?<br>
      <br>
      <blockquote type="cite">
        <pre wrap="">

That said, I don't like the idea to fold the resource name and the
session key into one. Resource names can be shared by multiple
protocols, for example a merchant may publish payment requests under
bt:&lt;mac&gt;/r1 <b class="moz-txt-star"><span class="moz-txt-tag">*</span>and<span class="moz-txt-tag">*</span></b> <a class="moz-txt-link-freetext" href="https://">https://</a>&lt;domain&gt;/r1. If you want to save space and
don't need resources, you can always just use bt:&lt;mac&gt; and a default
resource (bt:&lt;mac&gt;/) is assumed.</pre>
      </blockquote>
      <br>
      I'm going to agree with Andreas on this. The other thing is we are
      making the resource name derived from the public key, so we are
      not even directly sending the resource name.<br>
      <br>
      <blockquote type="cite">
        <pre wrap="">

Have we decided on the use (or non-use) of a DHKE (or similar) protocol
like Mike suggested?</pre>
      </blockquote>
      <br>
      <br>
      We are planning to send a unique public key of the payee via NFC.
      See other e-mails now that the e-mail list finally forwarded them
      through the other day.<br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      Now for Eric's e-mail... More below.<br>
      <br>
      <br>
      On 02/24/2015 09:09 PM, Eric Voskuil wrote:<br>
    </div>
    <blockquote cite="mid:54ED2EE6.6020903@voskuil.org" type="cite">
      <pre wrap="">On 02/24/2015 02:50 PM, Andy Schroder wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">We can change "resource" to "Session ID" if you want.

I think the URL scheme should be:

bitcoin:[address]?r=bt:&lt;mac&gt;&amp;s=&lt;PublicKey&gt;
</pre>
      </blockquote>
      <pre wrap="">
This is a question of proper URL semantics, as applied to the "bt" scheme.

From rfc3986 [Uniform Resource Identifier (URI): Generic Syntax]:

"The path component contains data, usually organized in hierarchical
form, that, along with data in the non-hierarchical query component
(Section 3.4), serves to identify a resource within the scope of the
URI's scheme and naming authority (if any)."

...

"The query component contains non-hierarchical data that, along with
data in the path component (Section 3.3), serves to identify a resource
within the scope of the URI's scheme and naming authority (if any). The
query component is indicated by the first question mark ("?") character
and terminated by a number sign ("#") character or by the end of the URI."

<a class="moz-txt-link-freetext" href="https://tools.ietf.org/html/rfc3986#section-3.3">https://tools.ietf.org/html/rfc3986#section-3.3</a>

The question therefore is whether &lt;key&gt; is (1) relative to the path
(hierarchical) or (2) independent of the path and instead relative to
the scheme and naming authority.

The "bt" scheme does not include a naming authority, and as such the
question is simply whether &lt;key&gt; is relative to "bt" or relative to the
path, which is &lt;mac&gt;. Quite clearly &lt;key&gt; is valid only in the context
of &lt;mac&gt;, not relevant to all &lt;mac&gt;s.

As such one must conclude that the proper form is:

bt:&lt;mac&gt;/&lt;key&gt;</pre>
    </blockquote>
    <br>
    <br>
    See my comments above.<br>
    <br>
    <br>
    <blockquote cite="mid:54ED2EE6.6020903@voskuil.org" type="cite">
      <pre wrap="">

</pre>
      <blockquote type="cite">
        <pre wrap="">But when connecting to the mac, the client indicates the SessionID in
the header, and as you say, SessionID is derived in some way from
PublicKey.
</pre>
      </blockquote>
      <pre wrap="">
Yes.

</pre>
      <blockquote type="cite">
        <pre wrap="">This is a slightly different format than both of your suggestions below,
but seems to make more sense based on what you said in your entire
message. The other thing is it can be used with more protocols without
taking up more space in the URL.

However, by loosing the h= parameter, I think we are now loosing some
benefit it brought to https based connections if the customer doesn't
want to use bluetooth. Right?
</pre>
      </blockquote>
      <pre wrap="">
I don't believe that the BIP-70 protocol over https has any need for the
parameter. It was only useful because the NFC/BT session wasn't secured.
So I don't think anything is lost.</pre>
    </blockquote>
    <br>
    This may be true. Andreas, do you agree? I feel like there was
    something in your app where it did not currently compare the domain
    name to domain name the digital signature in the payment request
    used though. Maybe this was only for bluetooth though? However, can
    we trust DNS though? Seems like it is not too hard to get an
    alternate signed certificate for a domain name, and if you can serve
    false DNS and/or change TCP/IP routing, then your secure link can
    break down?<br>
    <br>
    <br>
    <br>
    <blockquote cite="mid:54ED2EE6.6020903@voskuil.org" type="cite">
      <pre wrap="">

</pre>
      <blockquote type="cite">
        <pre wrap="">Also, you talk about a new public key (and session ID) for each tap. I
guess I'm wondering about this though. If the public key is compromised
on the first tap, isn't their payment request already compromised?
</pre>
      </blockquote>
      <pre wrap="">
Yes, but that is not the problem that non-reuse is designed to resolve.

Reuse of the public key creates a forward secrecy problem. If 1000
sessions are recorded, and later the private key associated with the
reused public key is compromized, all of the sessions are retroactively
compromised.

Another problem is persistent impersonation. If the one associated
private key is compromised, and nobody knows it, the attacker can not
only monitor all transactions but can selectively steal payments (if
they aren't signed and verified). This is BTW also a good reason to not
use HD generation of these session keys.

Another problem is that any payer can use the well-known public key to
obtain payment requests.

Another problem is that without a unique public key there is no unique
session id, so that would need to be added explicitly on the URI.</pre>
    </blockquote>
    <br>
    <br>
    <br>
    I get what you are saying, but I don't know that 2 taps with the
    same public key is the same as 1000 uses of the same public key?<br>
    <br>
    <br>
    <br>
    <blockquote cite="mid:54ED2EE6.6020903@voskuil.org" type="cite">
      <pre wrap="">

</pre>
      <blockquote type="cite">
        <pre wrap="">Since we are securing everything, can we change the message header
format from what Schildbach's bitcoin wallet implements to something
more consistent?
</pre>
      </blockquote>
      <pre wrap="">
Could you spell this out, I'm not familiar with the implementation, just
the proposals.</pre>
    </blockquote>
    <br>
    <br>
    If you'll check the proposed specification, the headers in each
    message (before the serialized payment request data is sent), are
    consistent from message to message.<br>
    <br>
<a class="moz-txt-link-freetext" href="https://github.com/AndySchroder/bips/blob/master/tbip-0074.mediawiki#Specification">https://github.com/AndySchroder/bips/blob/master/tbip-0074.mediawiki#Specification</a><br>
    <br>
    <br>
    <br>
    <br>
    <blockquote cite="mid:54ED2EE6.6020903@voskuil.org" type="cite">
      <pre wrap="">

</pre>
      <blockquote type="cite">
        <pre wrap="">Maybe we can create a new UUID for this secure service
so Schildbach's bitcoin wallet can still maintain backwards compatibility.
</pre>
      </blockquote>
      <pre wrap="">
That may be necessary depending on the implementation of existing
terminals, but I'm not familiar enough to speculate.</pre>
    </blockquote>
    <br>
    I think we probably also want to combine new UUID's with
    Schildbach's suggestion (above) to use a new "bs:" (which I
    suggested maybe "bts:") protocol scheme.<br>
    <br>
    <br>
    <br>
    <blockquote cite="mid:54ED2EE6.6020903@voskuil.org" type="cite">
      <pre wrap="">

e

</pre>
      <blockquote type="cite">
        <pre wrap="">On 02/24/2015 05:14 PM, Eric Voskuil wrote:
</pre>
        <blockquote type="cite">
          <blockquote type="cite">
            <pre wrap="">   * Add a "s=" parameter that uses a unique public key for each
session.
     This public key identifies the payee to the payer and payer to the
     payee.
</pre>
          </blockquote>
          <pre wrap="">This would be the simple model, which just tacks on another parameter to
the bitcoin URL:

bitcoin:[address]?bt=&lt;mac&gt;&amp;s=&lt;key&gt;

But we should also look at the more flexible "r#" approach from your
existing TBIPs, which would yield:

bitcoin:[address]?r=bt:&lt;mac&gt;/&lt;key&gt;

and incorporate the "payment_url" list.

</pre>
          <blockquote type="cite">
            <pre wrap="">   * Use a base58 encoding to save space and reduce the character set
     slightly.
</pre>
          </blockquote>
          <pre wrap="">:)

</pre>
          <blockquote type="cite">
            <pre wrap="">   * Get rid of the resource? If a terminal is accepting payment from
     multiple customers simultaneously, it should be smart enough to
     distinguish between customers based on the public key they are
     encrypting the data with. Is this approach feasible?
</pre>
          </blockquote>
          <pre wrap="">Yes, it is not necessary on the URL. But an id is useful in helping the
BT terminal identify the session without having to try all of its
outstanding keys until it finds one that works.

I proposed that the resource name ("session id" may be a better name) be
deterministically derived from the session key. Given the design change
to pass an EC public key it would need to be derived from that key (not
from the session key because the receiver would not have a copy before
decrypting the first BT message). So any function on the public key that
reduces it to a smaller length, fixed width should be fine. Hashing it
first may be better as is prevents disclosure of any bits of the public
key, which should be treated as a secret during the session.

</pre>
          <blockquote type="cite">
            <pre wrap="">   * When you said a new public key for each tap, do you see that as
     every single tap, or do you consider multiple taps from the same
     customer the same tap?
</pre>
          </blockquote>
          <pre wrap="">Yes, since there would be no other way to distinguish between customers
in some scenarios and this is the safest approach. We certainly won't
run out of numbers, and unused sessions can be discarded based on any
number of criteria, including discarding all but the most recent. That
may may be sufficient for your vending machines given there's little if
any call for parallelism.

e
</pre>
        </blockquote>
        <pre wrap="">
</pre>
      </blockquote>
      <pre wrap="">
</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. <a class="moz-txt-link-freetext" href="http://goparallel.sourceforge.net/">http://goparallel.sourceforge.net/</a></pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Bitcoin-development mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Bitcoin-development@lists.sourceforge.net">Bitcoin-development@lists.sourceforge.net</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/bitcoin-development">https://lists.sourceforge.net/lists/listinfo/bitcoin-development</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>