python-teos
python-teos copied to clipboard
Test transaction decrypting edge cases
Decrypting a potential match to check if it is an actual match is composed by mainly 3 steps:
- Decrypting the
encrypted_blob
using thedispute_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.
Also discuss what to do with:
- Multiple identical appointments
- Same appointment with different parameters (e.g: different
end_block
)
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