mirror of
https://github.com/saymrwulf/betrusted-curve25519-dalek-source.git
synced 2026-09-12 21:40:32 +00:00
wip: now builds correctly without precomputed-tables enabled
This commit is contained in:
parent
7bf60e4a2b
commit
d98a8b11e7
2 changed files with 14 additions and 6 deletions
|
|
@ -73,7 +73,7 @@ alloc = ["zeroize?/alloc"]
|
||||||
precomputed-tables = []
|
precomputed-tables = []
|
||||||
legacy_compatibility = []
|
legacy_compatibility = []
|
||||||
fiat_backend = ["dep:fiat-crypto"]
|
fiat_backend = ["dep:fiat-crypto"]
|
||||||
u32e_backend = ["dep:engine25519-as","dep:engine-25519","dep:utralib","log","group","zeroize","precomputed-tables"]
|
u32e_backend = ["dep:engine25519-as","dep:engine-25519","dep:utralib","log","zeroize"]
|
||||||
group = ["dep:group", "rand_core"]
|
group = ["dep:group", "rand_core"]
|
||||||
group-bits = ["group", "ff/bits"]
|
group-bits = ["group", "ff/bits"]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,11 +11,15 @@
|
||||||
|
|
||||||
//! This module contains backend-specific constant values, such as the 64-bit limbs of curve constants.
|
//! This module contains backend-specific constant values, such as the 64-bit limbs of curve constants.
|
||||||
|
|
||||||
use crate::backend::serial::curve_models::AffineNielsPoint;
|
|
||||||
use super::field::Engine25519;
|
use super::field::Engine25519;
|
||||||
use super::scalar::Scalar29;
|
use super::scalar::Scalar29;
|
||||||
use crate::edwards::{EdwardsBasepointTable, EdwardsPoint};
|
use crate::edwards::EdwardsPoint;
|
||||||
use crate::window::{LookupTable, NafLookupTable8};
|
#[cfg(feature = "precomputed-tables")]
|
||||||
|
use crate::{
|
||||||
|
backend::serial::curve_models::AffineNielsPoint,
|
||||||
|
edwards::EdwardsBasepointTable,
|
||||||
|
window::{LookupTable, NafLookupTable8},
|
||||||
|
};
|
||||||
|
|
||||||
/// The value of minus one, equal to `-&FieldElement::one()`
|
/// The value of minus one, equal to `-&FieldElement::one()`
|
||||||
pub(crate) const MINUS_ONE: Engine25519 = Engine25519([
|
pub(crate) const MINUS_ONE: Engine25519 = Engine25519([
|
||||||
|
|
@ -198,11 +202,13 @@ pub const EIGHT_TORSION_INNER_DOC_HIDDEN: [EdwardsPoint; 8] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
/// Table containing precomputed multiples of the Ed25519 basepoint \\(B = (x, 4/5)\\).
|
/// Table containing precomputed multiples of the Ed25519 basepoint \\(B = (x, 4/5)\\).
|
||||||
pub const ED25519_BASEPOINT_TABLE: EdwardsBasepointTable = ED25519_BASEPOINT_TABLE_INNER_DOC_HIDDEN;
|
#[cfg(feature = "precomputed-tables")]
|
||||||
|
pub static ED25519_BASEPOINT_TABLE: &'static EdwardsBasepointTable = &ED25519_BASEPOINT_TABLE_INNER_DOC_HIDDEN;
|
||||||
|
|
||||||
/// Inner constant, used to avoid filling the docs with precomputed points.
|
/// Inner constant, used to avoid filling the docs with precomputed points.
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub const ED25519_BASEPOINT_TABLE_INNER_DOC_HIDDEN: EdwardsBasepointTable =
|
#[cfg(feature = "precomputed-tables")]
|
||||||
|
static ED25519_BASEPOINT_TABLE_INNER_DOC_HIDDEN: EdwardsBasepointTable =
|
||||||
EdwardsBasepointTable([
|
EdwardsBasepointTable([
|
||||||
LookupTable([
|
LookupTable([
|
||||||
AffineNielsPoint {
|
AffineNielsPoint {
|
||||||
|
|
@ -2319,6 +2325,8 @@ pub const ED25519_BASEPOINT_TABLE_INNER_DOC_HIDDEN: EdwardsBasepointTable =
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/// Odd multiples of the basepoint `[B, 3B, 5B, 7B, 9B, 11B, 13B, 15B, ..., 127B]`.
|
/// Odd multiples of the basepoint `[B, 3B, 5B, 7B, 9B, 11B, 13B, 15B, ..., 127B]`.
|
||||||
|
#[cfg(feature = "precomputed-tables")]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub(crate) const AFFINE_ODD_MULTIPLES_OF_BASEPOINT: NafLookupTable8<AffineNielsPoint> =
|
pub(crate) const AFFINE_ODD_MULTIPLES_OF_BASEPOINT: NafLookupTable8<AffineNielsPoint> =
|
||||||
NafLookupTable8([
|
NafLookupTable8([
|
||||||
AffineNielsPoint {
|
AffineNielsPoint {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue