pub struct MulProof {
    pub f: BigInt,
    pub z1: BigInt,
    pub z2: BigInt,
    pub e_d: BigInt,
    pub e_db: BigInt,
}
Expand description

This proof is a non-interactive version of Multiplication-mod-n^s protocol taken from DJ01 [https://www.brics.dk/RS/00/45/BRICS-RS-00-45.pdf ]

The prover knows 3 plaintexts a,b,c such that ab = c mod n. The prover goal is to prove that a triplet of ciphertexts encrypts plaintexts a,b,c holding the multiplication relationship

Witness: {a,b,c,r_a,r_b,r_c}

Statement: {e_a, e_b, e_c, ek}

Protocol:

  1. P picks random values d from Z_n, r_d from Z_n* and computes e_d = Enc_ek(d,r_d), e_db = Enc_ek(db, r_d*r_b)
  2. using Fiat-Shamir the parties computes a challenge e
  3. P sends f = ea + d mod n , z1 = r_a^e *r_d mod n^2, z2 = r_b^f * (r_db * r_c^e)^-1 mod n^2
  4. V checks: e_a^e * e_d = Enc_ek(f, z1), e_b^f*(e_db*e_c^e)^-1 = Enc_pk(0, z2)

Fields

f: BigIntz1: BigIntz2: BigInte_d: BigInte_db: BigInt

Implementations

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.