composite_modulus_proofs 0.1.0

Proofs about several propoerties of a composite modulus - square-free, product of 2 primes, a blum integer
Documentation

[![CI](https://github.com/lovesh/composite_modulus_proofs/actions/workflows/test.yml/badge.svg)](https://github.com/lovesh/composite_modulus_proofs/actions/workflows/test.yml)
[![Apache-2](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/lovesh/composite_modulus_proofs/blob/master/LICENSE)
[![Dependencies](https://deps.rs/repo/github/lovesh/composite_modulus_proofs/status.svg)](https://deps.rs/repo/github/lovesh/composite_modulus_proofs)
[![crates.io](https://img.shields.io/crates/v/composite_modulus_proofs)](https://crates.io/crates/composite_modulus_proofs)
[![docs.rs](https://img.shields.io/docsrs/composite_modulus_proofs)](https://docs.rs/composite_modulus_proofs/latest/composite_modulus_proofs/)

<!-- cargo-rdme start -->

# Proofs of properties of RSA or Paillier modulus

Implements the protocols described in the papers [Efficient Noninteractive Certification of RSA Moduli and Beyond](https://eprint.iacr.org/2018/057) and [UC Non-Interactive, Proactive, Distributed ECDSA with Identifiable Aborts](https://eprint.iacr.org/2021/060). Also refer [this](https://www.zkdocs.com/docs/zkdocs/zero-knowledge-protocols/product-primes/).

For a given composite RSA or Paillier modulus `N`
- [Proof that `gcd(x, N) = 1` for a given `x`]src/gcd_is_one.rs
- [Proof that `N` is square free]src/square_free.rs
- [Proof that `N` is product 2 distinct primes]src/product_of_two_primes.rs
- [Proof that `N` is a Blum integer]src/blum_integer.rs
- [A more efficient proof that `N` is a Blum integer]src/paillier_blum_modulus.rs

Uses following math
- [Legendre and Jacobi symbols]src/math/jacobi.rs,
- [square roots modulo prime and composite numbers](src/math/sqrt.rs),
- [checking if a composite number is formed of prime powers](src/math/prime_check.rs).

By default, it uses standard library and [rayon](https://github.com/rayon-rs/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`

<!-- cargo-rdme end -->