curve25519_dalek/backend/serial/u64/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-2018 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//! The `u64` backend uses `u64`s and a `(u64, u64) -> u128` multiplier.
13//!
14//! On x86_64, the idiom `(x as u128) * (y as u128)` lowers to `MUL`
15//! instructions taking 64-bit inputs and producing 128-bit outputs. On
16//! other platforms, this implementation is not recommended.
17//!
18//! On Haswell and newer, the BMI2 extension provides `MULX`, and on
19//! Broadwell and newer, the ADX extension provides `ADCX` and `ADOX`
20//! (allowing the CPU to compute two carry chains in parallel). These
21//! will be used if available.
22
23pub mod field;
24
25pub mod scalar;
26
27pub mod constants;