<oembed><type>rich</type><version>1.0</version><author_name>npub17ty4mumkv43w8wtt0xsz2jypck0gvw0j8xrcg6tpea25z2nh7meqf4qgyd</author_name><author_url>https://nostr.ae/npub17ty4mumkv43w8wtt0xsz2jypck0gvw0j8xrcg6tpea25z2nh7meqf4qgyd</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2015-02-23&#xA;📝 Original message:&gt;&#xA;&gt; DHKE will not improve the situation. Either we use a simple method to&#xA;&gt; transfer a session key or a complex method.&#xA;&gt;&#xA;&#xA;You&#39;re right that just sending the session key is simpler. I originally&#xA;suggested doing ECDHE to set up an encrypted channel for the following&#xA;reasons:&#xA;&#xA;   1. URIs are put in QR codes more often than NFC tags. QR codes have&#xA;   limited space. The more stuff you pack into them, the slower and flakier&#xA;   the scanning process becomes.&#xA;&#xA;   For normal wallets, doing ECDH over secp256k1 to derive a session key&#xA;   means we can reuse the address that was put in the URI already for&#xA;   pre-BIP70 wallets, thus we don&#39;t have to expand the URI at all except&#xA;   perhaps to flag that crypted Bluetooth connections are supported. Win!&#xA;&#xA;   2. If the wallet is a watching wallet, this won&#39;t work and in that case&#xA;   you would need to put a separate key into the URI. However, this key is&#xA;   ephemeral and does not need to be very strong. So we can generate a regular&#xA;   secp256k1 key and then put say 5-8 prefix bytes into the URI as a new&#xA;   parameter. The public key can then be provided in full in the clear over&#xA;   the Bluetooth connection and the session key derived. If we put the session&#xA;   key into the URI in full, then we could not use this trick. Win!&#xA;&#xA;   3. It&#39;s quite common in low tech scenarios like little coffee shops to&#xA;   just print a QR code and put it in the menu, or sticky tape it to the back&#xA;   wall of the shop.&#xA;&#xA;   In these cases, it&#39;s possible that the device is actually hanging around&#xA;   in the shop somewhere but having the QR code somewhere larger and more&#xA;   accessible than the shop devices screen is highly convenient. However it&#xA;   means the data is entirely static.&#xA;&#xA;   Putting/reusing an identity key from the URI means the session keys are&#xA;   always unique and known only to both devices, even though the bootstrap&#xA;   data is public.&#xA;&#xA;   4. Doing ECDHE to derive the keys means we can derive a MAC key as well&#xA;   as an AES key. Otherwise you have the issue of exchanging both, which again&#xA;   uses up valuable bootstrap space.&#xA;&#xA;So for a small increase in session setup complexity we potentially avoid&#xA;troubling problems down the line where people the same functionality from&#xA;NFC and QR code based bootstrap, but we can&#39;t provide it.&#xA;&#xA;These discussions keep coming up. I think the next step is for someone to&#xA;upgrade Andreas&#39; wallet to support encrypted connections and the TBIPs, to&#xA;see what happens.&#xA;&#xA;Re: the h= parameter. I only objected to requiring this when the payment&#xA;request is also signed. It adds complexity, uses space, and the rationale&#xA;was &#34;the PKI can&#39;t be trusted&#34; even though it&#39;s been used to protect credit&#xA;card payments for 20 years without any issues. In the case of unsigned&#xA;payment requests, sure ... but with a proper implementation of an encrypted&#xA;Bluetooth channel it&#39;d be unnecessary as the channel establishment process&#xA;would guarantee authenticity anyway.&#xA;&#xA;But don&#39;t let me hold you guys back! I&#39;d rather see something that works&#xA;than an endless debate about the perfect arrangement of hashes and URI&#xA;parameters :)&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20150223/dac2bed5/attachment.html&gt;</html></oembed>