elastic-elgamal 0.3.0-beta.1

Implementation of ElGamal encryption and related zero-knowledge proofs with pluggable crypto backend
Documentation
[package]
name = "elastic-elgamal"
version = "0.3.0-beta.1"
authors = [
  "Alex Ostrovski <ostrovski.alex@gmail.com>",
  "Jiří Gavenda <jirigavenda98@gmail.com>",
]
edition = "2021"
rust-version = "1.62"
readme = "README.md"
license = "MIT OR Apache-2.0"
repository = "https://github.com/slowli/elastic-elgamal"
keywords = ["elgamal", "encryption", "zero-knowledge"]
categories = ["cryptography"]
description = """\
Implementation of ElGamal encryption and related zero-knowledge proofs
with pluggable crypto backend
"""

[package.metadata.docs.rs]
features = ["serde"]
# Set `docsrs` to enable unstable `doc(cfg(...))` attributes.
rustdoc-args = ["--cfg", "docsrs"]

[dependencies]
# Public dependencies (present in public API of the crate).
elliptic-curve = { version = "0.12.0", features = ["sec1"] }
rand_core = { version = "0.6.2", default-features = false }
zeroize = { version = "1.3.0", default-features = false, features = ["alloc"] }
sha2 = { version = "0.10.6", default-features = false }

# Enables `Serialize` / `Deserialize` implementation for most types in the crate.
serde = { version = "1.0", default-features = false, features = ["derive", "alloc"], optional = true }

# Private dependencies (not exposed via public APIs).
base64ct = { version = "1.0", default-features = false, features = ["alloc"] }
hashbrown = { version = "0.13.1", optional = true }
merlin = { version = "3.0.0", default-features = false }
rand_chacha = { version = "0.3.1", default-features = false }
subtle = { version = "2.4.0", default-features = false }

# Crypto backend to support Curve25519 prime subgroup and Ristretto255 group;
# a public dependency.
[dependencies.curve25519-dalek]
version = "3.1.0"
default-features = false
features = ["alloc"]
optional = true

# Crypto backend to support Curve25519 prime subgroup and Ristretto255 group;
# a public dependency. Alternative and mutually exclusive with `curve25519-dalek`.
[dependencies.curve25519-dalek-ng]
version = "4.1.1"
default-features = false
features = ["alloc"]
optional = true

[dev-dependencies]
bulletproofs = "4.0.0"
criterion = "0.4.0"
doc-comment = "0.3.3"
insta = { version = "1.18.2", features = ["yaml"] }
k256 = { version = "0.12", default-features = false, features = ["arithmetic"] }
rand = "0.8.3"
serde_json = "1.0"
structopt = "0.3.25"
version-sync = "0.9.2"

[features]
default = ["std", "curve25519-dalek/u64_backend"]
# Enables support of types from `std`, such as the `Error` trait.
std = []

[[bench]]
name = "basics"
path = "benches/basics.rs"
harness = false
required-features = ["default"]

[[bench]]
name = "sharing"
path = "benches/sharing.rs"
harness = false
required-features = ["default"]

[[example]]
name = "voting"
path = "examples/voting.rs"
required-features = ["default", "serde"]

[[example]]
name = "range"
path = "examples/range.rs"
required-features = ["default", "serde"]

[[example]]
name = "equivalence"
path = "examples/equivalence.rs"
required-features = ["curve25519-dalek-ng/u64_backend", "serde"]

[[test]]
name = "integration"
path = "tests/integration/main.rs"
required-features = ["default"]

[[test]]
name = "snapshots"
path = "tests/snapshots.rs"
required-features = ["default", "serde"]

# Speed up `k256` arithmetic.
[profile.dev.package.k256]
opt-level = 2