2022-06-30 09:42:29 +00:00
|
|
|
[package]
|
2022-07-30 22:35:39 +00:00
|
|
|
name = "dleq"
|
2023-08-08 22:30:19 +00:00
|
|
|
version = "0.4.1"
|
2022-06-30 09:42:29 +00:00
|
|
|
description = "Implementation of single and cross-curve Discrete Log Equality proofs"
|
|
|
|
license = "MIT"
|
2022-10-16 03:46:22 +00:00
|
|
|
repository = "https://github.com/serai-dex/serai/tree/develop/crypto/dleq"
|
2022-06-30 09:42:29 +00:00
|
|
|
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
|
|
|
edition = "2021"
|
2023-11-21 06:19:40 +00:00
|
|
|
rust-version = "1.73"
|
2022-06-30 09:42:29 +00:00
|
|
|
|
2022-09-28 12:44:49 +00:00
|
|
|
[package.metadata.docs.rs]
|
|
|
|
all-features = true
|
2022-09-29 08:47:55 +00:00
|
|
|
rustdoc-args = ["--cfg", "docsrs"]
|
2022-09-28 12:44:49 +00:00
|
|
|
|
2023-12-17 01:54:24 +00:00
|
|
|
[lints]
|
|
|
|
workspace = true
|
|
|
|
|
2022-06-30 09:42:29 +00:00
|
|
|
[dependencies]
|
2023-03-28 08:43:10 +00:00
|
|
|
rustversion = "1"
|
|
|
|
|
2023-03-07 08:06:46 +00:00
|
|
|
thiserror = { version = "1", optional = true }
|
2023-05-13 08:03:56 +00:00
|
|
|
rand_core = { version = "0.6", default-features = false }
|
2022-06-30 09:42:29 +00:00
|
|
|
|
2023-05-13 08:03:56 +00:00
|
|
|
zeroize = { version = "^1.5", default-features = false, features = ["zeroize_derive"] }
|
Utilize zeroize (#76)
* Apply Zeroize to nonces used in Bulletproofs
Also makes bit decomposition constant time for a given amount of
outputs.
* Fix nonce reuse for single-signer CLSAG
* Attach Zeroize to most structures in Monero, and ZOnDrop to anything with private data
* Zeroize private keys and nonces
* Merge prepare_outputs and prepare_transactions
* Ensure CLSAG is constant time
* Pass by borrow where needed, bug fixes
The past few commitments have been one in-progress chunk which I've
broken up as best read.
* Add Zeroize to FROST structs
Still needs to zeroize internally, yet next step. Not quite as
aggressive as Monero, partially due to the limitations of HashMaps,
partially due to less concern about metadata, yet does still delete a
few smaller items of metadata (group key, context string...).
* Remove Zeroize from most Monero multisig structs
These structs largely didn't have private data, just fields with private
data, yet those fields implemented ZeroizeOnDrop making them already
covered. While there is still traces of the transaction left in RAM,
fully purging that was never the intent.
* Use Zeroize within dleq
bitvec doesn't offer Zeroize, so a manual zeroing has been implemented.
* Use Zeroize for random_nonce
It isn't perfect, due to the inability to zeroize the digest, and due to
kp256 requiring a few transformations. It does the best it can though.
Does move the per-curve random_nonce to a provided one, which is allowed
as of https://github.com/cfrg/draft-irtf-cfrg-frost/pull/231.
* Use Zeroize on FROST keygen/signing
* Zeroize constant time multiexp.
* Correct when FROST keygen zeroizes
* Move the FROST keys Arc into FrostKeys
Reduces amount of instances in memory.
* Manually implement Debug for FrostCore to not leak the secret share
* Misc bug fixes
* clippy + multiexp test bug fixes
* Correct FROST key gen share summation
It leaked our own share for ourself.
* Fix cross-group DLEq tests
2022-08-03 08:25:18 +00:00
|
|
|
|
2023-05-13 08:03:56 +00:00
|
|
|
digest = { version = "0.10", default-features = false }
|
2023-08-08 22:30:19 +00:00
|
|
|
transcript = { package = "flexible-transcript", path = "../transcript", version = "^0.3.2", default-features = false }
|
2022-07-02 06:46:40 +00:00
|
|
|
|
2023-05-13 08:03:56 +00:00
|
|
|
ff = { version = "0.13", default-features = false }
|
|
|
|
group = { version = "0.13", default-features = false }
|
2022-06-30 13:30:24 +00:00
|
|
|
|
2023-08-08 22:18:59 +00:00
|
|
|
multiexp = { path = "../multiexp", version = "0.4", default-features = false, features = ["batch"], optional = true }
|
2022-06-30 09:42:29 +00:00
|
|
|
|
|
|
|
[dev-dependencies]
|
2023-04-09 06:31:10 +00:00
|
|
|
hex-literal = "0.4"
|
2022-07-02 06:46:40 +00:00
|
|
|
|
2023-05-13 08:03:56 +00:00
|
|
|
rand_core = { version = "0.6", features = ["getrandom"] }
|
|
|
|
|
2022-07-02 06:46:40 +00:00
|
|
|
blake2 = "0.10"
|
|
|
|
|
2023-04-16 03:21:18 +00:00
|
|
|
k256 = { version = "^0.13.1", default-features = false, features = ["std", "arithmetic", "bits"] }
|
2022-06-30 09:42:29 +00:00
|
|
|
dalek-ff-group = { path = "../dalek-ff-group" }
|
|
|
|
|
|
|
|
transcript = { package = "flexible-transcript", path = "../transcript", features = ["recommended"] }
|
|
|
|
|
|
|
|
[features]
|
2023-10-31 11:41:23 +00:00
|
|
|
std = ["rand_core/std", "zeroize/std", "digest/std", "transcript/std", "ff/std", "multiexp?/std"]
|
2022-07-14 03:29:48 +00:00
|
|
|
serialize = ["std"]
|
2023-03-10 11:27:44 +00:00
|
|
|
|
|
|
|
# Needed for cross-group DLEqs
|
2022-06-30 09:42:29 +00:00
|
|
|
secure_capacity_difference = []
|
2023-03-10 11:27:44 +00:00
|
|
|
experimental = ["std", "thiserror", "multiexp"]
|
2022-07-02 06:48:27 +00:00
|
|
|
|
2023-10-31 11:41:23 +00:00
|
|
|
default = [
|
|
|
|
"std",
|
|
|
|
# Only applies to experimental, yet is default to ensure security
|
|
|
|
# experimental doesn't mandate it itself in case two curves with extreme
|
|
|
|
# capacity differences are desired to be used together, in which case the user
|
|
|
|
# must specify experimental without default features
|
|
|
|
"secure_capacity_difference"
|
|
|
|
]
|