Expand description
§Proofs of properties of RSA or Paillier modulus
Implements the protocols described in the papers Efficient Noninteractive Certification of RSA Moduli and Beyond and UC Non-Interactive, Proactive, Distributed ECDSA with Identifiable Aborts. Also refer this.
For a given composite RSA or Paillier modulus N
- Proof that
gcd(x, N) = 1for a givenx - Proof that
Nis square free - Proof that
Nis product 2 distinct primes - Proof that
Nis a Blum integer and square-free - A more efficient proof that
Nis a Blum integer and square-free
Uses following math
- Legendre and Jacobi symbols,
- square roots modulo prime and composite numbers,
- checking if a composite number is formed of prime powers.
By default, it uses standard library and rayon for parallelization.
For no_std support, build as
cargo build --no-default-features
and for wasm-32, build as
cargo build --no-default-features --target wasm32-unknown-unknown
Modules§
- blum_
integer - blum_
powers - Proof that modulus
Nis of formp^a*q^bwherepandqare Blum primes. Described in section 3.5 of the paper Efficient Noninteractive Certification of RSA Moduli and Beyond - error
- gcd_
is_ one - Proof that
gcd(x, phi(N)) = 1wherexis coprime to a compositeNandphiis the Euler’s totient Described in section 3.1 of the paper Efficient Noninteractive Certification of RSA Moduli and Beyond - macros
- math
- Math utilities like Legendre and Jacobi symbols, square roots modulo prime and composite numbers, checking if a composite number is formed of prime powers.
- paillier_
blum_ modulus - Proving that a modulus is a Paillier-Blum modulus, i.e.
gcd(N, phi(N)) = 1for modulusN=p*qwherepandqare Blum primes, i.e.p mod 4 = 3andq mod 4 = 3using the protocol described in Fig 12, section 5.2 in the paper UC Non-Interactive, Proactive, Distributed ECDSA with Identifiable Aborts - product_
of_ two_ primes - Proof that modulus
Nis the product of two distinct primes. SoNcould be of formp*qbut notp*q*rorp^a*q^bwherep,qandrare primes anda, b > 1. Described in section 3.4 of the paper Efficient Noninteractive Certification of RSA Moduli and Beyond - setup
- square_
free - Proof that modulus
Nis square-free. Described in section 3.2 of the paper Efficient Noninteractive Certification of RSA Moduli and Beyond Uses the proof protocol ofgcd(x, phi(N)) = 1wherexis set toNsincegcd(N, phi(N)) = 1impliesNis square free as per Lemma A.3 of the paper - two_
prime_ divisors - Proof that modulus
Nhas exactly two distinct prime divisors. SoNcould be of formp^a*q^bbut notp*q*rwherep,qandrare primes. Described in section 3.4 of the paper Efficient Noninteractive Certification of RSA Moduli and Beyond - util