-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Security: Include the sink AccountId in the signed message for ToPublic transactions #324
Conversation
@SupremoUGH I don't think we should keep the public polkadot key in the State, was talking with Charlie. The key is needed only for signing so the easiest way in the perspective for current signer is to be provided from the front end in its request for signing as it can already see and process all the public accounts from polkadotjs. Keeping the public key in signer just complicates how we save history and state as right now state is constructed based on a KeySecret from a mnemonic(signer account). As for the signer-extension it would be easy to get and keep(cache) the keys as you have polkadotjs API directly or even the registed accounts in the extension itself. |
Due to the bug where an attacker could perform a replay attack on someone's valid ToPublic post by changing the public
AccountId
, we needed to sign this last field together with theTransferPostBody
.Main changes:
-
auth::sign
andauth::verify
now takeBodyWithAccountsRef
instead ofTransferPostBody
.AccountId
is now an associated type of theConfiguration
trait, instead of theLedger
one.Transaction
enum in theToPublic
case now includes anAccountId
.TransferPost
includes asink_accounts
field.IdentityVerification::verify
now verifies against apublic_account
as well.identity_proof
also takes (a vector of)C::AccountId
as input.Misc:
clap
dependency so it passes the lint after the latest rustup update.identity_proof
clumsy function: Identity Proof abstraction #325Related PRs:
Before we can merge this PR, please make sure that all the following items have been checked off:
CHANGELOG.md
and added the appropriatechangelog
label to the PR.Files changed
in the GitHub PR explorer.CONTRIBUTING.md
.