Trait tari_crypto::commitment::HomomorphicCommitmentFactory [−][src]
Associated Types
Loading content...Required methods
fn commit(
&self,
k: &<Self::P as PublicKey>::K,
v: &<Self::P as PublicKey>::K
) -> HomomorphicCommitment<Self::P>
[src]
&self,
k: &<Self::P as PublicKey>::K,
v: &<Self::P as PublicKey>::K
) -> HomomorphicCommitment<Self::P>
Create a new commitment with the value and blinding factor provided. The implementing type will provide the base values
fn zero(&self) -> HomomorphicCommitment<Self::P>
[src]
return an identity point for addition using the specified base point. This is a commitment to zero with a zero blinding factor on the base point
fn open(
&self,
k: &<Self::P as PublicKey>::K,
v: &<Self::P as PublicKey>::K,
commitment: &HomomorphicCommitment<Self::P>
) -> bool
[src]
&self,
k: &<Self::P as PublicKey>::K,
v: &<Self::P as PublicKey>::K,
commitment: &HomomorphicCommitment<Self::P>
) -> bool
Test whether the given keys open the given commitment
fn commit_value(
&self,
k: &<Self::P as PublicKey>::K,
value: u64
) -> HomomorphicCommitment<Self::P>
[src]
&self,
k: &<Self::P as PublicKey>::K,
value: u64
) -> HomomorphicCommitment<Self::P>
Create a commitment from a spending key and a integer value
fn open_value(
&self,
k: &<Self::P as PublicKey>::K,
v: u64,
commitment: &HomomorphicCommitment<Self::P>
) -> bool
[src]
&self,
k: &<Self::P as PublicKey>::K,
v: u64,
commitment: &HomomorphicCommitment<Self::P>
) -> bool
Test whether the given private key and value open the given commitment
Implementors
impl HomomorphicCommitmentFactory for PedersenCommitmentFactory
[src]
type P = RistrettoPublicKey
fn commit(
&self,
k: &RistrettoSecretKey,
v: &RistrettoSecretKey
) -> PedersenCommitment
[src]
&self,
k: &RistrettoSecretKey,
v: &RistrettoSecretKey
) -> PedersenCommitment
fn zero(&self) -> PedersenCommitment
[src]
fn open(
&self,
k: &RistrettoSecretKey,
v: &RistrettoSecretKey,
commitment: &PedersenCommitment
) -> bool
[src]
&self,
k: &RistrettoSecretKey,
v: &RistrettoSecretKey,
commitment: &PedersenCommitment
) -> bool
fn commit_value(&self, k: &RistrettoSecretKey, value: u64) -> PedersenCommitment
[src]
fn open_value(
&self,
k: &RistrettoSecretKey,
v: u64,
commitment: &HomomorphicCommitment<Self::P>
) -> bool
[src]
&self,
k: &RistrettoSecretKey,
v: u64,
commitment: &HomomorphicCommitment<Self::P>
) -> bool