-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
ipfs key sign|verify #10230
Comments
This is tricky, digital signatures are harder to use than it looks, for example some ethereum applications would sign arbitrary bytes and attackers could inject theses to be let's say an ethereum transaction. Then there were the development of https://eips.ethereum.org/EIPS/eip-712 which adds enough salting that if you fuck it up this is limited to one dapp, not complete account take over. Given here keys don't hold money this is less of concern but overall without knowing how the user is gonna use them this seems a bit reckless. |
Before filling this issue, I did some threat modeling and RPC
You have a fair point about user-friendly signing methods always being prefixed:
For real use cases like Brave and dapps/extensions with scoped RPC access (#10229), we don't: We could restrict Thoughts? |
The prefix is good, it gets 80% of the safety here. So something like this |
This is a placeholder issue for implementing commands that allow the end user to sign arbitrary bytes with one of the keys (over CLI and RPC).
Constraints
/api/v0/
ipfs pubsub
and we ended up base-encoding the payload to avoid mangling in transit (fix: multibase in pubsub http rpc #8183)<data>
sent on the wire to be encoded in multibase64Command design
To remove any ambiguity, we should use JSON output:
for
verify
also allow passing third-party keys as cidv1 with libp2p-key codec:Use cases
The text was updated successfully, but these errors were encountered: