1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// -*- 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;