Move ecdh derivation up to prevent Scalar::one() * ecdh

This commit is contained in:
Luke Parker
2023-03-11 10:51:40 -05:00
parent 5e62072a0f
commit 36034c2f72
3 changed files with 10 additions and 19 deletions

View File

@@ -1,3 +1,4 @@
use core::ops::Deref;
use std::io::{self, Read, Write};
use zeroize::{Zeroize, ZeroizeOnDrop};
@@ -316,8 +317,7 @@ impl Scanner {
};
let (view_tag, shared_key, payment_id_xor) = shared_key(
if self.burning_bug.is_none() { Some(uniqueness(&tx.prefix.inputs)) } else { None },
&self.pair.view,
key,
self.pair.view.deref() * key,
o,
);