From 6bb9ee0cf7996482f2554d781af027d52c2f273b Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Sat, 13 Jun 2015 08:34:56 +0300 Subject: [PATCH] bitcoin: remove dead code --- lib/bitcoin.py | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/lib/bitcoin.py b/lib/bitcoin.py index fd82432b..ff070000 100644 --- a/lib/bitcoin.py +++ b/lib/bitcoin.py @@ -20,7 +20,6 @@ import hashlib import base64 import re -import sys import hmac import version @@ -173,31 +172,6 @@ def is_old_seed(seed): # pywallet openssl private key implementation -def i2d_ECPrivateKey(pkey, compressed=False): - if compressed: - key = '3081d30201010420' + \ - '%064x' % pkey.secret + \ - 'a081a53081a2020101302c06072a8648ce3d0101022100' + \ - '%064x' % _p + \ - '3006040100040107042102' + \ - '%064x' % _Gx + \ - '022100' + \ - '%064x' % _r + \ - '020101a124032200' - else: - key = '308201130201010420' + \ - '%064x' % pkey.secret + \ - 'a081a53081a2020101302c06072a8648ce3d0101022100' + \ - '%064x' % _p + \ - '3006040100040107044104' + \ - '%064x' % _Gx + \ - '%064x' % _Gy + \ - '022100' + \ - '%064x' % _r + \ - '020101a144034200' - - return key.decode('hex') + i2o_ECPublicKey(pkey.pubkey, compressed) - def i2o_ECPublicKey(pubkey, compressed=False): # public keys are 65 bytes long (520 bits) # 0x04 + 32-byte X-coordinate + 32-byte Y-coordinate @@ -348,10 +322,6 @@ def GetPubKey(pubkey, compressed=False): return i2o_ECPublicKey(pubkey, compressed) -def GetPrivKey(pkey, compressed=False): - return i2d_ECPrivateKey(pkey, compressed) - - def GetSecret(pkey): return ('%064x' % pkey.secret).decode('hex')