arithmetic: Move bn_mul_mont
declaration to montgomery
.
This commit is contained in:
parent
af471c9351
commit
40e147dfe8
@ -758,18 +758,6 @@ fn limbs_mont_square(r: &mut [Limb], m: &[Limb], n0: &N0, _cpu_features: cpu::Fe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
prefixed_extern! {
|
|
||||||
// `r` and/or 'a' and/or 'b' may alias.
|
|
||||||
fn bn_mul_mont(
|
|
||||||
r: *mut Limb,
|
|
||||||
a: *const Limb,
|
|
||||||
b: *const Limb,
|
|
||||||
n: *const Limb,
|
|
||||||
n0: &N0,
|
|
||||||
num_limbs: c::size_t,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
@ -120,7 +120,7 @@ use crate::{bssl, c, limb::Limb};
|
|||||||
// TODO: Stop calling this from C and un-export it.
|
// TODO: Stop calling this from C and un-export it.
|
||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
prefixed_export! {
|
prefixed_export! {
|
||||||
unsafe fn bn_mul_mont(
|
pub(super) unsafe fn bn_mul_mont(
|
||||||
r: *mut Limb,
|
r: *mut Limb,
|
||||||
a: *const Limb,
|
a: *const Limb,
|
||||||
b: *const Limb,
|
b: *const Limb,
|
||||||
@ -218,6 +218,24 @@ prefixed_extern! {
|
|||||||
fn limbs_mul_add_limb(r: *mut Limb, a: *const Limb, b: Limb, num_limbs: c::size_t) -> Limb;
|
fn limbs_mul_add_limb(r: *mut Limb, a: *const Limb, b: Limb, num_limbs: c::size_t) -> Limb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(any(
|
||||||
|
target_arch = "aarch64",
|
||||||
|
target_arch = "arm",
|
||||||
|
target_arch = "x86_64",
|
||||||
|
target_arch = "x86"
|
||||||
|
))]
|
||||||
|
prefixed_extern! {
|
||||||
|
// `r` and/or 'a' and/or 'b' may alias.
|
||||||
|
pub(super) fn bn_mul_mont(
|
||||||
|
r: *mut Limb,
|
||||||
|
a: *const Limb,
|
||||||
|
b: *const Limb,
|
||||||
|
n: *const Limb,
|
||||||
|
n0: &N0,
|
||||||
|
num_limbs: c::size_t,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user