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

initial commit for eip-6384 #6384

Merged
merged 34 commits into from
Jan 31, 2023
Merged

initial commit for eip-6384 #6384

merged 34 commits into from
Jan 31, 2023

Conversation

DeVaz1
Copy link
Contributor

@DeVaz1 DeVaz1 commented Jan 26, 2023

When opening a pull request to submit a new EIP, please use the suggested template: https://github.com/ethereum/EIPs/blob/master/eip-template.md

We have a GitHub bot that automatically merges some PRs. It will merge yours immediately if certain criteria are met:

  • The PR edits only existing draft PRs.
  • The build passes.
  • Your GitHub username or email address is listed in the 'author' header of all affected PRs, inside .
  • If matching on email address, the email address is the one publicly listed on your GitHub profile.

@DeVaz1 DeVaz1 requested a review from eth-bot as a code owner January 26, 2023 18:53
@github-actions github-actions bot added c-new Creates a brand new proposal e-number Waiting on EIP Number assignment s-draft This EIP is a Draft t-interface labels Jan 26, 2023
@eth-bot
Copy link
Collaborator

eth-bot commented Jan 26, 2023

All tests passed; auto-merging...

(pass) eip-6384.md

classification
updateEIP
  • passed!

(pass) assets/eip-6384/implementation/src/IEvalEIP712Buffer.sol

classification
ambiguous
  • file assets/eip-6384/implementation/src/IEvalEIP712Buffer.sol is associated with EIP 6384; because there are also changes being made to EIPS/eip-6384.md all changes to corresponding assets are also allowed

(pass) assets/eip-6384/implementation/src/MyToken/MyToken.sol

classification
ambiguous
  • file assets/eip-6384/implementation/src/MyToken/MyToken.sol is associated with EIP 6384; because there are also changes being made to EIPS/eip-6384.md all changes to corresponding assets are also allowed

(pass) assets/eip-6384/implementation/src/MyToken/MyToken712ParserHelper.sol

classification
ambiguous
  • file assets/eip-6384/implementation/src/MyToken/MyToken712ParserHelper.sol is associated with EIP 6384; because there are also changes being made to EIPS/eip-6384.md all changes to corresponding assets are also allowed

(pass) assets/eip-6384/implementation/src/MyToken/MyTokenStructs.sol

classification
ambiguous
  • file assets/eip-6384/implementation/src/MyToken/MyTokenStructs.sol is associated with EIP 6384; because there are also changes being made to EIPS/eip-6384.md all changes to corresponding assets are also allowed

(pass) assets/eip-6384/implementation/src/SeaPort/SeaPort712ParserHelper.sol

classification
ambiguous
  • file assets/eip-6384/implementation/src/SeaPort/SeaPort712ParserHelper.sol is associated with EIP 6384; because there are also changes being made to EIPS/eip-6384.md all changes to corresponding assets are also allowed

(pass) assets/eip-6384/implementation/src/SeaPort/SeaPortMock.sol

classification
ambiguous
  • file assets/eip-6384/implementation/src/SeaPort/SeaPortMock.sol is associated with EIP 6384; because there are also changes being made to EIPS/eip-6384.md all changes to corresponding assets are also allowed

(pass) assets/eip-6384/implementation/src/SeaPort/SeaPortStructs.sol

classification
ambiguous
  • file assets/eip-6384/implementation/src/SeaPort/SeaPortStructs.sol is associated with EIP 6384; because there are also changes being made to EIPS/eip-6384.md all changes to corresponding assets are also allowed

(pass) assets/eip-6384/implementation/test/MyToken.t.sol

classification
ambiguous
  • file assets/eip-6384/implementation/test/MyToken.t.sol is associated with EIP 6384; because there are also changes being made to EIPS/eip-6384.md all changes to corresponding assets are also allowed

(pass) assets/eip-6384/implementation/test/OrderGenerator.sol

