2022-04-21 21:36:18 -04:00
|
|
|
[package]
|
|
|
|
|
name = "dalek-ff-group"
|
2025-08-29 02:07:29 -04:00
|
|
|
version = "0.4.6"
|
2022-04-21 21:36:18 -04:00
|
|
|
description = "ff/group bindings around curve25519-dalek"
|
|
|
|
|
license = "MIT"
|
2022-10-15 23:46:22 -04:00
|
|
|
repository = "https://github.com/serai-dex/serai/tree/develop/crypto/dalek-ff-group"
|
2022-04-21 21:36:18 -04:00
|
|
|
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
2022-06-19 06:33:19 -04:00
|
|
|
keywords = ["curve25519", "ed25519", "ristretto", "dalek", "group"]
|
2022-04-21 21:36:18 -04:00
|
|
|
edition = "2021"
|
Replace `Ciphersuite::hash_to_F`
The prior-present `Ciphersuite::hash_to_F` was a sin. Implementations took a
DST, yet were not require to securely handle it. It was also biased towards the
requirements of `modular-frost` as `ciphersuite` was originally written all
those years ago, when `modular-frost` had needs exceeding what `ff`, `group`
satisfied.
Now, the hash is bound to produce an output which can be converted to a scalar
with `ff::FromUniformBytes`. A new `hash_to_F`, which accepts a single argument
of the value to hash (removing the potential to insecurely handle the DST by
removing the DST entirely). Due to `digest` yielding a `GenericArray`, yet
`FromUniformBytes` taking a `const usize`, the `ciphersuite` crate now defines
a `FromUniformBytes` trait taking an array (then implemented for all satisfiers
of `ff::FromUniformBytes`). In order to get the array type from the
`GenericArray`, the output of the hash, `digest` is updated to the `0.11`
release candidate which moves to `flexible-array` which solves that problem.
The existing, specific `hash_to_F` functions have been moved to `modular-frost`
as necessary.
`flexible-array` itself is patched to a fork due to
https://github.com/RustCrypto/hybrid-array/issues/131.
2025-08-29 05:04:03 -04:00
|
|
|
rust-version = "1.85"
|
2022-04-21 21:36:18 -04:00
|
|
|
|
2022-09-28 07:44:49 -05:00
|
|
|
[package.metadata.docs.rs]
|
|
|
|
|
all-features = true
|
2022-09-29 04:47:55 -04:00
|
|
|
rustdoc-args = ["--cfg", "docsrs"]
|
2022-09-28 07:44:49 -05:00
|
|
|
|
2023-12-16 20:54:24 -05:00
|
|
|
[lints]
|
|
|
|
|
workspace = true
|
|
|
|
|
|
2022-04-21 21:36:18 -04:00
|
|
|
[dependencies]
|
2023-04-22 04:38:47 -04:00
|
|
|
zeroize = { version = "^1.5", default-features = false, features = ["zeroize_derive"] }
|
|
|
|
|
subtle = { version = "^2.4", default-features = false }
|
2022-04-21 21:36:18 -04:00
|
|
|
|
2023-04-22 04:38:47 -04:00
|
|
|
rand_core = { version = "0.6", default-features = false }
|
2023-03-28 04:43:10 -04:00
|
|
|
|
2023-04-22 04:38:47 -04:00
|
|
|
digest = { version = "0.10", default-features = false }
|
Replace `Ciphersuite::hash_to_F`
The prior-present `Ciphersuite::hash_to_F` was a sin. Implementations took a
DST, yet were not require to securely handle it. It was also biased towards the
requirements of `modular-frost` as `ciphersuite` was originally written all
those years ago, when `modular-frost` had needs exceeding what `ff`, `group`
satisfied.
Now, the hash is bound to produce an output which can be converted to a scalar
with `ff::FromUniformBytes`. A new `hash_to_F`, which accepts a single argument
of the value to hash (removing the potential to insecurely handle the DST by
removing the DST entirely). Due to `digest` yielding a `GenericArray`, yet
`FromUniformBytes` taking a `const usize`, the `ciphersuite` crate now defines
a `FromUniformBytes` trait taking an array (then implemented for all satisfiers
of `ff::FromUniformBytes`). In order to get the array type from the
`GenericArray`, the output of the hash, `digest` is updated to the `0.11`
release candidate which moves to `flexible-array` which solves that problem.
The existing, specific `hash_to_F` functions have been moved to `modular-frost`
as necessary.
`flexible-array` itself is patched to a fork due to
https://github.com/RustCrypto/hybrid-array/issues/131.
2025-08-29 05:04:03 -04:00
|
|
|
sha2 = { version = "0.11.0-rc.0", default-features = false }
|
2023-03-28 04:43:10 -04:00
|
|
|
|
2025-08-29 06:14:25 -04:00
|
|
|
prime-field = { path = "../prime-field", default-features = false }
|
2025-08-29 02:07:29 -04:00
|
|
|
ciphersuite = { version = "0.4.2", path = "../ciphersuite", default-features = false }
|
2022-04-21 21:36:18 -04:00
|
|
|
|
2025-09-03 06:41:42 -04:00
|
|
|
crypto-bigint = { version = "0.6", default-features = false, features = ["zeroize"] }
|
2023-02-23 04:27:31 -05:00
|
|
|
|
2025-08-29 01:07:11 -04:00
|
|
|
curve25519-dalek = { version = ">= 4.0, < 4.2", default-features = false, features = ["zeroize", "digest", "group", "precomputed-tables"] }
|
2022-12-24 15:09:09 -05:00
|
|
|
|
|
|
|
|
[dev-dependencies]
|
2025-08-20 04:50:37 -04:00
|
|
|
hex = "0.4"
|
2023-10-31 07:41:23 -04:00
|
|
|
rand_core = { version = "0.6", default-features = false, features = ["std"] }
|
2022-12-24 15:09:09 -05:00
|
|
|
ff-group-tests = { path = "../ff-group-tests" }
|
2023-10-31 07:41:23 -04:00
|
|
|
|
|
|
|
|
[features]
|
2025-09-03 06:49:44 -04:00
|
|
|
alloc = ["zeroize/alloc", "digest/alloc", "prime-field/alloc", "ciphersuite/alloc", "crypto-bigint/alloc", "curve25519-dalek/alloc"]
|
2025-08-29 06:14:25 -04:00
|
|
|
std = ["alloc", "zeroize/std", "subtle/std", "rand_core/std", "digest/std", "prime-field/std", "ciphersuite/std"]
|
2023-10-31 07:41:23 -04:00
|
|
|
default = ["std"]
|