[−][src]Struct monero::cryptonote::onetime_key::KeyGenerator
Helper to generate One-Time Public keys (ephemeral keys) in transactions
Fields
spend: PublicKey
Spend public key S
rv: PublicKey
Intermediate key v*8*R
or r*8*V
used during the generation process
Methods
impl KeyGenerator
[src]
pub fn from_random(
view: PublicKey,
spend: PublicKey,
random: PrivateKey
) -> Self
[src]
view: PublicKey,
spend: PublicKey,
random: PrivateKey
) -> Self
Construct a One-time key generator from public keys and secret random, this is used to generate One-time keys for output indexes from an address when sending funds
pub fn from_key(keys: &ViewPair, random: PublicKey) -> Self
[src]
Construct a One-time key generator from private keys and public random (tx pubkey), this is used to scan if some outputs contains One-time keys owned by the view pair
pub fn one_time_key(&self, index: usize) -> PublicKey
[src]
Compute the One-time public key P = Hn(r*8*V || n)*G + S
for the indexed output n
pub fn check(&self, index: usize, key: PublicKey) -> bool
[src]
Check if key P
is equal to indexed key P'
, if true the output is own by the address,
used when scanning transaction outputs, if true the One-time key is related to the keys
pub fn get_rvn_scalar(&self, index: usize) -> PrivateKey
[src]
Computes Hn(v*8*R || n)
and interpret it as a scalar
Trait Implementations
impl Clone for KeyGenerator
[src]
fn clone(&self) -> KeyGenerator
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for KeyGenerator
[src]
Auto Trait Implementations
impl RefUnwindSafe for KeyGenerator
impl Send for KeyGenerator
impl Sync for KeyGenerator
impl Unpin for KeyGenerator
impl UnwindSafe for KeyGenerator
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,