[−][src]Struct nazgul::dlsag::DLSAG
Dual Linkable Spontaneous Anonymous Group Signature for Ad Hoc Groups
DLSAG: Non-Interactive Refund Transactions For Interoperable Payment Channels in Monero
This is a a novel linkable ring signature scheme that enables for the first time refund transactions natively in Monero
Read the paper on how to use it to implement payment channels.
Please read tests at the bottom of the source code for this module for examples on how to use it
Fields
challenge: Scalar
responses: Vec<Scalar>
ring: Vec<(RistrettoPoint, RistrettoPoint, Scalar)>
key_image: RistrettoPoint
b: bool
Trait Implementations
impl Clone for DLSAG
[src]
impl KeyImageGen<(RistrettoPoint, Scalar, Scalar), RistrettoPoint> for DLSAG
[src]
fn generate_key_image<Hash: Digest<OutputSize = U64> + Clone + Default>(
k: (RistrettoPoint, Scalar, Scalar)
) -> RistrettoPoint
[src]
k: (RistrettoPoint, Scalar, Scalar)
) -> RistrettoPoint
Some signature schemes require the key images to be signed as well. Use this method to generate them
impl KeyImageGen<(Scalar, RistrettoPoint, Scalar), RistrettoPoint> for DLSAG
[src]
fn generate_key_image<Hash: Digest<OutputSize = U64> + Clone + Default>(
k: (Scalar, RistrettoPoint, Scalar)
) -> RistrettoPoint
[src]
k: (Scalar, RistrettoPoint, Scalar)
) -> RistrettoPoint
Some signature schemes require the key images to be signed as well. Use this method to generate them
impl Link for DLSAG
[src]
fn link(signature_1: DLSAG, signature_2: DLSAG) -> bool
[src]
This is for linking two signatures and checking if they are signed by the same person
impl Sign<(RistrettoPoint, Scalar, Scalar), Vec<(RistrettoPoint, RistrettoPoint, Scalar)>> for DLSAG
[src]
fn sign<Hash: Digest<OutputSize = U64> + Clone + Default, CSPRNG: CryptoRng + RngCore + Default>(
k: (RistrettoPoint, Scalar, Scalar),
ring: Vec<(RistrettoPoint, RistrettoPoint, Scalar)>,
secret_index: usize,
message: &Vec<u8>
) -> DLSAG
[src]
k: (RistrettoPoint, Scalar, Scalar),
ring: Vec<(RistrettoPoint, RistrettoPoint, Scalar)>,
secret_index: usize,
message: &Vec<u8>
) -> DLSAG
To sign you need k
your private key, and ring
which is the public keys of everyone
except you. You are signing the message
The private key k
in this case is your private key, the public key of the other end of
the channel and a random bitstring generated by hashing-to-scalar: the transaction ID, and
output index.
The ring contains public key pairs from the blockchain together with their random bitstrings as mentioned above.
This implementation of sign(...)
is for the user who has the private key for the right
side of the channel
impl Sign<(Scalar, RistrettoPoint, Scalar), Vec<(RistrettoPoint, RistrettoPoint, Scalar)>> for DLSAG
[src]
fn sign<Hash: Digest<OutputSize = U64> + Clone + Default, CSPRNG: CryptoRng + RngCore + Default>(
k: (Scalar, RistrettoPoint, Scalar),
ring: Vec<(RistrettoPoint, RistrettoPoint, Scalar)>,
secret_index: usize,
message: &Vec<u8>
) -> DLSAG
[src]
k: (Scalar, RistrettoPoint, Scalar),
ring: Vec<(RistrettoPoint, RistrettoPoint, Scalar)>,
secret_index: usize,
message: &Vec<u8>
) -> DLSAG
To sign you need k
your private key, and ring
which is the public keys of everyone
except you. You are signing the message
The private key k
in this case is your private key, the public key of the other end of
the channel and a random bitstring generated by hashing-to-scalar: the transaction ID, and
output index.
The ring contains public key pairs from the blockchain together with their random bitstrings as mentioned above.
This implementation of sign(...)
is for the user who has the private key for the left
side of the channel
impl Verify for DLSAG
[src]
Auto Trait Implementations
impl RefUnwindSafe for DLSAG
impl Send for DLSAG
impl Sync for DLSAG
impl Unpin for DLSAG
impl UnwindSafe for DLSAG
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,
pub 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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,