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

Insecure digital signature #7

Open
targon opened this issue Oct 23, 2023 · 1 comment
Open

Insecure digital signature #7

targon opened this issue Oct 23, 2023 · 1 comment

Comments

@targon
Copy link

targon commented Oct 23, 2023

In step 1.(3) of the protocol the payment hash is used directly as the message hash for a digital signature. This is not a secure way to create digital signatures, you need to hash the message (=payment hash) one more time to get to the message hash. If you do not do this, signatures can be forged by randomly creating the signature parameters first and deriving the message hash from them.

(You may get away with this here because then nobody knows the preimage, but I would still consider it bad practice!)

@supertestnet
Copy link
Owner

I think it is secure because if someone forges a signature in the manner you describe they will not be able to settle the payment, so the sender won't lose any money

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

No branches or pull requests

2 participants