Skip to content

Conversation

@duckki
Copy link

@duckki duckki commented Apr 28, 2024

Summary:

  • Happens when the message is not an address.
  • It's supposed to check if the message is an address, not the public key.
  • Also, fixed bugs in get_version_byte and ecdsa_verify_addr.

Reproducer:

from cryptos import (sha256, Bitcoin, ecdsa_sign)

priv = sha256('some big long brainwallet password')
print("priv:", priv)

chain = Bitcoin()

# take 1
message = "Hello, world!"
signature = ecdsa_sign(message, priv, chain)
print("signature:", signature)

# take 2
signature = ecdsa_sign("", priv, chain)
print("signature:", signature)

# take 3
addr = chain.privtoaddr(priv)
signature = ecdsa_sign(addr, priv, chain)
print("signature:", signature)

- when the message is not an address.
- It's supposed to check if the message is an address, not the public key.
- Also, fixed bugs in `get_version_byte` and `ecdsa_verify_addr`.
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.

3 participants