Home
last modified time | relevance | path

Searched refs:SCALAR_LEN (Results 1 – 5 of 5) sorted by relevance

/external/rust/crates/ring/src/ec/curve25519/
Dscalar.rs19 pub struct Scalar([u8; SCALAR_LEN]);
21 pub const SCALAR_LEN: usize = 32; constant
26 pub fn from_bytes_checked(bytes: [u8; SCALAR_LEN]) -> Result<Self, error::Unspecified> { in from_bytes_checked()
27 const ORDER: [limb::Limb; SCALAR_LEN / limb::LIMB_BYTES] =
34 let mut limbs = [0; SCALAR_LEN / limb::LIMB_BYTES];
53 Self((&unreduced[..SCALAR_LEN]).try_into().unwrap()) in from_sha512_digest_reduced()
58 pub struct MaskedScalar([u8; SCALAR_LEN]);
61 pub fn from_bytes_masked(bytes: [u8; SCALAR_LEN]) -> Self { in from_bytes_masked()
63 fn GFp_x25519_sc_mask(a: &mut [u8; SCALAR_LEN]); in GFp_x25519_sc_mask() argument
78 const UNREDUCED_SCALAR_LEN: usize = SCALAR_LEN * 2;
Dx25519.rs17 use super::{ops, scalar::SCALAR_LEN};
64 let private_key: &[u8; SCALAR_LEN] = private_key.bytes_less_safe().try_into()?; in x25519_public_from_private()
98 let my_private_key: &[u8; SCALAR_LEN] = my_private_key.bytes_less_safe().try_into()?; in x25519_ecdh()
Dops.rs18 pub use super::scalar::{MaskedScalar, Scalar, SCALAR_LEN};
/external/rust/crates/ring/src/ec/curve25519/ed25519/
Dsigning.rs161 let (private_scalar, private_prefix) = h.as_ref().split_at(SCALAR_LEN); in from_seed_()
183 s: &mut [u8; SCALAR_LEN], in sign() argument
190 let (signature_bytes, _unused) = signature_bytes.split_at_mut(ELEM_LEN + SCALAR_LEN); in sign()
258 const PREFIX_LEN: usize = digest::SHA512_OUTPUT_LEN - SCALAR_LEN;
260 const SIGNATURE_LEN: usize = ELEM_LEN + SCALAR_LEN;
Dverification.rs50 let signature_s: &[u8; SCALAR_LEN] = input in verify()
51 .read_bytes(SCALAR_LEN)? in verify()