bitcoinlib
bitcoinlib copied to clipboard
Using BIP38 encrypted Private Key throw error
trafficstars
When using a BIP38 encrypted Private Key I get an: EncodingError: Unrecognised password protected key format. Flagbyte incorrect. Error
Minimal example:
from bitcoinlib.keys import Address,Key
public_address = "1CTHRG6Te7dvbb5RQ6JuDv6tNdMH6Fahic"
private_key = "6PnV1MS7UY4wjdAGucW2MdTuDNiTvQPthTjiMex6HNv2NfLXLk8CKQfCnL"
password = "hallohallo"
key = Key(private_key, password=password)
print(key.info())
The pair were generated using bitaddress.org
or am I using it wrong
EC multiplied BIP38 addresses are not supported at the moment. For now I made commit https://github.com/1200wd/bitcoinlib/commit/fe5f9b60d694cda59ab51544164cc329e2dbdd52 to raise a more informative error.
Added EC multiplied keys in release 0.7 and commit 7b1c01607f5231213ec0c26415ea91efeecdd6e4