curve25519-dalek-source/src/lib.rs

84 lines
2.3 KiB
Rust
Raw Normal View History

// -*- mode: rust; -*-
2016-12-08 05:12:00 +00:00
//
// This file is part of curve25519-dalek.
2021-03-25 04:10:55 +00:00
// Copyright (c) 2016-2021 isis lovecruft
// Copyright (c) 2016-2019 Henry de Valence
// See LICENSE for licensing information.
2016-12-08 05:12:00 +00:00
//
// Authors:
2021-03-25 04:10:55 +00:00
// - isis agora lovecruft <isis@patternsinthevoid.net>
// - Henry de Valence <hdevalence@hdevalence.ca>
2016-12-08 05:12:00 +00:00
#![no_std]
2022-11-26 10:54:22 +00:00
#![cfg_attr(docsrs, feature(doc_cfg))]
//------------------------------------------------------------------------
// Documentation:
//------------------------------------------------------------------------
#![deny(missing_docs)]
#![doc(
html_logo_url = "https://cdn.jsdelivr.net/gh/dalek-cryptography/curve25519-dalek/docs/assets/dalek-logo-clear.png"
)]
#![doc(html_root_url = "https://docs.rs/curve25519-dalek/4.0.0-pre.2")]
#![doc = include_str!("../README.md")]
//------------------------------------------------------------------------
// External dependencies:
//------------------------------------------------------------------------
#[cfg(feature = "alloc")]
#[allow(unused_imports)]
#[macro_use]
extern crate alloc;
#[cfg(feature = "std")]
#[macro_use]
extern crate std;
2022-10-18 17:45:59 +00:00
pub use digest;
2017-05-14 05:40:51 +00:00
// Internal macros. Must come first!
#[macro_use]
pub(crate) mod macros;
//------------------------------------------------------------------------
// curve25519-dalek public modules
//------------------------------------------------------------------------
// Scalar arithmetic mod l = 2^252 + ..., the order of the Ristretto group
2016-12-08 05:12:00 +00:00
pub mod scalar;
// Point operations on the Montgomery form of Curve25519
pub mod montgomery;
// Point operations on the Edwards form of Curve25519
pub mod edwards;
// Group operations on the Ristretto group
2017-07-09 01:22:28 +00:00
pub mod ristretto;
// Useful constants, like the Ed25519 basepoint
pub mod constants;
// External (and internal) traits.
pub mod traits;
2016-12-08 05:12:00 +00:00
//------------------------------------------------------------------------
// curve25519-dalek internal modules
//------------------------------------------------------------------------
2016-12-08 05:12:00 +00:00
// Finite field arithmetic mod p = 2^255 - 19
pub(crate) mod field;
// Arithmetic backends (using u32, u64, etc) live here
#[cfg(docsrs)]
pub mod backend;
#[cfg(not(docsrs))]
pub(crate) mod backend;
// Crate-local prelude (for alloc-dependent features like `Vec`)
pub(crate) mod prelude;
// Generic code for window lookups
pub(crate) mod window;