<oembed><type>rich</type><version>1.0</version><author_name>npub1sgs97fe0n9wehe6zw7drcxdz4cy9yt9pfqjv8gasz5jlk4zezc0quppx3c</author_name><author_url>https://nostr.ae/npub1sgs97fe0n9wehe6zw7drcxdz4cy9yt9pfqjv8gasz5jlk4zezc0quppx3c</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2015-02-23&#xA;📝 Original message:On 02/22/2015 11:36 PM, Andy Schroder wrote:&#xA;&gt; I agree that NFC is the best we have as far as a trust anchor that you&#xA;&gt; are paying the right person. The thing I am worried about is the privacy&#xA;&gt; loss that could happen if there is someone passively monitoring the&#xA;&gt; connection. &#xA;&#xA;We have the same objective. Privacy loss is my primary concern with the&#xA;existing proposal.&#xA;&#xA;&gt; So, in response to some of your comments below and also in&#xA;&gt; response to some of Eric Voskuil&#39;s comments in another recent e-mail:&#xA;&gt; &#xA;&gt; Consider some cases:&#xA;&gt; &#xA;&gt; If NFC is assumed private, then sending the session key over the NFC&#xA;&gt; connection gives the payer and the payee assumed confidence that that a&#xA;&gt; private bluetooth connection can be created.&#xA;&gt; &#xA;&gt; If the NFC actually isn&#39;t private, then by sending the session key over&#xA;&gt; it means the bluetooth connection is not private. An eavesdropper can&#xA;&gt; listen to all communication and possibly modify the communication, but&#xA;&gt; the payer and payee won&#39;t necessarily know if eavesdropping occurs&#xA;&gt; unless communication is also modified (which could be difficult to do&#xA;&gt; for a really low range communication).&#xA;&#xA;I realize you are postulating a situation where an interloper monitors&#xA;but doesn&#39;t substitute the NFC communication. But clearly if you can do&#xA;one you have the potential to do the other, so if one is going to rely&#xA;on the assumption that the NFC tap can be monitored one must also accept&#xA;that it can be modified. Once one accepts this premise there is no point&#xA;in using NFC.&#xA;&#xA;&gt; If we send a public key of the payee over the NFC connection (in place&#xA;&gt; of a session key) and the NFC connection is assumed trusted (and is&#xA;&gt; unmodified but actually monitored by an eavesdropper) and use that&#xA;&gt; public key received via NFC to encrypt a session key and send it back&#xA;&gt; via bluetooth, to then initiate an encrypted bluetooth connection using&#xA;&gt; that session key for the remaining communication, then the payee still&#xA;&gt; receives payment as expected and the payer sends the payment they&#xA;&gt; expected, and the eavesdropper doesn&#39;t see anything.&#xA;&#xA;You can send a public cert over a public channel but before it can be&#xA;used it must be validated and verified to belong to the party that you&#xA;intend to communicate with privately. Otherwise the interloper can&#xA;substitute a public cert and subvert the payment process.&#xA;&#xA;The reduces to the system requiring PKI just to establish private&#xA;communication. One might argue that BIP-70 already contemplates PKI.&#xA;However the above approach is significantly different in that it would&#xA;*require* all NFC/BT communication to use PKI just to be private.&#xA;&#xA;Furthermore, to establish a private channel between *both* intended&#xA;parities, public certs must be exchanged in both directions. Otherwise,&#xA;if the customer isn&#39;t validated by the merchant, a distant interloper&#xA;can trivially use the merchant&#39;s public cert to obtain the payment&#xA;request from the Bluetooth terminal. This is the privacy breach that we&#xA;are trying to prevent in the first place.&#xA;&#xA;Any requirement for PKI, in either direction, itself creates privacy&#xA;problems. But a requirement for customer certificates really gets hairy.&#xA;&#xA;The PKI requirement can be dropped by instead exchanging self-generated&#xA;public keys, in the RedPhone model. However that requires out-of-band&#xA;secure communication of a common derived value by the parties. This&#xA;could be as simple as a number on each screen that one or both of the&#xA;parties compares. But this requires no private communication, and&#xA;therefore NFC is entirely unnecessary. This is in fact what I would&#xA;recommend for the BT-only scenario.&#xA;&#xA;The value added by NFC is that proximity can be used to establish trust.&#xA;If that does not meet one&#39;s threshold for privacy then the parties need&#xA;to establish this trust through some presumably more private channel&#xA;(such as visual or voice confirmation).&#xA;&#xA;Note that payment integrity can be reasonably ensured by relying on PKI&#xA;as established by BIP-70 (which also offers the seller non-repudiation&#xA;benefit). So this question is strictly about privacy.&#xA;&#xA;&gt; If we send a public key of the payee over the NFC connection (in place&#xA;&gt; of a session key) and the NFC connection is assumed trusted (and is&#xA;&gt; actually modified by an eavesdropper) and use that public key received&#xA;&gt; via NFC to encrypt a session key and send it back via bluetooth, to then&#xA;&gt; initiate an encrypted bluetooth connection using that session key for&#xA;&gt; the remaining communication, then the payee receives no payment and the&#xA;&gt; attack is quickly identified because the customer receives no product&#xA;&gt; for their payment and they notify the payee, and hopefully the problem&#xA;&gt; remedied and no further customers are affected. &#xA;&#xA;In this case the attacker hijacks the subsequent BT connection, sends a&#xA;payment request and gets paid. The only thing to prevent it would be&#xA;BIP-70/PKI, as mentioned above.&#xA;&#xA;In a more complex attack the interloper can sit in the middle of all&#xA;communications between payer and receiver. Since the payer is not&#xA;validated by the receiver the interloper can impersonate the payer in&#xA;all communication with the receiver. As such he can also impersonate the&#xA;receiver in all communications with the payer. If the NFC communication&#xA;is compromized there is no saving privacy without an alternate private&#xA;channel.&#xA;&#xA;&gt; The privacy loss will be&#xA;&gt; significantly reduced and the motive for such attacks will be reduced.&#xA;&#xA;The motive and privacy loss remain unchanged.&#xA;&#xA;&gt; It&#39;s possible a really sophisticated modification could be done where&#xA;&gt; the attacker encrypts and decrypts the communication and then relays to&#xA;&gt; each party (without them knowing or any glitches detected), but I guess&#xA;&gt; I&#39;m not sure how easy that would be on such a close proximity device?&#xA;&#xA;If the NFC tap is sufficiently private, privacy is easy to achieve for&#xA;the subsequent communication. If it is not, privacy can be completely&#xA;compromised. The question is only how much more difficult is the attack.&#xA;&#xA;With the public cert tap, the level of difficulty is much lower for&#xA;capturing selected payment requests. The interloper no longer needs to&#xA;invade the space of the NFC terminal and can instead impersonate the&#xA;payer from a safe distance. Nobody gets paid, but privacy is compromised.&#xA;&#xA;The level of difficulty in the case where the interloper wants to taint&#xA;transactions may appear lower, but it is not:&#xA;&#xA;With the session key tap the interloper must compromise the NFC location&#xA;and then monitor the BT traffic. Monitoring BT traffic without being&#xA;party to the connection is presumably not rocket surgery, but not&#xA;standard BT design either.&#xA;&#xA;With the public cert tap the interloper must also compromise the NFC&#xA;location and communicate over BT. Therefore the hardware and physical&#xA;attack requirements are similar. The only added difficulty is that the&#xA;attack on the NFC terminal attack is active (modifying the MAC address&#xA;directing the payer to the BT service).&#xA;&#xA;However impersonating the payer is just a matter of software - no more&#xA;difficult than the session key attack. In fact it may be much easier to&#xA;implement, as the attack can use supported BT features because the&#xA;attacker has directed the payer to connect to him and is connecting to&#xA;the receiver as if he was a payer.&#xA;&#xA;But it gets worse for the public cert tap, since a more sophisticated&#xA;attacker can set himself up in the same position without subverting the&#xA;NFC terminal at all. By broadcasting a more powerful BT service on the&#xA;same advertised MAC address, the attacker can capture traffic and relay&#xA;it to the intended service.&#xA;&#xA;So in sum, reliance on a public cert makes the communication less&#xA;private under the same physical set of constraints. The difference&#xA;results from the receiver allowing non-proximate payers to impersonate&#xA;proximate payers from a distance by generating their own session keys&#xA;and submitting them over BT.&#xA;&#xA;&gt; Erick Voskuil mentioned this same problem would even occur if you had a&#xA;&gt; hardwired connection to the payment terminal and those wires were&#xA;&gt; compromised. I guess I still think what I am saying would be better in&#xA;&gt; that case. There is also more obvious physical tampering required to&#xA;&gt; mess with wires.&#xA;&#xA;Attacks against wires do not require tampering with (as in damaging)&#xA;wires. The distinction between a wired connection and a wireless&#xA;connection is in many ways imaginary.&#xA;&#xA;&gt; I&#39;m not sure if there is any trust anchor required of the payer by the&#xA;&gt; payee, is there? Eric also mentioned a need for this. Why does the payer&#xA;&gt; care who they are as long as they get a payment received? Just to avoid&#xA;&gt; a sophisticated modification&#34; that I mention above? I can see how this&#xA;&gt; could be the case for a longer range communication (like over the&#xA;&gt; internet), but I&#39;m not convinced it will be easy on really short ranges?&#xA;&#xA;I think I addressed this above but let me know if not.&#xA;&#xA;&gt; It&#39;s almost like the attacker would be better off to just replace the&#xA;&gt; entire POS internals than mess with an attack like that, in which case&#xA;&gt; everything we could do locally (other than the payment request signing&#xA;&gt; using PKI), is useless.&#xA;&#xA;Yes, ultimately both endpoints must be secured. My point is that (when&#xA;intended) NFC is practically the equivalent of a wired connection.&#xA;Baseband attacks against buyers&#39; phones or subversion of the entire POS&#xA;terminal may be easier than interloping on a monitored NFC terminal. But&#xA;that&#39;s the point, once the attack is easier at the endpoints that is&#xA;where it will go. Further attempts to secure the gap between the devices&#xA;will not help after that point.&#xA;&#xA;&gt; I&#39;m not a cryptography expert so I apologize if there is something&#xA;&gt; rudimentary that I am missing here.&#xA;&#xA;No need for apology, it&#39;s a good discussion, and there are precious few&#xA;experts here.&#xA;&#xA;This discussion should make people very wary of any terminal system that&#xA;doesn&#39;t use signed payment requests :).&#xA;&#xA;e&#xA;&#xA;&gt; Andy Schroder&#xA;&gt; &#xA;&gt; On 02/22/2015 08:02 PM, Andreas Schildbach wrote:&#xA;&gt;&gt; On 02/23/2015 12:32 AM, Andy Schroder wrote:&#xA;&gt;&gt;&gt; I guess we need to decide whether we want to consider NFC communication&#xA;&gt;&gt;&gt; private or not. I don&#39;t know that I think it can be. An eavesdropper can&#xA;&gt;&gt;&gt; place a tiny snooping device near and read the communication. If it is&#xA;&gt;&gt;&gt; just passive, then the merchant/operator won&#39;t realize it&#39;s there. So, I&#xA;&gt;&gt;&gt; don&#39;t know if I like your idea (mentioned in your other reply) of&#xA;&gt;&gt;&gt; putting the session key in the URL is a good idea?&#xA;&gt;&gt; I think the &#34;trust by proximity&#34; is the best we&#39;ve got. If we don&#39;t&#xA;&gt;&gt; trust the NFC link (or the QR code scan), what other options have we&#xA;&gt;&gt; got? Speaking the session key by voice? Bad UX, and can be eavesdropped&#xA;&gt;&gt; as well of course.&#xA;&#xA;-------------- next part --------------&#xA;A non-text attachment was scrubbed...&#xA;Name: signature.asc&#xA;Type: application/pgp-signature&#xA;Size: 473 bytes&#xA;Desc: OpenPGP digital signature&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20150223/e131bcbc/attachment.sig&gt;</html></oembed>