mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
test_onion: minor protocol change; use single SHA to create both IVs.
Suggested-by: Anthony Towns <aj@erisian.com.au> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -175,7 +175,7 @@ class Onion(object):
|
||||
enckey = cls.tweak_sha(sec, b'\x00')[:16]
|
||||
hmac = cls.tweak_sha(sec, b'\x01')
|
||||
iv = cls.tweak_sha(sec, b'\x02')[:16]
|
||||
pad_iv = cls.tweak_sha(sec, b'\x03')[:16]
|
||||
pad_iv = cls.tweak_sha(sec, b'\x02')[16:]
|
||||
|
||||
return enckey, hmac, iv, pad_iv
|
||||
|
||||
|
||||
Reference in New Issue
Block a user