Struct wownero::cryptonote::onetime_key::KeyRecoverer
source · [−]pub struct KeyRecoverer<'a> {
pub keys: &'a KeyPair,
pub checker: KeyGenerator,
}
Expand description
Helper to compute onetime private keys.
Fields
keys: &'a KeyPair
Private key pair (v, s)
.
checker: KeyGenerator
Key generator used to check and generate intermediate values.
Implementations
sourceimpl<'a> KeyRecoverer<'a>
impl<'a> KeyRecoverer<'a>
sourcepub fn new(keys: &'a KeyPair, tx_pubkey: PublicKey) -> Self
pub fn new(keys: &'a KeyPair, tx_pubkey: PublicKey) -> Self
Construct a onetime key generator from private keys, this is used when scanning transaction outputs to recover private onetime keys.
sourcepub fn recover(&self, oindex: usize, aindex: Index) -> PrivateKey
pub fn recover(&self, oindex: usize, aindex: Index) -> PrivateKey
Recover the onetime private key p
at address index i
(major, minor indexes) and
output index n
such as:
p = { Hn(v*8*R || n) + s i == 0
{ Hn(v*8*R || n) + s + Hn(v || i) otherwise
See sub-address key derivation for more details on address index handling.
Trait Implementations
sourceimpl<'a> Clone for KeyRecoverer<'a>
impl<'a> Clone for KeyRecoverer<'a>
sourcefn clone(&self) -> KeyRecoverer<'a>
fn clone(&self) -> KeyRecoverer<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl<'a> RefUnwindSafe for KeyRecoverer<'a>
impl<'a> Send for KeyRecoverer<'a>
impl<'a> Sync for KeyRecoverer<'a>
impl<'a> Unpin for KeyRecoverer<'a>
impl<'a> UnwindSafe for KeyRecoverer<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more