-
Notifications
You must be signed in to change notification settings - Fork 217
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
Hash tx metadata before signing #2589
Conversation
@@ -1115,9 +1115,10 @@ spec = describe "SHELLEY_WALLETS" $ do | |||
let dummyChainCode = BS.replicate 32 0 | |||
let sig = CC.xsignature $ BL.toStrict $ getFromResponse id rSig | |||
let key = unsafeXPub $ fst (getFromResponse #getApiVerificationKey rKey) <> dummyChainCode | |||
let msg = unsafeFromHex "A10071706C65617365207369676E20746869732E" | |||
let _msg = unsafeFromHex "A10071706C65617365207369676E20746869732E" |
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.
this one probably we want to delete, right?
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.
Yeah, the string is already shown in the comment above. I deleted it.
pure $ | ||
Signature $ BA.convert $ | ||
CC.sign encPwd (getRawKey addrK) $ | ||
hash @ByteString @Blake2b_256 $ |
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.
lgtm! wonder if we can add some golden testing basing on some already existent test in cardano-node?
1095188
to
9534e73
Compare
I added a cheap "golden" signature check to the same integration test. |
bors r+ |
2589: Hash tx metadata before signing r=rvl a=rvl ### Issue Number ADP-800 ### Overview When signing tx metadata using the `signMetadata` endpoint, hash the message first before signing. Co-authored-by: Rodney Lorrimar <[email protected]>
Build failed:
The build process was killed - hmm! |
5bede68
to
b023425
Compare
bors r+ |
Build succeeded: |
Issue Number
ADP-800
Overview
When signing tx metadata using the
signMetadata
endpoint, hash the message first before signing.