lightning: avoid secret_multiplier, just use secret
This commit is contained in:
parent
eaf51d59c3
commit
10b5e825e0
@ -858,7 +858,7 @@ def DerivePrivKey(json):
|
|||||||
|
|
||||||
m = rpc_pb2.DerivePrivKeyResponse()
|
m = rpc_pb2.DerivePrivKeyResponse()
|
||||||
|
|
||||||
m.privKey = derivePrivKey(req.keyDescriptor).privkey.secret_multiplier.to_bytes(32, "big")
|
m.privKey = derivePrivKey(req.keyDescriptor).secret.to_bytes(32, "big")
|
||||||
|
|
||||||
msg = json_format.MessageToJson(m)
|
msg = json_format.MessageToJson(m)
|
||||||
return msg
|
return msg
|
||||||
@ -918,7 +918,7 @@ def ScalarMult(json):
|
|||||||
|
|
||||||
point = bitcoin.ser_to_point(req.pubKey)
|
point = bitcoin.ser_to_point(req.pubKey)
|
||||||
|
|
||||||
point = point * privKey.secret_multiplier
|
point = point * privKey.secret
|
||||||
|
|
||||||
c = hashlib.sha256()
|
c = hashlib.sha256()
|
||||||
c.update(bitcoin.point_to_ser(point, True))
|
c.update(bitcoin.point_to_ser(point, True))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user