|
60 | 60 | //! something it isn't with `Option`: evaluate combinators eagerly instead of lazily, running the |
61 | 61 | //! same functions regardless of the value's effective presence or absence. |
62 | 62 | //! |
| 63 | +//! ## [`CtAssign`]: constant-time additional assignment using [predication] |
| 64 | +//! Support for conditionally assigning to a type or slices thereof (for types which impl the |
| 65 | +//! [`CtAssignSlice`] trait) based on a provided condition value. |
| 66 | +//! |
| 67 | +//! Uses predication instructions or a portable simulation thereof to perform constant-time |
| 68 | +//! conditional assignment based ona [`Choice`]. |
| 69 | +//! |
| 70 | +//! *NOTE: for `subtle` users, this trait provides the equivalent of the |
| 71 | +//! `ConditionallySelectable::conditional_assign` method, but as its own trait without a `Sized` |
| 72 | +//! bound so it can also be impl'd for slices* |
| 73 | +//! |
63 | 74 | //! ## [`CtEq`]: constant-time analogue for [`PartialEq`]/[`Eq`] |
64 | 75 | //! Equality testing often short circuits for performance reasons, but when comparing values in |
65 | 76 | //! constant-time such short-circuiting is forbidden. |
|
75 | 86 | //! using non-branch instructions which perform conditional modifications based on a *predicate* |
76 | 87 | //! or boolean value, in the design of this library a `Choice`. |
77 | 88 | //! |
78 | | -//! The `CtSelect` trait provides methods for performing conditional moves, either conditionally |
79 | | -//! modifying a value in-place, or selecting from two different inputs and returning a new one. |
| 89 | +//! The `CtSelect` trait provides methods for performing conditional selection between two |
| 90 | +//! different inputs and returning a new one. |
80 | 91 | //! |
81 | 92 | //! *NOTE: for `subtle` users, this is the equivalent of the `ConditionallySelectable` trait* |
82 | 93 | //! |
|
0 commit comments