Skip to content

Conversation

@amalcaraz
Copy link
Collaborator

A fix for the issue in the verify_signature function at src/aleph/toolkit/ecdsa.py:70.

The Problem:

public_key = PublicKey.from_hex(public_key_hex)  # This method doesn't exist

The Fix:

public_key = PublicKey(bytes.fromhex(public_key_hex))  # Correct way to create PublicKey

What was happening:

  • When verify_auth_token called verify_signature, it would throw an AttributeError because PublicKey.from_hex() doesn't exist in the coincurve library
  • The exception was caught by the except Exception: block and returned False
  • So verify_auth_token always returned False, even with valid tokens and matching keypairs

@amalcaraz amalcaraz self-assigned this Oct 30, 2025
@odesenfans odesenfans merged commit a4a0d8f into main Nov 7, 2025
5 checks passed
@odesenfans odesenfans deleted the angel-fix_ecdsa_verify branch November 7, 2025 12:19
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