penumbra icon indicating copy to clipboard operation
penumbra copied to clipboard

Determine if swap NFT asset ID needs a blinding factor

Open zbuc opened this issue 2 years ago • 0 comments

Currently the swap NFT asset ID involves no blinding factor, so it's theoretically possible that if one were exposed, it could be brute forced.

However, this brute forcing involves several parameters:

  • Trading pair asset IDs (private)
  • Asset amounts (private)
  • The address performing the swap (private)
  • The fee amount (public)

Assuming that the asset ID was exposed as well as the trading pair and address (perhaps by social engineering as part of a targeted attack, disclosure by the user, knowledge that a particular user with a known address performed a swap at a certain time, an infoleak elsewhere, etc.), you could brute force asset ID generation to determine the amounts and unshield the swap.

  1. Is this worth mitigating? The prerequisites seem significant, brute forcing every possible asset pair (and the asset amounts at the same time) is likely unfeasible.
  2. Would it be effectively mitigated by having clients randomly select one of their addresses for each swap? Many users would likely select the default address otherwise.
  3. Would it be better to introduce a blinding factor?

zbuc avatar Jul 29 '22 20:07 zbuc