Skip to content
This repository was archived by the owner on May 13, 2022. It is now read-only.

Fix signature logic - prevent replay attack issue#198

Merged
loredanacirstea merged 2 commits intoraiden-network:masterfrom
loredanacirstea:contract-closing-sig
Nov 28, 2017
Merged

Fix signature logic - prevent replay attack issue#198
loredanacirstea merged 2 commits intoraiden-network:masterfrom
loredanacirstea:contract-closing-sig

Conversation

@loredanacirstea
Copy link
Copy Markdown
Contributor

Fixes #193
Discovered in #134 (comment)

  • Include contract address in _balance_msg_sig
  • Include contract & sender info in _closing_sig by just signing keccak256(_balance_msg_sig)
  • Remove redundant signature length checks. This is done in ECVerify.ecverify.

Fixes raiden-network#193
- Include contract address in `_balance_msg_sig`
- Include contract & sender info in `_closing_sig` by just signing `keccak256(_balance_msg_sig)`
- Remove redundant signature length checks. This is done in `ECVerify.ecverify`.
receiver,
open_block_number,
balance,
uraiden_instance.address
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

general naming question. I see that uraiden_instance as seen here and in the fixture is actually the uraiden_contract and not an instance of the uraiden_app as the name may imply. It's used quite a lot in tests so this should not be an urgent refactor but I would call it uraiden_contract and not just instance as it can be confusing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use
_instance as an off-the-shelf deployed contract.
_contract as a function that can take other parameters (token, txn data)
get_*_contract for a lower level setup

Agree that the name is not great. Yes, will leave it like this for now, but noted.

@loredanacirstea loredanacirstea merged commit f7818a9 into raiden-network:master Nov 28, 2017
@loredanacirstea loredanacirstea deleted the contract-closing-sig branch November 28, 2017 11:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants