MCPcopy Create free account
hub / github.com/Bitmessage/PyBitmessage / privToPub

Function privToPub

src/highlevelcrypto.py:20–23  ·  view source on GitHub ↗
(privkey)

Source from the content-addressed store, hash-verified

18 return pyelliptic.ECC(curve='secp256k1',pubkey=pubkey_bin)
19# Converts hex private key into hex public key
20def privToPub(privkey):
21 private_key = a.changebase(privkey, 16, 256, minlen=32)
22 public_key = pointMult(private_key)
23 return hexlify(public_key)
24# Encrypts message with hex public key
25def encrypt(msg,hexPubkey):
26 return pyelliptic.ECC(curve='secp256k1').encrypt(msg,hexToPubkey(hexPubkey))

Callers

nothing calls this directly

Calls 1

pointMultFunction · 0.85

Tested by

no test coverage detected