Home
last modified time | relevance | path

Searched refs:num_limbs (Results 1 – 14 of 14) sorted by relevance

/external/rust/crates/ring/crypto/limbs/
Dlimbs.c28 Limb LIMBS_are_zero(const Limb a[], size_t num_limbs) { in LIMBS_are_zero() argument
30 for (size_t i = 0; i < num_limbs; ++i) { in LIMBS_are_zero()
38 Limb LIMBS_equal(const Limb a[], const Limb b[], size_t num_limbs) { in LIMBS_equal() argument
40 for (size_t i = 0; i < num_limbs; ++i) { in LIMBS_equal()
47 Limb LIMBS_equal_limb(const Limb a[], Limb b, size_t num_limbs) { in LIMBS_equal_limb() argument
48 if (num_limbs == 0) { in LIMBS_equal_limb()
51 debug_assert_nonsecret(num_limbs >= 1); in LIMBS_equal_limb()
53 Limb hi_zero = LIMBS_are_zero(&a[1], num_limbs - 1); in LIMBS_equal_limb()
59 Limb LIMBS_are_even(const Limb a[], size_t num_limbs) { in LIMBS_are_even() argument
61 if (num_limbs == 0) { in LIMBS_are_even()
[all …]
Dlimbs.h28 Limb LIMBS_are_zero(const Limb a[], size_t num_limbs);
29 Limb LIMBS_are_even(const Limb a[], size_t num_limbs);
30 Limb LIMBS_equal(const Limb a[], const Limb b[], size_t num_limbs);
31 Limb LIMBS_equal_limb(const Limb a[], Limb b, size_t num_limbs);
32 void LIMBS_reduce_once(Limb r[], const Limb m[], size_t num_limbs);
34 size_t num_limbs);
36 size_t num_limbs);
37 void LIMBS_shl_mod(Limb r[], const Limb a[], const Limb m[], size_t num_limbs);
38 Limb GFp_limbs_mul_add_limb(Limb r[], const Limb a[], Limb b, size_t num_limbs);
Dlimbs.inl117 size_t num_limbs) { argument
118 debug_assert_nonsecret(num_limbs >= 1);
120 for (size_t i = 1; i < num_limbs; ++i) {
128 size_t num_limbs) { argument
129 debug_assert_nonsecret(num_limbs >= 1);
131 for (size_t i = 1; i < num_limbs; ++i) {
137 static inline void limbs_copy(Limb r[], const Limb a[], size_t num_limbs) { argument
138 for (size_t i = 0; i < num_limbs; ++i) {
144 size_t num_limbs, size_t num_entries, argument
146 for (size_t i = 0; i < num_limbs; ++i) {
[all …]
/external/rust/crates/ring/src/arithmetic/
Dbigint.rs53 num_limbs: usize, field
102 let num_limbs = (input.len() + LIMB_BYTES - 1) / LIMB_BYTES; in positive_minimal_width_from_be_bytes() localVariable
104 num_limbs, in positive_minimal_width_from_be_bytes()
139 limbs: vec![0; width.num_limbs].into_boxed_slice(), in zero()
146 num_limbs: self.limbs.len(), in width()
332 assert_eq!(self.width().num_limbs, l.width().num_limbs); in to_elem()
362 num_limbs: self.limbs.len(), in zero()
410 let num_limbs = m.width().num_limbs; in decode_once() localVariable
413 let one = &one[..num_limbs]; // assert!(num_limbs <= MODULUS_MAX_LIMBS); in decode_once()
485 fn LIMBS_shl_mod(r: *mut Limb, a: *const Limb, m: *const Limb, num_limbs: c::size_t); in elem_mul_by_2()
[all …]
/external/rust/crates/ring/src/ec/suite_b/ecdsa/
Ddigest_scalar.rs62 let num_limbs = cops.num_limbs; in digest_scalar_() localVariable
63 let digest = if digest.len() > num_limbs * LIMB_BYTES { in digest_scalar_()
64 &digest[..(num_limbs * LIMB_BYTES)] in digest_scalar_()
109 let num_limbs = ops.public_key_ops.common.num_limbs; in test() localVariable
113 ops.public_key_ops.common.num_limbs * LIMB_BYTES in test()
125 assert_eq!(actual.limbs[..num_limbs], expected.limbs[..num_limbs]); in test()
Dsigning.rs388 limb::big_endian_from_limbs(&r.limbs[..ops.common.num_limbs], r_out); in format_rs_fixed()
391 limb::big_endian_from_limbs(&s.limbs[..ops.common.num_limbs], s_out); in format_rs_fixed()
402 limb::big_endian_from_limbs(&a.limbs[..ops.common.num_limbs], &mut fixed[1..]); in format_rs_asn1()
/external/rust/crates/ring/src/ec/suite_b/
Dops.rs61 pub num_limbs: usize, field
84 limbs_equal_limbs_consttime(&a.limbs[..self.num_limbs], &b.limbs[..self.num_limbs]) in elems_are_equal()
121 limbs_are_zero_constant_time(&a.limbs[..self.num_limbs]) == LimbMask::True in is_zero()
142 r.limbs[..self.num_limbs].copy_from_slice(&p.xyz[0..self.num_limbs]); in point_x()
148 r.limbs[..self.num_limbs].copy_from_slice(&p.xyz[self.num_limbs..(2 * self.num_limbs)]); in point_y()
154 r.limbs[..self.num_limbs] in point_z()
155 .copy_from_slice(&p.xyz[(2 * self.num_limbs)..(3 * self.num_limbs)]); in point_z()
217 let encoded_value = input.read_bytes(self.common.num_limbs * LIMB_BYTES)?; in elem_parse()
245 self.common.num_limbs * LIMB_BYTES in scalar_bytes_len()
291 for i in 0..self.public_key_ops.common.num_limbs { in elem_equals()
[all …]
Dprivate_key.rs31 let num_limbs = ops.common.num_limbs; in random_scalar() localVariable
33 let bytes = &mut bytes[..(num_limbs * LIMB_BYTES)]; in random_scalar()
102 debug_assert_eq!(bytes.len(), ops.common.num_limbs * LIMB_BYTES); in check_scalar_big_endian_bytes()
138 let elem_and_scalar_bytes = ops.common.num_limbs * LIMB_BYTES; in public_from_private()
192 let num_limbs = ops.common.num_limbs; in big_endian_affine_from_jacobian() localVariable
195 limb::big_endian_from_limbs(&x.limbs[..num_limbs], x_out); in big_endian_affine_from_jacobian()
199 limb::big_endian_from_limbs(&y.limbs[..num_limbs], y_out); in big_endian_affine_from_jacobian()
Decdh.rs186 limb::big_endian_from_limbs(&ops.n.limbs[..ops.num_limbs], &mut n_bytes[..num_bytes]); in test_agreement_suite_b_ecdh_generate()
/external/rust/crates/ring/src/
Dlimb.rs60 fn LIMBS_equal(a: *const Limb, b: *const Limb, num_limbs: c::size_t) -> LimbMask; in limbs_equal_limbs_consttime()
110 for num_limbs in (1..=a.len()).rev() { in limbs_minimal_bits()
111 let high_limb = a[num_limbs - 1]; in limbs_minimal_bits()
121 ((num_limbs - 1) * LIMB_BITS) + high_limb_num_bits, in limbs_minimal_bits()
242 let num_limbs = limbs.len(); in big_endian_from_limbs() localVariable
244 assert_eq!(out_len, num_limbs * LIMB_BYTES); in big_endian_from_limbs()
245 for i in 0..num_limbs { in big_endian_from_limbs()
248 out[((num_limbs - i - 1) * LIMB_BYTES) + (LIMB_BYTES - j - 1)] = (limb & 0xff) as u8; in big_endian_from_limbs()
290 let num_limbs = limbs.len(); in fold_5_bit_windows() localVariable
292 let num_whole_windows = (num_limbs * LIMB_BITS) / 5; in fold_5_bit_windows()
[all …]
/external/rust/crates/ring/crypto/fipsmodule/ec/
Decp_nistz.c30 size_t num_limbs) { in gfp_little_endian_bytes_from_scalar() argument
31 debug_assert_nonsecret(str_len == (num_limbs * sizeof(Limb)) + 1); in gfp_little_endian_bytes_from_scalar()
34 for (i = 0; i < num_limbs * sizeof(Limb); i += sizeof(Limb)) { in gfp_little_endian_bytes_from_scalar()
Decp_nistz.h272 size_t num_limbs);
/external/rust/crates/ring/src/ec/suite_b/ops/
Dp384.rs28 num_limbs: 384 / LIMB_BITS,
Dp256.rs28 num_limbs: 256 / LIMB_BITS,