-
Couldn't load subscription status.
- Fork 70
Closed
Description
There's a lot of small stuff so I decided to put them in one issue:
- (Make bit ops use
u32for shifts #373) The types of the arguments toshl/shrmethods are inconsistent:stdhas them asu32,LimbasLimb, andUintasusize. Perhaps we should at least matchLimbandUint. - (Bring the overflow behavior in bit shifts in sync with
std#395) What shouldUint::shl_limb(),shl_vartime(), andshl()(same forshr()) do onshiftoverflow? Currentlyshl_limb()panics,shl_vartime()returnsself, andshl()returns zero. Should probably do the same thing. See also Diverging from primitive behavior in overflowing shift #121 - (Make
inv_mod2k(_vartime)return aCtChoice#416) Shouldinv_mod2k()returnCtChoice::FALSEifselfis even? Shouldinv_odd_mod()returnCtChoice::FALSEifmodulusis even? - (Normalize the usage of prefixes for method names #417) We need to make the usage of
ct_andconst_prefixes uniform. One prefix, eitherconst_orct_, should be used forconst fnwhen there is a non-constfnwith the same functionality (otherwise no prefix needed);ct_meaning "constant-time" really shouldn't be used at all because that's the default.uint/div.rsis especially bad in this respect. - (Make division methods take
NonZero-wrapped divisors #419) Shouldconst fndivision methods take aNonZero-wrapped modulus? Shoulddiv_rem_limb_with_reciprocal()take aCtOptionof the reciprocal, or the caller should do the mapping instead?
Metadata
Metadata
Assignees
Labels
No labels