[][src]Struct private_currency::crypto::Opening

pub struct Opening {
    pub value: u64,
    // some fields omitted
}

Opening for a Pedersen commitment.

Theory

See Commitment docs for details on Pedersen commitments and their openings.

Arithmetic

Akin to Commitments, openings can be added and subtracted. If an over/underflow occurs when adding or subtracting committed values, a panic is raised.

Implementation details

Although committed value x is generally a scalar in the used prime-order group, we restrict it to u64. The conversion is straightforward.

Fields

Committed value.

Methods

impl Opening
[src]

Attempts to deserialize an opening from a slice.

Serializes this opening to bytes.

Implementation details

Serialization consists of a committed value (8 bytes, little-endian) and a Ristretto scalar (32 bytes).

Trait Implementations

impl Clone for Opening
[src]

Performs copy-assignment from source. Read more

impl Eq for Opening
[src]

impl PartialEq<Opening> for Opening
[src]

impl Debug for Opening
[src]

impl Sub<Opening> for Opening
[src]

The resulting type after applying the - operator.

impl<'a, 'b> Sub<&'b Opening> for &'a Opening
[src]

The resulting type after applying the - operator.

impl Add<Opening> for Opening
[src]

The resulting type after applying the + operator.

impl AddAssign<Opening> for Opening
[src]

impl SubAssign<Opening> for Opening
[src]

Auto Trait Implementations

impl Send for Opening

impl Sync for Opening

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Erased for T

impl<T> Erased for T

impl<Q, K> Equivalent for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> Same for T

Should always be Self