The EC (Elliptic Curve) Public Key Hash Factory is a simple implementation to generate a SHA-256 hash of a uncomrpessed EC Public Key. Implemented purely in Python, released under the Apache license. You can use the tool easily via command line without being an openssl or EC expert.
-k or -key: uncompressed hex formated public key, e.g "04ad2d126c3f8f85bf5796f6..."
-u or -unformattedkey: uncompressed hex unformated public key, e.g "04:ad:2d:12:6c:3f:8f:85:bf:
57:96:f6:..."
Supported EC curve:
- NIST256p
Uncompressed format:
The most common formatting specified in PKIX standards. Specified in
X9.62 and SEC1 standards. The only difference between it and
:term:raw encoding is the prepending of a 0x04 byte. Thus an
uncompressed NIST256p public key encoding will be 65 bytes long.
This library is available on PyPI, it's recommended to install it using pip:
pip install ecdsa
or
pip install -r requirements.txt
Example snipet:
python3 ECPublicKeyHashFactory.py -u 04:f3:0f:c0:43:db:66:25:a3:c9:4e:f9:e2:de:62:13:3b:20:8e:b7:e7:88:a4:6b:4c:43:ee:b1:3e:77:dc:f2:7e:c5:75:bf:57:3e:47:fb:89:98:6f:7a:2e:9b:c1:05:e7:7b:78:0c:e2:69:e4:3f:fe:7b:8d:97:80:b0:54:5d:50