1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//! Sealed marker for "this type is not the `Ct` personality" — safe
//! to flow through variable-time algorithms.
//!
//! The non-`_pr` schoolbook surface excludes `Ct` carriers
//! structurally: it bounds on `Rem`/`Div`, which the `Ct` personality
//! doesn't implement. The `_pr` entries drop those bounds (the caller
//! pre-reduces), so nothing would stop a `Ct` operand from entering
//! their variable-time bodies and leaking through loop counts and
//! per-bit branches. [`NonCt`] closes that gap.
//!
//! Distinct from `const_num_traits::Personality` on purpose:
//! `Personality` describes a type's CT shape, while `NonCt` gates
//! algorithm choice on it — and the gate works by *absence* of an
//! impl, since Rust has no negative bounds.
use ;
pub
/// Sealed marker: the type is not the `Ct` personality and may flow
/// through modmath's variable-time algorithms.
///
/// Blanket-implemented for every `T: HasPersonality<P = Nct>` — the
/// primitive integers (whose projection impls live in
/// `const-num-traits`) and any backend carrier declaring the `Nct`
/// personality. A `Ct` carrier projects `P = Ct`, misses the blanket
/// impl, and is rejected at compile time by every variable-time entry
/// bounded on `NonCt`. Sealed, so the only way into the gate is the
/// carrier's own personality declaration.