-
Notifications
You must be signed in to change notification settings - Fork 155
Description
In #868, the idea of a constant-time equality trait within cmov was discussed.
Rust currently has quite a lot of constant-time equality traits, so I'm unsure if bringing a new one into the field is the best idea.
It's possible that we could add support for it within cmov, but then implement it into a crate such as subtle (likely behind a new feature). This approach means that we don't bring yet another CT-EQ trait into the field, but can still provide constant-time equality comparisons that won't be optimized away by the compiler. Current users of the subtle crate could also enable this with almost no-effort.
I have a working x86 PoC locally - it does not seem out of reach for Aarch64 either.
I'd love to hear any thoughts/ideas surrounding this, as there's a lot applications where this functionality would be beneficial.