classification
ambiguous
  • file assets/eip-6384/implementation/test/OrderGenerator.sol is associated with EIP 6384; because there are also changes being made to EIPS/eip-6384.md all changes to corresponding assets are also allowed

(pass) assets/eip-6384/implementation/test/SeaPort712Parser.t.sol

classification
ambiguous
  • file assets/eip-6384/implementation/test/SeaPort712Parser.t.sol is associated with EIP 6384; because there are also changes being made to EIPS/eip-6384.md all changes to corresponding assets are also allowed

(pass) assets/eip-6384/implementation/test/SigUtils.sol

classification
ambiguous
  • file assets/eip-6384/implementation/test/SigUtils.sol is associated with EIP 6384; because there are also changes being made to EIPS/eip-6384.md all changes to corresponding assets are also allowed

(pass) assets/eip-6384/media/MiceyMask-non-compliant.png

classification
ambiguous
  • file assets/eip-6384/media/MiceyMask-non-compliant.png is associated with EIP 6384; because there are also changes being made to EIPS/eip-6384.md all changes to corresponding assets are also allowed

(pass) assets/eip-6384/media/ZenGo-EIP-compliant.png

classification
ambiguous
  • file assets/eip-6384/media/ZenGo-EIP-compliant.png is associated with EIP 6384; because there are also changes being made to EIPS/eip-6384.md all changes to corresponding assets are also allowed

@github-actions github-actions bot added the w-ci Waiting on CI to pass label Jan 26, 2023
Copy link
Contributor

@SamWilsn SamWilsn left a comment

Choose a reason for hiding this comment

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

I haven't reviewed this at all, but I can tell from the number of changed files that something has been included here that shouldn't be.

Your reference implementation should contain only the minimum code required to implement your EIP, and shouldn't contain any build system files (eg. hardhat or foundry) or libraries.

EIPS/eip-readable-signatures.md Outdated Show resolved Hide resolved
DeVaz1 and others added 4 commits January 29, 2023 11:11
Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>
@SamWilsn SamWilsn closed this Jan 30, 2023
@SamWilsn SamWilsn reopened this Jan 30, 2023
@github-actions github-actions bot removed the e-number Waiting on EIP Number assignment label Jan 30, 2023
@github-actions
Copy link

The commit 80f5e6f (as a parent of 0c3bf82) contains errors.
Please inspect the Run Summary for details.

@github-actions github-actions bot removed the w-ci Waiting on CI to pass label Jan 30, 2023
EIPS/eip-6384.md Outdated Show resolved Hide resolved
EIPS/eip-6384.md Outdated Show resolved Hide resolved
EIPS/eip-6384.md Outdated Show resolved Hide resolved
EIPS/eip-6384.md Outdated Show resolved Hide resolved
EIPS/eip-6384.md Outdated Show resolved Hide resolved
EIPS/eip-6384.md Show resolved Hide resolved
EIPS/eip-6384.md Outdated Show resolved Hide resolved
EIPS/eip-6384.md Show resolved Hide resolved
EIPS/eip-6384.md Outdated Show resolved Hide resolved
Please note that if the explanation was part of the message to sign it would have been under the control of the attacker and hence irrelevant for security purposes.

Since the added functionality to the contract has the “view” modifier, it cannot change the on-chain state and harm the existing functionalities of the contract.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think you should still mention the attack where an attacker creates both a fake website and a fake contract, and the fake contract gives a misleading description. If the real contract's domain separator doesn't contain verifyingContract than the fake contract can give whatever fraudulent description it wants.

Then you can say the attack is prevented by requiring that wallets only attempt to get descriptions when the domain separator contains a verifying contract.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if it's a fake contract, then it has no access to the users assets, therefore not a relevant attack scenario, hence not in scope

Copy link
Contributor

Choose a reason for hiding this comment

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

