@@ -24,6 +24,24 @@ This is an experimental next-generation constant-time library inspired by `subtl
2424recommend you continue to stick with ` subtle ` . We may attempt to get some of the changes in this
2525library incorporated into ` subtle ` for a potential v3.0.
2626
27+ ## What makes this crate different from ` subtle ` ?
28+
29+ - Pervasive ` const fn ` support
30+ - Almost all constructors/methods on ` Choice ` are ` const fn `
31+ - ` Choice ` can be constructed using various ` const fn ` predicates on integer types, enabling
32+ writing constant-time ` const fn ` logic
33+ - ` CtOption ` supports ` const fn ` constructors and ` *_copied ` methods to access the inner value
34+ when it's a ` Copy ` type
35+ - Macros to act as ` CtOption ` pseudo-combinators: ` map! ` and ` unwrap_or! `
36+ - Expanded selection of ` CtOption ` combinators that more closely mirrors ` std::option::Option `
37+ - Guaranteed constant-time equality testing and conditional selection on ` x86(_64) ` and ` aarch64 `
38+ using ` asm! ` implementations in the ` cmov ` crate which call special constant-time CPU instructions
39+ with a portable "best effort" fallback on other platforms using bitwise arithmetic and ` black_box `
40+
41+ Many features of this crate are extractions from the [ ` crypto-bigint ` ] crate, where we implement all
42+ core logic as ` const fn ` and needed solutions for implementing constant-time code despite the
43+ unique constraints it imposes.
44+
2745## ⚠️ Security Warning
2846
2947The implementation contained in this crate has never been independently audited!
@@ -69,3 +87,4 @@ dual licensed as above, without any additional terms or conditions.
6987[ RustCrypto ] : https://github.com/RustCrypto
7088[ `cmov` ] : https://docs.rs/cmov
7189[ `subtle` ] : https://docs.rs/subtle
90+ [ `crypto-bigint` ] : https://docs.rs/crypto-bigint
0 commit comments