-
Notifications
You must be signed in to change notification settings - Fork 18
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
[Attack] Cross-chain signature replay #3
Comments
On simple mitigation, if necessary, would be to use |
Good point. But how would |
My understanding is that |
Oh, scratch that. I see the issue. During block execution, we only have the hash for the previous block, not the current one. |
Ok, new idea. This one is stolen from substrate. The CheckGenesis SignedExtension prevents cross-chain signature replay (but not for hard-forks). We maybe implement something similar. |
Can you elaborate how? |
I'm assuming the runtime somehow has read access to the genesis hash. The |
I see it would somehow know but how exactly, i don't know. Got some pointers in Riot chat, |
You can get the genesis hash with dock-substrate/runtime/src/did.rs Line 396 in c7f18d2
dock-substrate/runtime/src/did.rs Line 784 in c7f18d2
SKIP_WASM_BUILD=1 flag to print
|
Many planed signable types, like
Revoke
andDIDRemoval
include a field:last_updated_in_block: BlockNumber,
The field is intended to mitigate replay attacks. AFAIK the mitigation works, but only in the context of a single chain.
In a multi chain environment, e.g. testnet+mainnet, the user may (unwisely) use the same public DID key on both chains. In that case, a signature posted to testnet may be replayed on mainnet and counted valid.
The text was updated successfully, but these errors were encountered: