<oembed><type>rich</type><version>1.0</version><author_name>npub1r375vdaydp5nnnytff6ee2kwzxak8whmwkmnkm6h67agr7dadfkqxn6ccq</author_name><author_url>https://nostr.ae/npub1r375vdaydp5nnnytff6ee2kwzxak8whmwkmnkm6h67agr7dadfkqxn6ccq</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2015-02-24&#xA;📝 Original message:I was saying provide a public key via NFC (or a public key fingerprint &#xA;and then send the full public key over bluetooth). Instead of providing &#xA;a new public key on each tap, why can&#39;t the payee just stop accepting &#xA;connections from new parties on that &#34;resource&#34; after a session key has &#xA;been received from the first person? If the person decides to have there &#xA;friend or family pay for them instead and cancel the payment, they could &#xA;just hit cancel on the POS or something (on my fuel pump I have a switch &#xA;that needs to be turned, the purpose of this is to avoid wasting too &#xA;many addresses) and/or do another NFC tap (if you&#39;re providing QR codes &#xA;you&#39;d still need a button of some kind though so it knows to refresh &#xA;it), or the POS can just provide a completely new payment request to any &#xA;new connections on that same &#34;resource&#34; which use a different session key.&#xA;&#xA;I feel like the authentication of the payer to the payee in any future &#xA;connections after they receive the session key from them (which was &#xA;encrypted with the payees public key), comes from the fact that they are &#xA;sending responses back that are encrypted using the session key they &#xA;gave to the payee. The way I am seeing it is that the NFC tap or QR code &#xA;scan is acting in addition to the visual name check on the signature &#xA;verification in the wallet. If the certificate used isn&#39;t signed by a CA &#xA;(self signed), it may be fine as long as you heard about it via NFC or &#xA;QR code. I don&#39;t think it will require PKI and should still work &#xA;wallet-to-wallet.&#xA;&#xA;It sounds like you are saying I&#39;m proposing the customer is going to &#xA;need a certificate signed by CA? If so, why? I don&#39;t need this for any &#xA;https website I visit. It&#39;s not like the payee is sending anything to &#xA;the payer that is private. The payment request only becomes private if &#xA;something is actually received to it, otherwise, it is just discarded &#xA;and it doesn&#39;t matter. Those bitcoin addresses are never used. It&#39;s just &#xA;like a shopping cart on a website where someone aborts payment and &#xA;cancels the order.&#xA;&#xA;At one point I was thinking we could do something similar to Mike &#xA;Hearn&#39;s suggestion in another recent e-mail where we re-use some &#xA;existing part of the bitcoin URI to bootstrap some trust in a public key &#xA;that the payee next sends via bluetooth after the NFC connection. Now &#xA;that I&#39;m reviewing my notes though, I can&#39;t see how this will work with &#xA;a watching only wallet or if no backwards compatible (to BIP21) bitcoin &#xA;address is presented in the URI (as Mike said).&#xA;&#xA;What I was saying above about how you can stop accepting connections on &#xA;that &#34;resource&#34; after a session key has been received by the first &#xA;person could be problematic though. An evil person could just start &#xA;making connections to every device they can, just to be mean, which &#xA;would not allow the POS operator to receive payments from their real &#xA;customers. If you do the other option I proposed, which is to just keep &#xA;giving out new payment requests, you have other problems (on top of &#xA;wasting addresses), which are that you can still have mean people giving &#xA;you a denial of service attach on your hardware, or you could have an &#xA;unusual situation where two people pay (don&#39;t know why they would do &#xA;this though), so that is why I&#39;m suggesting a manual tap or button press &#xA;or switch turn being required.&#xA;&#xA;I guess as more of a abuse filter, a new &#34;resource&#34; could be given &#xA;instead with each tap, and the POS would just ignore all requests to an &#xA;inactive resource. You may say, why not send a new public key (as you &#xA;suggested) instead of a new &#34;resource&#34; with each tap (or button press if &#xA;using QR codes), and then you can skip the sending of a static public &#xA;key (or public key fingerprint), and ignore any data that is not &#xA;encrypted with that public key. Maybe that is a better idea because it &#xA;will shorten the bitcoin URI. However, I don&#39;t think its required from a &#xA;privacy standpoint, it primarily just aids in combining the public key &#xA;fingerprint with the changing &#34;resource&#34; name used to filter abuse. Or, &#xA;am I missing something?&#xA;&#xA;&#xA;So, after thinking through the abuse scenarios I mentioned above, I &#xA;think I am agreeing with you, but the reason I&#39;m writing all this is to &#xA;hopefully just get some feedback on my logic to learn something from &#xA;this discussion. I do think sending a unique public key over NFC has to &#xA;be better than a unique session key. It adds one more step, but seems to &#xA;help. If we do this, can we then safely get rid of the h= parameter? &#xA;That should make Mike Hearn happy, and also may alleviate the base64url &#xA;debate?&#xA;&#xA;&#xA;Andy Schroder&#xA;&#xA;On 02/23/2015 09:55 PM, Eric Voskuil wrote:&#xA;&gt; Andy, adding to my previous post below:&#xA;&gt;&#xA;&gt; On 02/23/2015 01:40 AM, Eric Voskuil wrote:&#xA;&gt;&gt; On 02/22/2015 11:36 PM, Andy Schroder wrote:&#xA;&gt; ...&#xA;&gt;&gt;&gt; It&#39;s possible a really sophisticated modification could be done where&#xA;&gt;&gt;&gt; the attacker encrypts and decrypts the communication and then relays to&#xA;&gt;&gt;&gt; each party (without them knowing or any glitches detected), but I guess&#xA;&gt;&gt;&gt; I&#39;m not sure how easy that would be on such a close proximity device?&#xA;&gt;&gt; If the NFC tap is sufficiently private, privacy is easy to achieve for&#xA;&gt;&gt; the subsequent communication. If it is not, privacy can be completely&#xA;&gt;&gt; compromised. The question is only how much more difficult is the attack.&#xA;&gt;&gt;&#xA;&gt;&gt; With the public cert tap, the level of difficulty is much lower for&#xA;&gt;&gt; capturing selected payment requests. The interloper no longer needs to&#xA;&gt;&gt; invade the space of the NFC terminal and can instead impersonate the&#xA;&gt;&gt; payer from a safe distance. Nobody gets paid, but privacy is compromised.&#xA;&gt; This problem in the preceding paragraph can be resolved by sending a&#xA;&gt; unique public key on each NFC tap. In that case an attacker would need&#xA;&gt; to monitor the NFC communication.&#xA;&gt;&#xA;&gt; The talk of wrapping the connection in SSL led me to believe you were&#xA;&gt; talking about a static public certificate. However that&#39;s not a&#xA;&gt; necessary assumption here and may not be what you intended.&#xA;&gt;&#xA;&gt;&gt; The level of difficulty in the case where the interloper wants to taint&#xA;&gt;&gt; transactions may appear lower, but it is not:&#xA;&gt;&gt;&#xA;&gt;&gt; With the session key tap the interloper must compromise the NFC location&#xA;&gt;&gt; and then monitor the BT traffic. Monitoring BT traffic without being&#xA;&gt;&gt; party to the connection is presumably not rocket surgery, but not&#xA;&gt;&gt; standard BT design either.&#xA;&gt;&gt;&#xA;&gt;&gt; With the public cert tap the interloper must also compromise the NFC&#xA;&gt;&gt; location and communicate over BT. Therefore the hardware and physical&#xA;&gt;&gt; attack requirements are similar. The only added difficulty is that the&#xA;&gt;&gt; attack on the NFC terminal attack is active (modifying the MAC address&#xA;&gt;&gt; directing the payer to the BT service).&#xA;&gt; I believe your central claim was that the difference in the two&#xA;&gt; bootstrapping approaches (public key vs. session key) is that by using a&#xA;&gt; unique public key per tap, the attack requires an active vs. passive&#xA;&gt; attack on the NFC terminal. I just wanted to make clear here that I&#xA;&gt; agree with that assessment.&#xA;&gt;&#xA;&gt; The symmetric key approach is based on the idea that these attacks are&#xA;&gt; comparable in difficulty and otherwise identical in privacy loss.&#xA;&gt;&#xA;&gt; However, the difference in implementation amounts to about +23&#xA;&gt; additional encoded characters for the BT/LE URL, assuming use of the&#xA;&gt; secp256k1 curve for DHE. This is really not a material issue in the case&#xA;&gt; of the NFC tap. The entire URI+URL could be as small as:&#xA;&gt;&#xA;&gt; bitcoin:?r=bt:12rAs9mM/79bq48xJaMgqR9YNxnWhqHHM1JB52nxn6VFXBHTP2zrP&#xA;&gt;&#xA;&gt; In comparison to a symmetric key:&#xA;&gt;&#xA;&gt; bitcoin:?r=bt:12rAs9mM/12drXXUifSrRnXLGbXg8E&#xA;&gt;&#xA;&gt; It also does not change the protocol design or complexity at all - it&#xA;&gt; would just swap out an AES key for a secp256k1 public key.&#xA;&gt;&#xA;&gt; bitcoin:[address]?bt:&lt;mac&gt;/&lt;key&gt;&#xA;&gt;&#xA;&gt; If that gets us aligned I&#39;m all for it.&#xA;&gt;&#xA;&gt;&gt; However impersonating the payer is just a matter of software - no more&#xA;&gt;&gt; difficult than the session key attack. In fact it may be much easier to&#xA;&gt;&gt; implement, as the attack can use supported BT features because the&#xA;&gt;&gt; attacker has directed the payer to connect to him and is connecting to&#xA;&gt;&gt; the receiver as if he was a payer.&#xA;&gt;&gt;&#xA;&gt;&gt; But it gets worse for the public cert tap, since a more sophisticated&#xA;&gt;&gt; attacker can set himself up in the same position without subverting the&#xA;&gt;&gt; NFC terminal at all. By broadcasting a more powerful BT service on the&#xA;&gt;&gt; same advertised MAC address, the attacker can capture traffic and relay&#xA;&gt;&gt; it to the intended service.&#xA;&gt; I&#39;m retracting the last paragraph, since the interloper, without&#xA;&gt; invading the NFC connection (by substituting the public cert), could not&#xA;&gt; read the relayed traffic. It was getting late :/&#xA;&gt;&#xA;&gt;&gt; So in sum, reliance on a public cert makes the communication less&#xA;&gt;&gt; private under the same physical set of constraints. The difference&#xA;&gt;&gt; results from the receiver allowing non-proximate payers to impersonate&#xA;&gt;&gt; proximate payers from a distance by generating their own session keys&#xA;&gt;&gt; and submitting them over BT.&#xA;&gt; e&#xA;&gt;&#xA;&#xA;&#xA;-------------- next part --------------&#xA;A non-text attachment was scrubbed...&#xA;Name: signature.asc&#xA;Type: application/pgp-signature&#xA;Size: 555 bytes&#xA;Desc: OpenPGP digital signature&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20150224/79085253/attachment.sig&gt;</html></oembed>