Bitcoin Forum
May 02, 2024, 08:06:24 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Publickey/ETH address python help  (Read 35 times)
Coinoplex (OP)
Copper Member
Sr. Member
****
Offline Offline

Activity: 250
Merit: 412


Building A Crypto Empire


View Profile
January 21, 2022, 01:42:54 AM
 #1

Hello guys again,

Last time I posted about Bitcoin address recovery, this time its to do with Ethereum address recovery.

I am using eth-keys python package for testing purposes  (https://pypi.org/project/eth-keys/)

Trying to recover the PublicKey by providing the message and signature.
The function I am calling is:

Code:
eth_keys.KeyAPI.PublicKey.recover_from_msg(message, signature)

Params:

Code:
msg = 'its wed jan 19, 0244;2022' 
message = bytes(msg, 'utf-8')
signature = bytes.fromhex('206d55f3108c016ed650a01b9e5ebd6bc0278aebbb545a3afeda42aa19eb15780686127622c09f08c31565a3eda085bfc239d1973215f4d0818ed6537487b2461b')

Its returning this error:
 
Code:
coincurve/ecdsa.py", line 60, in deserialize_recoverable raise ValueError('Invalid recovery id.') ValueError: Invalid recovery id. 
eth_keys/backends/coincurve.py", line 105, in ecdsa_recover except (ValueError, Exception) as err: eth_keys.exceptions.BadSignature: Invalid recovery id.

When I try to print out the recovery_id being passed in the code it returns: 27

Need some ideas on this, is that correct recovery_id? Between I have been searching for days trying to figure out other issues with this eth-package, and now the dependency “coincurve” is raising this error.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!