mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-23 00:54:20 +01:00
test_onion.py: drop unused part of message secrets
This commit is contained in:
@@ -106,9 +106,9 @@ class Onion(object):
|
|||||||
if sec is None:
|
if sec is None:
|
||||||
raise Exception("HMAC did not verify")
|
raise Exception("HMAC did not verify")
|
||||||
|
|
||||||
self.enckey = self.tweak_sha(sec, b'\x00')
|
self.enckey = self.tweak_sha(sec, b'\x00')[:16]
|
||||||
self.iv = self.tweak_sha(sec, b'\x02')
|
self.iv = self.tweak_sha(sec, b'\x02')[:16]
|
||||||
self.pad_iv = self.tweak_sha(sec, b'\x03')
|
self.pad_iv = self.tweak_sha(sec, b'\x03')[:16]
|
||||||
|
|
||||||
def check_hmac(self, hmac_key):
|
def check_hmac(self, hmac_key):
|
||||||
calc = hmac_sha256(hmac_key, self.onion[:-self.HMAC_LEN])
|
calc = hmac_sha256(hmac_key, self.onion[:-self.HMAC_LEN])
|
||||||
|
|||||||
Reference in New Issue
Block a user