zkaluvm/lib.rs
1// AluVM ISA extension for Galois fields
2//
3// SPDX-License-Identifier: Apache-2.0
4//
5// Designed in 2024-2025 by Dr Maxim Orlovsky <orlovsky@ubideco.org>
6// Written in 2024-2025 by Dr Maxim Orlovsky <orlovsky@ubideco.org>
7//
8// Copyright (C) 2024-2025 Laboratories for Ubiquitous Deterministic Computing (UBIDECO),
9// Institute for Distributed and Cognitive Systems (InDCS), Switzerland.
10// Copyright (C) 2024-2025 Dr Maxim Orlovsky.
11// All rights under the above copyrights are reserved.
12//
13// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
14// in compliance with the License. You may obtain a copy of the License at
15//
16// http://www.apache.org/licenses/LICENSE-2.0
17//
18// Unless required by applicable law or agreed to in writing, software distributed under the License
19// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
20// or implied. See the License for the specific language governing permissions and limitations under
21// the License.
22
23#![deny(
24 unsafe_code,
25 dead_code,
26 missing_docs,
27 unused_variables,
28 unused_mut,
29 unused_imports,
30 non_upper_case_globals,
31 non_camel_case_types,
32 non_snake_case
33)]
34#![allow(clippy::bool_assert_comparison)]
35#![cfg_attr(coverage_nightly, feature(coverage_attribute))]
36#![cfg_attr(docsrs, feature(doc_auto_cfg))]
37
38//! AluVM ISA extension for zero knowledge applications, implementing Galois field arithmetics.
39
40extern crate alloc;
41
42#[macro_use]
43extern crate amplify;
44#[macro_use]
45extern crate strict_encoding;
46
47mod core;
48#[macro_use]
49pub mod gfa;
50#[cfg(feature = "stl")]
51pub mod zkstl;
52mod fe;
53
54pub use aluvm as alu;
55pub use aluvm::isa;
56pub use fe::{fe256, ParseFeError};
57
58pub use self::core::{GfaConfig, GfaCore, RegE, FIELD_ORDER_25519, FIELD_ORDER_SECP, FIELD_ORDER_STARK};
59
60/// Name for the strict type library.
61pub const LIB_NAME_FINITE_FIELD: &str = "FiniteField";