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

USE NftAttesatation hash signature as CSR #226

Open
oleggrib opened this issue Dec 22, 2021 · 0 comments
Open

USE NftAttesatation hash signature as CSR #226

oleggrib opened this issue Dec 22, 2021 · 0 comments
Assignees

Comments

@oleggrib
Copy link
Collaborator

Based on the #203 , last @jot2re comments say the same.

For NFT attestation currently User signs

  1. simple text string as CSR (Certificate Signing Request)
  2. whole object IdAttestation+NFTpayload and add signature to the object

My suggestion is to separate IdAttestation and NFTpayload
So

  1. user creates NFTpayload object. HASH it , adds it to the text template and sign that string. ("Sign to create your TwitterID attestation. nonce: 0x45a8b78... , timestamp: 3992770271")
  2. user send HASH+template+timestamp+users_string_signature+auth0_data to the attestation.id (attestation.id creates string and validate it against signature)
  3. construct object; IdAttestation+payload+step1_string_signature to the smart contract
    in this case IdAttestation signed by attestor, payload signed by user. attestation.id dont know what payload do we use and user need to make single signature only.

In case if Attestation TTL limited to 1 day, then it fix multiple problems:

  • CSR reuse
  • IdAttestation reuse when twitterId sold
  • avoid weird signature
  • avoid double signing

If @JamesSmartCell can update VerificationContract to read EIP712 signature then we can use EIP712 instead of the text.

@colourful-land , does that make sense?

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

2 participants