A signed message without verifyingContract in the domain separator would be valid for both the fake contract, and more importantly, for the real contract, right?

Copy link
Contributor

Choose a reason for hiding this comment

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

if there is no verifyingContract we already mentioned explicitly "In case the EIP-712 message is not bounded to a contract, the wallet cannot call this function as the contract address is unknown and SHOULD default to its current display."

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry the updated wording is "If verifyingContract is not included in the EIP-712 domain separator, wallets MUST NOT retrieve a human-readable description using this EIP. In this case, wallets SHOULD fallback to their original EIP-712 display."

Copy link
Contributor

Choose a reason for hiding this comment

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

Additionally, the signature of the rogue contract will not be valid for. the good contract, as the malicious contract buffer contains a verifyingContract in as the domain separator that would fail the signature validation for the good contract as it does not take this parameter into consideration when doing ecrecover.

DeVaz1 and others added 7 commits January 30, 2023 18:51
Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>
Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>
Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>
Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>
Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>
Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>
Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>
DeVaz1 and others added 9 commits January 30, 2023 19:06
Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>
Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>
Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>
Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>
Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>
Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>
@DeVaz1 DeVaz1 changed the title initial commit for eip-readable-signatures initial commit for eip-6384 Jan 30, 2023
Copy link
Contributor

@SamWilsn SamWilsn left a comment

Choose a reason for hiding this comment

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

Looks good, few small things I missed previously.

Would you also mind removing the unused media files? The repository is big enough as it is 🤣

EIPS/eip-6384.md Outdated Show resolved Hide resolved
EIPS/eip-6384.md Outdated Show resolved Hide resolved
EIPS/eip-6384.md Outdated Show resolved Hide resolved
EIPS/eip-6384.md Outdated Show resolved Hide resolved
DeVaz1 and others added 4 commits January 31, 2023 00:08
Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>
Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>
Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>
Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>
@DeVaz1 DeVaz1 closed this Jan 30, 2023
@DeVaz1 DeVaz1 reopened this Jan 30, 2023
EIPS/eip-6384.md Outdated Show resolved Hide resolved
@eth-bot eth-bot enabled auto-merge (squash) January 31, 2023 00:27
@eth-bot eth-bot merged commit ee5cf6d into ethereum:master Jan 31, 2023
iseriohn pushed a commit to iseriohn/EIP-NFT-Rights-Management that referenced this pull request Feb 16, 2023
* initial commit for eip-readable-signatures

* Update EIPS/eip-readable-signatures.md

Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>

* removed build files

* updated links

* updated links

* eip.md updated according to linter suggestions

* updated EIP according to linter

* updated the eip according to the linter

* fixed linter errors at the md file

* Update EIPS/eip-6384.md

Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>

* Update EIPS/eip-6384.md

Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>

* Update EIPS/eip-6384.md

Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>

* Update EIPS/eip-6384.md

Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>

* Update EIPS/eip-6384.md

Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>

* Update EIPS/eip-6384.md

Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>

* Update EIPS/eip-6384.md

Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>

* Update EIPS/eip-6384.md

Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>

* Update EIPS/eip-6384.md

Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>

* Update EIPS/eip-6384.md

Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>

* Update EIPS/eip-6384.md

Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>

* Update EIPS/eip-6384.md

Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>

* Update EIPS/eip-6384.md

Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>

* Update EIPS/eip-6384.md

Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>

* Update EIPS/eip-6384.md

Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>

* updated signature paramater name to typedDataBuffer

* updated signature paramater name to typedDataBuffer

* added explanation to the rationale section

* Update EIPS/eip-6384.md

Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>

* Update EIPS/eip-6384.md

Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>

* Update EIPS/eip-6384.md

Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>

* Update EIPS/eip-6384.md

Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>

* removed unnecessary media

* removed unnecessary media

* Update EIPS/eip-6384.md

---------

Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-new Creates a brand new proposal s-draft This EIP is a Draft t-erc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants