Skip to main content

nautilus_cryptography/
lib.rs

1// -------------------------------------------------------------------------------------------------
2//  Copyright (C) 2015-2026 Nautech Systems Pty Ltd. All rights reserved.
3//  https://nautechsystems.io
4//
5//  Licensed under the GNU Lesser General Public License Version 3.0 (the "License");
6//  You may not use this file except in compliance with the License.
7//  You may obtain a copy of the License at https://www.gnu.org/licenses/lgpl-3.0.en.html
8//
9//  Unless required by applicable law or agreed to in writing, software
10//  distributed under the License is distributed on an "AS IS" BASIS,
11//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12//  See the License for the specific language governing permissions and
13//  limitations under the License.
14// -------------------------------------------------------------------------------------------------
15
16//! Cryptographic utilities and security functions for [NautilusTrader](https://nautilustrader.io).
17//!
18//! The `nautilus-cryptography` crate provides essential cryptographic primitives and security utilities
19//! required for secure communication with trading venues and data providers. This includes
20//! digital signing, TLS configuration, and cryptographic provider management:
21//!
22//! - HMAC-based message authentication and signing.
23//! - Digital signatures using RSA and Ed25519 algorithms.
24//! - TLS client configuration with platform certificate verification.
25//! - Cryptographic provider management and initialization.
26//! - Secure encoding and decoding utilities.
27//!
28//! # NautilusTrader
29//!
30//! [NautilusTrader](https://nautilustrader.io) is an open-source, production-grade, Rust-native
31//! engine for multi-asset, multi-venue trading systems.
32//!
33//! The system spans research, deterministic simulation, and live execution within a single
34//! event-driven architecture, providing research-to-live semantic parity.
35//!
36//! # Feature Flags
37//!
38//! This crate provides feature flags to control source code inclusion during compilation,
39//! depending on the intended use case, i.e. whether to provide Python bindings
40//! for the [nautilus_trader](https://pypi.org/project/nautilus_trader) Python package,
41//! or as part of a Rust only build.
42//!
43//! - `python`: Enables Python bindings from [PyO3](https://pyo3.rs).
44//! - `extension-module`: Builds the crate as a Python extension module.
45
46#![warn(rustc::all)]
47#![deny(unsafe_code)]
48#![deny(unsafe_op_in_unsafe_fn)]
49#![deny(nonstandard_style)]
50#![deny(missing_debug_implementations)]
51#![deny(clippy::missing_errors_doc)]
52#![deny(clippy::missing_panics_doc)]
53#![deny(rustdoc::broken_intra_doc_links)]
54
55pub mod providers;
56pub mod signing;
57pub mod tls;
58
59#[cfg(feature = "python")]
60pub mod python;