RustCrypto/crypto-bigint

For vartime methods, document what causes the variable time

Closed this issue · 2 comments

Should we add documentation for when vartime methods vary in time?

Take for example, Uint::bit_vartime(index). The amount of time this function takes is a function of index, not the bit at said index. If only the bit is secret i.e. index is a public value, this might be perfectly fine.

Some of them do, e.g. https://docs.rs/crypto-bigint/latest/crypto_bigint/struct.Uint.html#method.shl_vartime

The ones that don't should definitely mention what they're variable time in respect to.

Cool, I'll submit a PR.