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

isCompressedKey not forwarded to SignCompact – Intentional or Bug? #4885

Open
gacevicljubisa opened this issue Oct 31, 2024 · 0 comments
Open

Comments

@gacevicljubisa
Copy link
Contributor

gacevicljubisa commented Oct 31, 2024

⚠️ Support requests in an issue-format will be closed immediately. For support, go to Swarm's Discord.

Context

  • Bee Version: latest

Summary

The isCompressedKey parameter in pkg/crypto/signer.go appears to be unused in SignCompact, which could lead to unexpected behavior.
Is this intentional behaviour?

Expected behavior

The isCompressedKey parameter should influence the btcecdsa.SignCompact call directly to ensure the correct signing format is applied, as the isCompressedKey variable is intended to define the key compression type.

Actual behavior

The isCompressedKey parameter is defined but is not passed to btcecdsa.SignCompact here. Instead, it is set but not used in the signing process, potentially resulting in signing with the wrong format.

Steps to reproduce

  • Examine the isCompressedKey variable in the d.sign(hash, true) method, where isCompressedKey is set to true.
  • Notice that isCompressedKey is not forwarded to the btcecdsa.SignCompact function here.

Possible solution

Update SignCompact to forward isCompressedKey to btcecdsa.SignCompact, ensuring the function call respects the compressed key setting.

@gacevicljubisa gacevicljubisa added the needs-triaging new issues that need triaging label Oct 31, 2024
@gacevicljubisa gacevicljubisa changed the title isCompressedKey Not Forwarded to SignCompact in signer.go isCompressedKey not forwarded to SignCompact in signer.go Oct 31, 2024
@gacevicljubisa gacevicljubisa changed the title isCompressedKey not forwarded to SignCompact in signer.go isCompressedKey not forwarded to SignCompact in signer.go Oct 31, 2024
@gacevicljubisa gacevicljubisa changed the title isCompressedKey not forwarded to SignCompact in signer.go isCompressedKey not forwarded to SignCompact in signer.go Oct 31, 2024
@gacevicljubisa gacevicljubisa changed the title isCompressedKey not forwarded to SignCompact in signer.go isCompressedKey not forwarded to SignCompact – Intentional or Bug? Nov 4, 2024
@gacevicljubisa gacevicljubisa removed the needs-triaging new issues that need triaging label Nov 5, 2024
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

1 participant