Skip to content
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

Make Crypto contract compatible with Ethereum #537

Closed
2 tasks done
turbolent opened this issue Jan 19, 2021 · 9 comments
Closed
2 tasks done

Make Crypto contract compatible with Ethereum #537

turbolent opened this issue Jan 19, 2021 · 9 comments

Comments

@turbolent
Copy link
Member

turbolent commented Jan 19, 2021

Issue To Be Solved

It would be nice to verify Ethereum signatures in a Cadence contract.

Suggested Solution

  • Add Keccak hashing algorithm
  • Allow providing a custom tag, e.g. the Ethereum personal signed message prefix
@turbolent turbolent self-assigned this Jan 19, 2021
@turbolent turbolent removed their assignment Oct 28, 2021
@KSlashh
Copy link

KSlashh commented Dec 8, 2021

We need keccak256 !

@KSlashh
Copy link

KSlashh commented Dec 8, 2021

To deal with cross chain message from EVM compatible chain, keccak256 is necessary.

@btspoony
Copy link

btspoony commented Dec 8, 2021

To deal with cross chain message from EVM compatible chain, keccak256 is necessary.

I think there are two things we are missing:

  1. keccak256 Hash Algorithm support
  2. a recover function for keys using ECDSA Algorithm , since EVM Tx only have signature and recoverId

@superdcc
Copy link

We need keccak256 !

@turbolent turbolent added the Good First Issue Good for newcomers label Dec 10, 2021
This was referenced Dec 27, 2021
@turbolent
Copy link
Member Author

Adding the Keccak256 hash algorithm was requested in #1326 and implemented in #1327

@turbolent
Copy link
Member Author

Is there still a need for a custom tag? cc @tarakby

@tarakby
Copy link
Contributor

tarakby commented Oct 3, 2022

@turbolent custom tags can be used when verifying ECDSA signatures so I guess you can tick the second item of the issue.

@turbolent
Copy link
Member Author

@tarakby Sounds good! Does that mean we can close the issue as done?

@tarakby
Copy link
Contributor

tarakby commented Oct 5, 2022

Yes, enabling Keccak and custom tags is done (the items on the issue description). However this doesn't mean the crypto of Cadence is totally compatible with Ethereum (title of the issue) because the equivalent of ecrecover isn't supported by Cadence.
We could close this issue and ecrecover can be the subject of another issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants