From bb26fc302681fa5820dca9ff5f47de414c0a3564 Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Mon, 5 Oct 2015 17:44:49 +1000 Subject: [PATCH] test_onion.py: drop unused part of message secrets --- test/test_onion.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test_onion.py b/test/test_onion.py index 1a38f6cd0..3c6067db1 100644 --- a/test/test_onion.py +++ b/test/test_onion.py @@ -106,9 +106,9 @@ class Onion(object): if sec is None: raise Exception("HMAC did not verify") - self.enckey = self.tweak_sha(sec, b'\x00') - self.iv = self.tweak_sha(sec, b'\x02') - self.pad_iv = self.tweak_sha(sec, b'\x03') + self.enckey = self.tweak_sha(sec, b'\x00')[:16] + self.iv = self.tweak_sha(sec, b'\x02')[:16] + self.pad_iv = self.tweak_sha(sec, b'\x03')[:16] def check_hmac(self, hmac_key): calc = hmac_sha256(hmac_key, self.onion[:-self.HMAC_LEN])