mirror of
https://github.com/saymrwulf/betrusted-curve25519-dalek-source.git
synced 2026-09-08 21:00:38 +00:00
We have a lot of backend types leaking via the public API, including e.g. `FieldElement51`: https://docs.rs/curve25519-dalek/latest/curve25519_dalek/backend/serial/u64/field/struct.FieldElement51.html At the very least, these types shouldn't be visible in the rustdoc. This PR hides them from the docs, but ideally we would hide them completely from the public API (which might technically be considered a breaking change, but IMO leaking them at all is a bug).
49 lines
1.2 KiB
Rust
49 lines
1.2 KiB
Rust
// -*- mode: rust; -*-
|
|
//
|
|
// This file is part of curve25519-dalek.
|
|
// Copyright (c) 2016-2021 isis lovecruft
|
|
// Copyright (c) 2016-2019 Henry de Valence
|
|
// See LICENSE for licensing information.
|
|
//
|
|
// Authors:
|
|
// - isis agora lovecruft <isis@patternsinthevoid.net>
|
|
// - Henry de Valence <hdevalence@hdevalence.ca>
|
|
|
|
//! Serial implementations of field, scalar, point arithmetic.
|
|
//!
|
|
//! When the vector backend is disabled, the crate uses the mixed-model strategy
|
|
//! for implementing point operations and scalar multiplication; see the
|
|
//! [`curve_models`] and [`scalar_mul`] documentation for more information.
|
|
//!
|
|
//! When the vector backend is enabled, the field and scalar
|
|
//! implementations are still used for non-vectorized operations.
|
|
|
|
use cfg_if::cfg_if;
|
|
|
|
cfg_if! {
|
|
if #[cfg(curve25519_dalek_backend = "fiat")] {
|
|
|
|
#[cfg(curve25519_dalek_bits = "32")]
|
|
#[doc(hidden)]
|
|
pub mod fiat_u32;
|
|
|
|
#[cfg(curve25519_dalek_bits = "64")]
|
|
#[doc(hidden)]
|
|
pub mod fiat_u64;
|
|
|
|
} else {
|
|
|
|
#[cfg(curve25519_dalek_bits = "32")]
|
|
#[doc(hidden)]
|
|
pub mod u32;
|
|
|
|
#[cfg(curve25519_dalek_bits = "64")]
|
|
#[doc(hidden)]
|
|
pub mod u64;
|
|
|
|
}
|
|
}
|
|
|
|
pub mod curve_models;
|
|
|
|
pub mod scalar_mul;
|