python-teos icon indicating copy to clipboard operation
python-teos copied to clipboard

Test transaction decrypting edge cases

Open sr-gi opened this issue 4 years ago • 2 comments

Decrypting a potential match to check if it is an actual match is composed by mainly 3 steps:

  • Decrypting the encrypted_blob using the dispute_txid as key
  • Parsing the result to hex and decode it to utf-8
  • Decode the obtained hex string to check if it matches a valid transaction

Right now, if the obtained hex transaction is invalid a JSONRPCException will be raised by bitcoind upon decoding failing. However, more strict checks may be required to ensure that de decryption and the parsing cannot fail, or that they are properly handled in case of failing.

sr-gi avatar Aug 12 '19 14:08 sr-gi

Also discuss what to do with:

  • Multiple identical appointments
  • Same appointment with different parameters (e.g: different end_block)

sr-gi avatar Aug 12 '19 14:08 sr-gi

In AES-GCM-128 trying to decrypt some data with an invalid key would result in an InvalidTag exception. This is currently not covered in the watcher

sr-gi avatar Oct 07 '19 15:10 sr-gi