Function ring::limb::parse_big_endian_in_range_and_pad_consttime
source · pub fn parse_big_endian_in_range_and_pad_consttime(
input: Input<'_>,
allow_zero: AllowZero,
max_exclusive: &[u64],
result: &mut [u64],
) -> Result<(), Unspecified>
Expand description
Parses input
into result
, verifies that the value is less than
max_exclusive
, and pads result
with zeros to its length. If allow_zero
is not AllowZero::Yes
, zero values are rejected.
This attempts to be constant-time with respect to the actual value only if the value is actually in range. In other words, this won’t leak anything about a valid value, but it might leak small amounts of information about an invalid value (which constraint it failed).