mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-04 20:24:10 +00:00
As proposed in #414, this commit changes the backend selection approach, introspecting `target_pointer_width` to select `u32_backend` vs `u64_backend` (or `fiat_u32_backend`/`fiat_u64_backend` if the `fiat_backend` feature is enabled). This helps eliminate the use of non-additive features, and also the rather confusing errors that happen if multiple backends are selected (i.e. thousands of lines of rustc errors). The selection logic checks if `target_pointer_width = "64"` and uses the 64-bit backend, or falls back to the 32-bit backend otherwise. This means the crate will always have a valid backend regardless of the pointer width, although there may be odd edge cases for exotic platforms which would optimally use the 64-bit backend but have a non-"64" target pointer width for whatever reason. We can handle those cases as they come up.
66 lines
2.4 KiB
TOML
66 lines
2.4 KiB
TOML
[package]
|
|
name = "curve25519-dalek"
|
|
# Before incrementing:
|
|
# - update CHANGELOG
|
|
# - update html_root_url
|
|
# - update README if required by semver
|
|
# - if README was updated, also update module documentation in src/lib.rs
|
|
version = "4.0.0-pre.2"
|
|
edition = "2021"
|
|
authors = ["Isis Lovecruft <isis@patternsinthevoid.net>",
|
|
"Henry de Valence <hdevalence@hdevalence.ca>"]
|
|
readme = "README.md"
|
|
license = "BSD-3-Clause"
|
|
repository = "https://github.com/dalek-cryptography/curve25519-dalek"
|
|
homepage = "https://dalek.rs/curve25519-dalek"
|
|
documentation = "https://docs.rs/curve25519-dalek"
|
|
categories = ["cryptography", "no-std"]
|
|
keywords = ["cryptography", "crypto", "ristretto", "curve25519", "ristretto255"]
|
|
description = "A pure-Rust implementation of group operations on ristretto255 and Curve25519"
|
|
exclude = [
|
|
"**/.gitignore",
|
|
".gitignore",
|
|
".travis.yml",
|
|
]
|
|
|
|
[package.metadata.docs.rs]
|
|
# Disabled for now since this is borked; tracking https://github.com/rust-lang/docs.rs/issues/302
|
|
# rustdoc-args = ["--html-in-header", ".cargo/registry/src/github.com-1ecc6299db9ec823/curve25519-dalek-0.13.2/rustdoc-include-katex-header.html"]
|
|
features = ["nightly", "simd_backend"]
|
|
|
|
[badges]
|
|
travis-ci = { repository = "dalek-cryptography/curve25519-dalek", branch = "master"}
|
|
|
|
[dev-dependencies]
|
|
sha2 = { version = "0.10", default-features = false }
|
|
bincode = "1"
|
|
criterion = { version = "0.4.0", features = ["html_reports"] }
|
|
hex = "0.4.2"
|
|
rand = "0.8"
|
|
|
|
[[bench]]
|
|
name = "dalek_benchmarks"
|
|
harness = false
|
|
|
|
[dependencies]
|
|
cfg-if = "1"
|
|
rand_core = { version = "0.6", default-features = false }
|
|
digest = { version = "0.10", default-features = false }
|
|
subtle = { version = "^2.2.1", default-features = false }
|
|
serde = { version = "1.0", default-features = false, optional = true, features = ["derive"] }
|
|
# The original packed_simd package was orphaned, see
|
|
# https://github.com/rust-lang/packed_simd/issues/303#issuecomment-701361161
|
|
packed_simd = { version = "0.3.4", package = "packed_simd_2", features = ["into_bits"], optional = true }
|
|
zeroize = { version = "1", default-features = false }
|
|
fiat-crypto = { version = "0.1.6", optional = true}
|
|
|
|
[features]
|
|
nightly = ["subtle/nightly"]
|
|
default = ["std"]
|
|
std = ["alloc", "subtle/std", "rand_core/std"]
|
|
alloc = ["zeroize/alloc"]
|
|
|
|
# fiat-crypto backend with formally-verified field arithmetic
|
|
fiat_backend = ["fiat-crypto"]
|
|
# The SIMD backend uses parallel formulas, using either AVX2 or AVX512-IFMA.
|
|
simd_backend = ["nightly", "packed_simd"]
|