Fixed focal length camera vs QR code size & Other UR Requirements? #15
Replies: 4 comments 4 replies
-
/cc: @gorazdko |
Beta Was this translation helpful? Give feedback.
-
FFI, some items related to this topic:
Let me know if there are any other topics that we should be research as we prepare a more formal WIP (Wallet Improvement Proposal for possible submission as a BIP) to describe it. -- Christopher Allen |
Beta Was this translation helpful? Give feedback.
-
I did some experimentation with URDemo and a 1MB UR payload. I chose a 500b max fragment size. The payload took 24 minutes to transfer from an iPad Pro to an iPhone X, for a throughput of 695b/sec. Obviously I didn't design the algorithm to handle such large payloads, and the main thing I noticed was a degradation in frame rate after the initial pass through all 2000 individual fragments, owing to the fountain code algorithm that selects a random mix of fragments to include in each part. It appears that parts that include many fragments take longer, and this makes sense given the need to XOR all those parts together; a lot of the sub-algorithms used have complexity linear to the number of selected fragments for a part. To ensure the problem wasn't in my UI, I turned off the "fragment bar" in both the sender and receiver. There may be ways to optimize the code to create a steady, fast frame rate, such as moving the production of parts off the main thread, at the expense of simplicity in the code. Part of the reason for the slower throughput was obviously due to the unsteady frame rate. I primarily noticed the degradation on the sending device, but I'd want to profile the receiving device as well, because it has to do a fair amount of computation on each received mixed part. So feasible, yeah. Fun, no. |
Beta Was this translation helpful? Give feedback.
-
The key thing that our initial airgap QR scenario is from a non-networked device that talks to a networked device. So the 24 minutes is a pain, but at least possible if you have that stringent requirement. For a high-value transaction, say to consolidate a big companies customer inputs every month, that may not be too long given the airgap benefits. But if both devices have have some form of audio, bluetooth, or network connection, we can do more. In particular, many low-end devices support an audio in/out jack, so it could be the only wired connection is an audio cable, and you use the QR to bootstrap the two devices to create some type of TOFU Diffie-Helman key agreement between the two devices. For other pairs of devices that have network, @Fonta1n3 is figuring out how to an ephemeral Tor onion server on the iPhone, and then a QR is only required for the first connection between the trusted signer, where we can potentially do better than TOFU. -- Christopher Allen |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Original post cryptoadvance/specter-desktop#374
When we were making Cobo Vault, we did some test on fixed focal length camera VS auto focus camera.
The scanning speed of fixed focal length camera is over twice faster than auto focus camera - an auto focus camera will redo focus procedure when it sees a new QR code and in the scenario of animated QR code, it takes much more time than fixed focal length camera.
But the fixed focal length cause another problem - it can only read the QR code in a specific range of actual size. This is not a big problem if the user is using mobile companion app. But if the user is using a desktop software wallet like Specter, as the PPI varies a lot between different monitors, it better to add a slide bar on wallet for user to manually adjust the actual size of the QR code.
It would be better if the size can be memorized so the users don't need to adjust every time.
Beta Was this translation helpful? Give feedback.
All reactions