Skip to content

Update BLS signature/verification to follow Commit-Boost signer module#67

Open
JasonVranek wants to merge 24 commits intomainfrom
signing-domain
Open

Update BLS signature/verification to follow Commit-Boost signer module#67
JasonVranek wants to merge 24 commits intomainfrom
signing-domain

Conversation

@JasonVranek
Copy link
Contributor

computeSigningRoot() was not using BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_NUL_ because it was converting the signingRoot to a G2 point by hand instead of using BLS.hashToG2().

The testValidG2Point case now produces a G2Point identical to what's generated in rust.
* Use hashToG2 when computing signingRoot

computeSigningRoot() was not using BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_NUL_ because it was converting the signingRoot to a G2 point by hand instead of using BLS.hashToG2().

The testValidG2Point case now produces a G2Point identical to what's generated in rust.

* Modify hashToG2 to use BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_
Without including these fields it was unclear how people would verify offchain SignedDelegation messages
"optInDelay": 7200
"optInDelay": 7200,
"signingDomain": "0x00000000000000000000000000000000000000000000000000000000436f6d6d",
"chainId": "0x0000000000000000000000000000000000000000000000000000000000000001"
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be little-endian? I see chainId is not converted to little-endian later. It is used as-is from the config

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This file is just a template for the scripts but great catch, fixing now!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants