curve25519_dalek/backend/serial/
mod.rs

1// -*- mode: rust; -*-
2//
3// This file is part of curve25519-dalek.
4// Copyright (c) 2016-2021 isis lovecruft
5// Copyright (c) 2016-2019 Henry de Valence
6// See LICENSE for licensing information.
7//
8// Authors:
9// - isis agora lovecruft <isis@patternsinthevoid.net>
10// - Henry de Valence <hdevalence@hdevalence.ca>
11
12//! Serial implementations of field, scalar, point arithmetic.
13//!
14//! When the vector backend is disabled, the crate uses the mixed-model strategy
15//! for implementing point operations and scalar multiplication; see the
16//! [`curve_models`] and [`scalar_mul`] documentation for more information.
17//!
18//! When the vector backend is enabled, the field and scalar
19//! implementations are still used for non-vectorized operations.
20
21use cfg_if::cfg_if;
22
23cfg_if! {
24    if #[cfg(curve25519_dalek_backend = "fiat")] {
25
26        #[cfg(curve25519_dalek_bits = "32")]
27        #[doc(hidden)]
28        pub mod fiat_u32;
29
30        #[cfg(curve25519_dalek_bits = "64")]
31        #[doc(hidden)]
32        pub mod fiat_u64;
33
34    } else {
35
36        #[cfg(curve25519_dalek_bits = "32")]
37        #[doc(hidden)]
38        pub mod u32;
39
40        #[cfg(curve25519_dalek_bits = "64")]
41        #[doc(hidden)]
42        pub mod u64;
43
44    }
45}
46
47pub mod curve_models;
48
49pub mod scalar_mul;