Skip to content

Commit

Permalink
feat: fix up frost situation
Browse files Browse the repository at this point in the history
  • Loading branch information
drewstone committed Dec 19, 2024
1 parent 94b6f4c commit 13621de
Show file tree
Hide file tree
Showing 31 changed files with 7,082 additions and 96 deletions.
342 changes: 314 additions & 28 deletions Cargo.lock

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,15 @@ starknet-crypto = { version = "0.7.1", default-features = false, features = ["si

frost-core = { version = "2.0.0", default-features = false }
frost-ed25519 = { version = "2.0.0", default-features = false }
frost-ed448 = { version = "2.0.0", default-features = false }
frost-ristretto255 = { version = "2.0.0", default-features = false }
frost-secp256k1 = { version = "2.0.0", default-features = false }
frost-p256 = { version = "2.0.0", default-features = false }

tg-frost-core = { path = "frost", default-features = false }
frost-p384 = { path = "frost/frost-p384", default-features = false }
frost-ed448 = { path = "frost/frost-ed448", default-features = false }
frost-secp256k1-tr = { path = "frost/frost-secp256k1-tr", default-features = false }

# Substrate dependencies
sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false }
sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2407", default-features = false }
Expand Down
61 changes: 61 additions & 0 deletions frost/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
[package]
name = "tg-frost-core"
version = { workspace = true }
authors = { workspace = true }
edition = { workspace = true }
homepage = { workspace = true }
license = { workspace = true }
repository = { workspace = true }

[dependencies]
byteorder = { version = "1.4", default-features = false }
const-crc32 = { version = "1.2.0", package = "const-crc32-nostd" }
document-features = "0.2.7"
debugless-unwrap = "0.0.4"
derive-getters = "0.5.0"
hex = { workspace = true, features = ["alloc"] }
itertools = { version = "0.13.0", default-features = false }
parity-scale-codec = { workspace = true }
postcard = { version = "1.0.0", default-features = false, features = ["alloc"], optional = true }
rand_core = { workspace = true }
serde = { workspace = true, optional = true }
serdect = { workspace = true, features = ["alloc"], optional = true }
sp-std = { workspace = true }
subtle = { workspace = true }
thiserror = { version = "2.0.3", default-features = false, optional = true }
thiserror-nostd-notrait = { version = "1.0.29", default-features = false }
visibility = "0.1.0"
zeroize = { version = "1.8.1", default-features = false, features = ["derive"] }

# Test dependencies used with the test-impl feature
proptest = { version = "1.0", optional = true }
serde_json = { version = "1.0", optional = true }
criterion = { version = "0.5", optional = true }

[dev-dependencies]
criterion = { version = "0.5" }
lazy_static = "1.4"
proptest = "1.0"
rand = "0.8"
rand_chacha = "0.3"
serde_json = "1.0"

[features]
default = ["serialization", "cheater-detection", "std"]
std = [
"byteorder/std",
"rand_core/std",
"hex/std",
"sp-std/std",
"dep:thiserror",

]
## Expose internal types, which do not have SemVer guarantees. This is an advanced
## feature which can be useful if you need to build a modified version of FROST.
## The docs won't list them, you will need to check the source code.
internals = []
# Exposes ciphersuite-generic tests for other crates to use
test-impl = ["dep:proptest", "dep:serde_json", "dep:criterion"]
serialization = ["serde", "dep:postcard"]
serde = ["dep:serde", "dep:serdect"]
cheater-detection = []
42 changes: 42 additions & 0 deletions frost/frost-ed448/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[package]
name = "frost-ed448"
edition = "2021"
# When releasing to crates.io:
# - Update html_root_url
# - Update CHANGELOG.md
# - Create git tag.
version.workspace = true
authors = [
"Deirdre Connolly <[email protected]>",
"Chelsea Komlo <[email protected]>",
"Conrado Gouvea <[email protected]>"
]
readme = "README.md"
license = "MIT OR Apache-2.0"
categories = ["cryptography"]
keywords = ["cryptography", "crypto", "ed25519", "threshold", "signature"]
description = "A Schnorr signature scheme over Ed25519 that supports FROST."

[package.metadata.docs.rs]
features = ["serde"]
rustdoc-args = ["--cfg", "docsrs"]

[dependencies]
parity-scale-codec = { workspace = true }
ed448-goldilocks = { git = "https://github.com/webb-tools/Ed448-Goldilocks", package = "ed448-goldilocks-plus", default-features = false, features = ["zeroize"] }
sp-std = { workspace = true }
tg-frost-core = { workspace = true, features = ["internals"] }
rand_core = { workspace = true }
sha3 = { version = "0.10", default-features = false }
subtle = { workspace = true }

[features]
default = ["std"]
std = [
"sp-std/std",
"rand_core/std",
"parity-scale-codec/std",
"sha3/std",
"tg-frost-core/std",
"ed448-goldilocks/std"
]
Loading

0 comments on commit 13621de

Please sign in to comment.