-
Notifications
You must be signed in to change notification settings - Fork 85
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
Introduce transaction domain tag #184
Conversation
@tarakby can you please have a look here? |
sig, err := signer.Sign(t.EnvelopeMessage()) | ||
message := t.EnvelopeMessage() | ||
message = append(t.TransactionDomainTag, message...) | ||
sig, err := signer.Sign(message) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment doesn't belong to the code above:
Does the SDK also implement verifications for the payload and envelope signatures? If yes, then the tag needs to be prepended to the message in those functions as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the Go SDK doesn't have any transaction signature verification functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @peter!
Do you know if there is a flow-go issue to mirror this SDK change in the verifications on the FVM side ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tarakby this is the change in flow-go onflow/flow-go#606
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🏄♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
sig, err := signer.Sign(t.EnvelopeMessage()) | ||
message := t.EnvelopeMessage() | ||
message = append(t.TransactionDomainTag, message...) | ||
sig, err := signer.Sign(message) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the Go SDK doesn't have any transaction signature verification functionality.
c5e431e
to
05031d5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Closes: #61
Description
Added the transaction domain tag before signing the transaction. The transaction domain tag can be changed, but it has to be changed by all signing parties (if the tx is encoded/decoded when passed from one signer to another signer).
For contributor use:
master
branchFiles changed
in the Github PR explorer