anza-cryptography-source/curve25519/solana-ed25519/Cargo.toml
mrwulf d275613c37 Aeneas-compat: verified-verification entry points + serial-pin cfg
Pure refactors for the Charon/Aeneas extraction pipeline; production
behavior unchanged (both default and pinned configs cargo-check clean,
pre-existing warnings only).

- ed_sigs::sha512_hash3: single-call SHA-512 oracle, semantically
  Sha512(r || a || m); a monomorphic signature with no foreign types lets
  the extractor treat the hash as one opaque oracle (sha2-0.11 stack).
- VerificationKey::verify_sha512 (+ recompute_r_sha512, a_bytes_nonzero,
  check_scalar_canonical, is_legacy_excluded_r): semantically identical
  to verify_dalek with each step spelled extractor-friendly - derived
  array PartialEq/contains as explicit index loops, and
  Scalar::from_canonical_bytes (subtle internals defeat the extractor)
  as an explicit s < l byte compare + from_bytes_mod_order (the identity
  on canonical bytes). Signature accessors each called exactly once.
- SIMD gates: cfg(target_arch = "x86_64") becomes
  cfg(all(target_arch = "x86_64", not(curve25519_serial_only))). Default
  builds are identical (the new cfg is never set); extraction builds pass
  RUSTFLAGS=--cfg curve25519_serial_only so the AVX2 dispatch arm
  compiles out and backend selection is the real constant Serial - the
  same serial-pin mechanism upstream curve25519-dalek provides natively.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 23:00:06 +02:00

94 lines
2.8 KiB
TOML

[package]
name = "solana-ed25519"
version = "0.1.0"
edition = "2024"
rust-version = "1.85.0"
authors = [
"Isis Lovecruft <isis@patternsinthevoid.net>",
"Henry de Valence <hdevalence@hdevalence.ca>",
"Anza Maintainers <maintainers@anza.xyz>",
]
readme = "README.md"
license = "BSD-3-Clause"
categories = ["cryptography", "no-std"]
keywords = ["cryptography", "crypto", "ristretto", "curve25519", "ristretto255"]
description = "A pure-Rust implementation of group operations on ristretto255 and Curve25519, with HEEA scalar decomposition (forked from curve25519-dalek)"
exclude = ["**/.gitignore", ".gitignore"]
repository = { workspace = true }
homepage = { workspace = true }
# Keep the Rust library name as "curve25519" so that all existing `use curve25519::…`
# references in doc-tests, dependent crates, and source files remain valid.
[lib]
name = "curve25519"
[package.metadata.docs.rs]
rustdoc-args = [
"--html-in-header",
"docs/assets/rustdoc-include-katex-header.html",
"--cfg",
"docsrs",
]
all-features = true
[dev-dependencies]
bincode.workspace = true
color-eyre.workspace = true
criterion.workspace = true
ed25519-dalek.workspace = true
hex.workspace = true
once_cell.workspace = true
proptest.workspace = true
rand.workspace = true
[build-dependencies]
rustc_version.workspace = true
[[bench]]
name = "dalek_benchmarks"
harness = false
required-features = ["alloc", "digest", "group", "rand_core"]
[dependencies]
cfg-if.workspace = true
ed25519.workspace = true
ff = { workspace = true, optional = true }
group = { workspace = true, optional = true }
rand_core = { workspace = true, optional = true }
digest = { workspace = true, optional = true }
hashbrown.workspace = true
der = { workspace = true, optional = true }
pkcs8 = { workspace = true, optional = true }
sha2.workspace = true
subtle = { workspace = true, features = ["const-generics"] }
serde = { workspace = true, optional = true }
zeroize = { workspace = true, optional = true }
[target.'cfg(target_arch = "x86_64")'.dependencies]
cpufeatures = { workspace = true }
curve25519-dalek-derive = { workspace = true }
[features]
default = ["alloc", "precomputed-tables", "zeroize", "rand_core", "digest"]
alloc = ["zeroize?/alloc"]
precomputed-tables = []
legacy_compatibility = []
rand_core = ["dep:rand_core"]
std = ["alloc"]
group = ["dep:group", "rand_core"]
group-bits = ["group", "ff/bits"]
digest = ["dep:digest"]
serde = ["dep:serde", "serde/derive"]
lizard = ["digest"]
pkcs8 = ["dep:pkcs8", "pkcs8/alloc", "ed25519/pkcs8", "alloc"]
pem = ["pkcs8", "dep:der", "ed25519/pem", "zeroize"]
[lints.rust.unexpected_cfgs]
level = "warn"
check-cfg = [
'cfg(allow_unused_unsafe)',
'cfg(curve25519_backend, values("simd"))',
'cfg(curve25519_diagnostics, values("build"))',
'cfg(curve25519_bits, values("64"))',
'cfg(curve25519_serial_only)',
]