subtle icon indicating copy to clipboard operation
subtle copied to clipboard

Pure-Rust traits and utilities for constant-time cryptographic implementations.

Results 42 subtle issues
Sort by recently updated
recently updated
newest added

This is a feature request to support the trait `ConditionallySelectable` for types that are not `Copy`. ## Motivation I have large types (e.g. polynomials of high degree) that I'd like...

### My problem ```rust struct C(A, B); fn create_c(a: &[u8], b: &[u8]) -> CtOption { let a: CtOption = A::from_bytes(a); let b: CtOption = B::from_bytes(b); // ??? } ``` ###...

I am working on a project that has a policy to avoid BSD 2- and 3-clause licenses due to the complexity of satisfying the attribution clause: > Redistributions in binary...

https://github.com/dalek-cryptography/subtle/blob/b4b070c3faf87cb8f324bd0ed0a5e5ec32d3a5b0/src/lib.rs#L223 remarks that u8 is neither Send nor Sync, however u8 has auto-trait implementations for both: https://doc.rust-lang.org/std/primitive.u8.html#impl-Sync

### Motivation Adding signed integer comparison support. This is part of an existing issue (https://github.com/dalek-cryptography/subtle/issues/61) ### In this PR * Added generate_signed_integer_gt * Formatted tests * Added signed_integer_gt tests <...

PR makes arrays of any size "conditionally selectable" as long as `T` is conditionally selectable. Changes MSRV to 1.51. Closes #82

This PR address some general updates: * Upgrade `rand` dependency from `0.7` to `0.8` * Use the Rust 2018 syntax, and update the relative documentation (removed `external crate` from code...

Background is an RSA implementation I'm writing, where I'm using `type Digit = usize`. I presume lack of implementation for usize/isize was an oversight, not intentional?

This kind of implementation seems fairly natural for big-int libraries (for example [curve25519-dalek](https://github.com/dalek-cryptography/curve25519-dalek/blob/b307c155c966c16b81f63a5872a1ec1977829ddf/src/backend/serial/u64/field.rs#L220) essentially does this for the specific type `[u64; 5]`). Now that min-const-generics are stabilized, it would nice...

For now, `CtOption::map` requires a `Default` type. This is especially problematic for types which require some constant-time validation of the input in their public constructors, say with the following API....