commit_hash stringlengths 40 40 | author stringlengths 1 57 | date timestamp[s]date 2010-07-26 04:45:09 2026-04-14 18:21:10 | message stringlengths 8 1.39M | diff stringlengths 68 51.2k | files_changed int64 1 136 | insertions int64 0 2.35k | deletions int64 0 1.9k |
|---|---|---|---|---|---|---|---|
cf0026ab2c71b318088d0acb3fce693de613b8d5 | Tony Arcieri | 2026-01-03T16:00:17 | ctutils: documentation updates (#1323) | diff --git a/ctutils/src/choice.rs b/ctutils/src/choice.rs
index 4417ae4..494c2d4 100644
--- a/ctutils/src/choice.rs
+++ b/ctutils/src/choice.rs
@@ -28,8 +28,8 @@ macro_rules! bitnz {
/// Constant-time analogue of `bool` providing a "best effort" optimization barrier.
///
-/// Attempts to hint to the compiler and i... | 1 | 27 | 27 |
f603ad3f3cc4999c7105d990451347a3cf15b375 | Tony Arcieri | 2026-01-03T15:55:57 | ctutils: add `Choice::to_u8_mask`/`to_u16_mask` (#1322)
Rounds out support for mask generation for all core unsigned integer
types | diff --git a/ctutils/src/choice.rs b/ctutils/src/choice.rs
index ffc9f50..4417ae4 100644
--- a/ctutils/src/choice.rs
+++ b/ctutils/src/choice.rs
@@ -45,61 +45,8 @@ impl Choice {
/// Equivalent of [`true`].
pub const TRUE: Self = Self(1);
- /// Convert `Choice` into a `bool`.
- ///
- /// <div class ... | 1 | 124 | 70 |
e02838d17762fa65a84e3c8eeb851acb26c28909 | Arthur Gautier | 2026-01-03T15:00:01 | zeroize_derive: fixup test suite (#1320)
#1270 broke the tests for `zeroize_derive`, this fixes the expected output of
the tests accordingly.
See $1317 | diff --git a/zeroize_derive/src/lib.rs b/zeroize_derive/src/lib.rs
index d6185e7..98cc561 100644
--- a/zeroize_derive/src/lib.rs
+++ b/zeroize_derive/src/lib.rs
@@ -454,7 +454,7 @@ mod tests {
impl ::zeroize::Zeroize for Z {
fn zeroize(&mut self) {
match se... | 1 | 5 | 5 |
b639b2f71280167614ab4f231f211d368b471bfe | Tony Arcieri | 2025-12-29T22:03:16 | ctutils: remove `(Partial)Eq` impls for `Choice` (#1315)
These were added in #1266 to simplify a migration from `subtle::Choice`
with a TODO to eventually remove them. They're used in tests, including
it seems, the ones for `ctutils`.
They're problematic because the goal of `Choice` is to be an opaque
boolean-alterna... | diff --git a/ctutils/src/choice.rs b/ctutils/src/choice.rs
index 75e722a..ffc9f50 100644
--- a/ctutils/src/choice.rs
+++ b/ctutils/src/choice.rs
@@ -32,10 +32,10 @@ macro_rules! bitnz {
/// applied which depend on a value.
///
/// This is used as a "belt-and-suspenders" defense in addition to mechanisms like
-/// co... | 2 | 86 | 87 |
d1603aba19131f6714c0cb71a88556b06594f52f | Tony Arcieri | 2025-12-29T21:23:27 | ctutils: remove `Choice::new` (#1314)
It had weird semantics: panicking in debug mode if given a `u8` other
than `0` or `1`.
Instead `Choice::from_u8_lsb` provides an equivalent constructor which
never panicks or incorrectly initializes a `Choice`. | diff --git a/Cargo.lock b/Cargo.lock
index acbb5fe..e24b061 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -108,7 +108,7 @@ dependencies = [
[[package]]
name = "ctutils"
-version = "0.2.3"
+version = "0.3.0-pre"
dependencies = [
"cmov",
"subtle",
diff --git a/ctutils/Cargo.toml b/ctutils/Cargo.toml
index fe08d4e.... | 3 | 2 | 9 |
90936dc2bd4b386fcfe659f767965baf409577db | Tony Arcieri | 2025-12-29T17:36:04 | ctutils: deprecate `Choice::new` (#1312)
It panics if given a value which isn't `0` or `1`.
Instead we can use `Choice::from_u8_lsb` for clear, non-panicking
semantics instead. | diff --git a/ctutils/src/choice.rs b/ctutils/src/choice.rs
index 76ec96e..b6dd08c 100644
--- a/ctutils/src/choice.rs
+++ b/ctutils/src/choice.rs
@@ -36,7 +36,7 @@ macro_rules! bitnz {
/// the only line of defense.
// TODO(tarcieri): remove `Eq`/`PartialEq` when `crypto-bigint` is updated
#[derive(Copy, Clone, Debug,... | 4 | 35 | 49 |
7746d38c65538409cec4927f93ffad9ac922c05e | Tony Arcieri | 2025-12-29T17:20:22 | ctutils: add `Choice::from_u8*` and `from_u16*` (#1311)
Adds a set of `Choice` constructors following the same pattern we
already implement for `u32`, `u64`, and `u128`.
Interestingly, this gives us an alternative to `Choice::new` which
doesn't have to deal with out-of-range values: `Choice::from_u8_lsb`.
With that p... | diff --git a/ctutils/src/choice.rs b/ctutils/src/choice.rs
index 7a1f31e..76ec96e 100644
--- a/ctutils/src/choice.rs
+++ b/ctutils/src/choice.rs
@@ -47,6 +47,17 @@ impl Choice {
/// Create a new [`Choice`] from the given `u8` value, which MUST be either `0` or `1`.
///
+ /// <div class="warning">
+ //... | 1 | 160 | 3 |
e4a593d9312ded292720e90c0b0da56b916490af | Tony Arcieri | 2025-12-29T16:54:23 | ctutils: impl `From<u8>` for `Choice` (#1309)
This is the main way `subtle` constructs `Choice` so it's important for
backwards compatibility.
It seems like if we had `from_u8_lsb`, we could avoid the panic
condition by always masking the input `u8`. We don't yet, but this
commit also leaves a comment to consider dep... | diff --git a/ctutils/src/choice.rs b/ctutils/src/choice.rs
index d6fed7c..7a1f31e 100644
--- a/ctutils/src/choice.rs
+++ b/ctutils/src/choice.rs
@@ -49,6 +49,7 @@ impl Choice {
///
/// # Panics
/// - in `debug` builds, panics if the value is anything other than `0` or `1`.
+ // TODO(tarcieri): depreca... | 1 | 12 | 0 |
5bbbb9b288ace1a285f054f1eed872220c5a4ae7 | Tony Arcieri | 2025-12-28T20:08:09 | ctutils: unsigned `CtNeg` impls (#1306)
Uses `wrapping_neg` to perform (conditional) negation for: `u8`, `u16`,
`u32`, `u64`, `u128`
Also expands the tests using macros to test every integer type we write
impls for | diff --git a/ctutils/src/traits/ct_neg.rs b/ctutils/src/traits/ct_neg.rs
index cc6f7d2..15b673f 100644
--- a/ctutils/src/traits/ct_neg.rs
+++ b/ctutils/src/traits/ct_neg.rs
@@ -13,11 +13,11 @@ pub trait CtNeg: Sized {
}
}
-// Impl `CtNeg` for an integer type which impls `CtSelect`
-macro_rules! impl_ct_neg {
- ... | 1 | 83 | 18 |
15736c1ab2a280b837d855fadc0caa8df2ab47c4 | Tony Arcieri | 2025-12-28T06:37:56 | ctutils v0.2.1 (#1305)
Includes pin to `cmov` v0.4.3 with important security fixes, see #1304 | diff --git a/Cargo.lock b/Cargo.lock
index 5108eb8..ea60d9a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -108,7 +108,7 @@ dependencies = [
[[package]]
name = "ctutils"
-version = "0.2.0"
+version = "0.2.1"
dependencies = [
"cmov",
"subtle",
diff --git a/ctutils/Cargo.toml b/ctutils/Cargo.toml
index 65b647b..f56... | 2 | 2 | 2 |
fbbc2e76a22c63a08f9391d995f86673cb9d6175 | Tony Arcieri | 2025-12-28T06:26:38 | ctutils: pin to `cmov` v0.4.3
It includes important security fixes. See #1304. | diff --git a/ctutils/Cargo.toml b/ctutils/Cargo.toml
index a1abf9a..65b647b 100644
--- a/ctutils/Cargo.toml
+++ b/ctutils/Cargo.toml
@@ -17,7 +17,7 @@ edition = "2024"
rust-version = "1.85"
[dependencies]
-cmov = "0.4.2"
+cmov = "0.4.3"
# optional dependencies
subtle = { version = "2", optional = true, default-... | 1 | 1 | 1 |
4905af32f62353a001f8ae43ba7596fac690ca7f | Tony Arcieri | 2025-12-28T06:14:07 | cmov: address truncation lint for `Cmov` impl for `u8` (#1302) | diff --git a/cmov/src/lib.rs b/cmov/src/lib.rs
index 5000a66..2cfdd9d 100644
--- a/cmov/src/lib.rs
+++ b/cmov/src/lib.rs
@@ -70,21 +70,21 @@ pub trait CmovEq {
}
}
-// TODO(tarcieri): address truncation lint
-#[allow(clippy::cast_possible_truncation)]
impl Cmov for u8 {
#[inline]
fn cmovnz(&mut self,... | 1 | 4 | 4 |
677833666102489e4ce0692b8a771511e1252350 | Tony Arcieri | 2025-12-28T06:02:37 | cmov: enable additional lints (#1301)
Issues like #1300 could ideally be caught via more fastidious linting.
This adds several additional lints and TODOs to address the ones which
are currently failing. | diff --git a/cmov/src/aarch64.rs b/cmov/src/aarch64.rs
index c4600b7..4683e10 100644
--- a/cmov/src/aarch64.rs
+++ b/cmov/src/aarch64.rs
@@ -37,7 +37,10 @@ macro_rules! cseleq {
};
};
- *$dst = tmp as u8;
+ #[allow(clippy::cast_possible_truncation)]
+ {
+ *$dst = ... | 3 | 27 | 3 |
a0697714a4adf61d1903a5ee742e01e3f84c8286 | Tony Arcieri | 2025-12-28T05:51:20 | cmov: fix truncation bug in portable implementation (#1300)
Closes #1298
The previous portable implementation truncated integers when comparing
them in the `u64` implemenation of `CmovEq`.
This adds a macro adapted from `ctutils` and uses it everywhere 64-bit
integers are being compared in the portable implementatio... | diff --git a/cmov/src/portable.rs b/cmov/src/portable.rs
index 0a6259f..af91b27 100644
--- a/cmov/src/portable.rs
+++ b/cmov/src/portable.rs
@@ -7,7 +7,14 @@
// TODO(tarcieri): more optimized implementation for small integers
use crate::{Cmov, CmovEq, Condition};
-use core::{hint::black_box, mem::size_of};
+use cor... | 3 | 14 | 23 |
27b9819a2ec3266c242bb4eeb00d7b12ff6bee10 | Tony Arcieri | 2025-12-28T05:14:47 | cmov: fix `aarch64` ASM bug; add regression test (#1299)
The implementation was using the wrong register type when invoking
`csel` for `u64` (`:w` which is 32-bit, should use `:x` for 64-bit)
This captures the bug in a regression test and fixes it. | diff --git a/cmov/src/aarch64.rs b/cmov/src/aarch64.rs
index 1a909f6..c4600b7 100644
--- a/cmov/src/aarch64.rs
+++ b/cmov/src/aarch64.rs
@@ -1,8 +1,9 @@
use crate::{Cmov, CmovEq, Condition};
use core::arch::asm;
+/// Conditional select
macro_rules! csel {
- ($csel:expr, $dst:expr, $src:expr, $condition:expr) =>... | 2 | 79 | 17 |
a164fcbc0d0c51fafec8e16fcc868aba3ca58d3a | Tony Arcieri | 2025-12-28T04:18:41 | cmov: add proptests (#1295)
Tests the implementation against random cases to ensure correctness | diff --git a/Cargo.lock b/Cargo.lock
index 221e6fa..c3d2ce2 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,6 +2,33 @@
# It is not intended for manual editing.
version = 4
+[[package]]
+name = "autocfg"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c08606f8c3cbf4ce... | 3 | 347 | 0 |
f0ad56b1c3f6ae2285d00205cbbd5378a9de487b | Tony Arcieri | 2025-12-28T01:41:20 | cmov: have test macro write modules (#1294)
Collapses the module structure by having the test macro declare the
module as well | diff --git a/cmov/tests/core_impls.rs b/cmov/tests/core_impls.rs
new file mode 100644
index 0000000..6a9b4fc
--- /dev/null
+++ b/cmov/tests/core_impls.rs
@@ -0,0 +1,161 @@
+/// Write the tests for an integer type, given two unequal integers
+macro_rules! int_tests {
+ ($int:ident, $a:expr, $b:expr) => {
+ mod... | 2 | 161 | 200 |
99d64725d9c364f8309c38d2aa48ced9c48b0e6c | Tony Arcieri | 2025-12-28T00:45:33 | cmov: expand tests (#1293)
Adds tests cases for 0 and `u*/i*::MAX` for all integer types | diff --git a/cmov/tests/lib.rs b/cmov/tests/lib.rs
index 7ea5446..2c6c71c 100644
--- a/cmov/tests/lib.rs
+++ b/cmov/tests/lib.rs
@@ -1,11 +1,11 @@
/// Write the tests for an integer type, given two unequal integers
macro_rules! int_tests {
- ($a:expr, $b:expr) => {
+ ($ty:path, $a:expr, $b:expr) => {
u... | 1 | 47 | 17 |
d6e4a87680fb3033b24b397bcd2abdb9d801a5ec | Tony Arcieri | 2025-12-27T20:47:05 | inout: require `block-padding` v0.4.2 (#1291)
The other versions are yanked, but nothing is forcing an upgrade if
people already have older versions in their Cargo.lock.
The problematic crates are ones like `cipher` that are using it
vicariously, so we need to pin it here to force an upgrade. | diff --git a/inout/Cargo.toml b/inout/Cargo.toml
index aa667fd..4b75067 100644
--- a/inout/Cargo.toml
+++ b/inout/Cargo.toml
@@ -14,7 +14,7 @@ description = "Custom reference types for code generic over in-place and buffer-
[dependencies]
hybrid-array = "0.4"
-block-padding = { version = "0.4", path = "../block-pad... | 1 | 1 | 1 |
6fda0b57c82975ce3316284e1efbb4bef4a4d754 | Tony Arcieri | 2025-12-27T19:57:00 | cmov: use macros to write tests (#1290)
Eliminates the redundant per-integer type boilerplate by using a macro
to write the tests instead | diff --git a/cmov/tests/lib.rs b/cmov/tests/lib.rs
index 4047e71..7ea5446 100644
--- a/cmov/tests/lib.rs
+++ b/cmov/tests/lib.rs
@@ -1,404 +1,134 @@
-// TODO(tarcieri): test other `i*` types
-mod i64 {
- use cmov::{Cmov, CmovEq};
+/// Write the tests for an integer type, given two unequal integers
+macro_rules! int_... | 1 | 88 | 358 |
b81a8cdb73741f553c6efada2d0b5dc0dd51467c | Tony Arcieri | 2025-12-27T15:34:20 | ctutils: rename `Choice::from_*_nonzero` => `from_*_nz` (#1287)
The other methods use 2-3 letter abbreviations, so this is both shorter
and more consistent.
It's also a breaking change, so bumps the version to v0.2.0-pre. | diff --git a/Cargo.lock b/Cargo.lock
index fd55e31..3fc951c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -78,7 +78,7 @@ dependencies = [
[[package]]
name = "ctutils"
-version = "0.1.4"
+version = "0.2.0-pre"
dependencies = [
"cmov",
"subtle",
diff --git a/ctutils/Cargo.toml b/ctutils/Cargo.toml
index d84dc25..a... | 3 | 21 | 21 |
1d2aff3d0c1a93ae8b817e246ca9d4a7006c8c47 | Tony Arcieri | 2025-12-27T15:26:25 | ctutils: add `CtNeg` trait (#1286)
For full feature parity with `subtle`, this adds a conditional negation
trait called `CtNeg`.
It uses a slightly different design from `subtle`, supporting both
in-place operation ala `subtle` with `ct_neg_assign`, while also
supporting `core::ops::Neg`-like usage with `ct_neg`.
Us... | diff --git a/ctutils/src/lib.rs b/ctutils/src/lib.rs
index ad29074..c8dabd8 100644
--- a/ctutils/src/lib.rs
+++ b/ctutils/src/lib.rs
@@ -81,4 +81,4 @@ mod traits;
pub use choice::Choice;
pub use ct_option::CtOption;
-pub use traits::{ct_eq::CtEq, ct_gt::CtGt, ct_lt::CtLt, ct_select::CtSelect};
+pub use traits::{ct_... | 3 | 61 | 1 |
170c956271c4ec52ce82334881fc4d3fdc02303b | Tony Arcieri | 2025-12-27T14:52:41 | ctutils: `Choice::from_u128*` constructors (#1285)
Gives `u128` feature parity with `u32` and `u64` for `Choice`
constructors by adding the following:
- `from_u128_eq`
- `from_u128_lt`
- `from_u128_nonzero`
This also cleans up the implementation by extracting some internal
macros (`bitle!`, `bitlt`!`, `bitnz!`) to w... | diff --git a/ctutils/src/choice.rs b/ctutils/src/choice.rs
index a7a7ebf..960618d 100644
--- a/ctutils/src/choice.rs
+++ b/ctutils/src/choice.rs
@@ -1,6 +1,31 @@
use crate::{CtEq, CtSelect};
use core::ops::{BitAnd, BitAndAssign, BitOr, BitOrAssign, BitXor, BitXorAssign, Not};
+/// Bitwise less-than-or equal: return... | 1 | 71 | 17 |
78e1cb33bddfdcf62f934d4cf28b67f86979a291 | Tony Arcieri | 2025-12-27T06:13:44 | ctutils: impl `CtEq`/`CtSelect` for `isize` (#1283)
Uses the same strategy as `usize` | diff --git a/ctutils/src/traits/ct_eq.rs b/ctutils/src/traits/ct_eq.rs
index cc765ab..d3d0e19 100644
--- a/ctutils/src/traits/ct_eq.rs
+++ b/ctutils/src/traits/ct_eq.rs
@@ -37,6 +37,19 @@ macro_rules! impl_ct_eq_with_cmov_eq {
impl_ct_eq_with_cmov_eq!(i8, i16, i32, i64, i128, u8, u16, u32, u64, u128);
+#[cfg(any(t... | 2 | 28 | 0 |
c6fe223f2e2928861922ea4d3beb0c7594349fe6 | Tony Arcieri | 2025-12-27T05:44:55 | ctutils: use signed `Cmov*` trait impls (#1282)
Uses the `Cmov`/`CmovEq` impls added to signed integers (e.g. `i8`,
`i16`) in #1280 to simplify the macros for writing impls of `CtEq` and
`CtSelect` which are backed by the afforementioned `Cmov*` traits.
This also allows all of the optimization work to happen in the `... | diff --git a/ctutils/Cargo.toml b/ctutils/Cargo.toml
index 2b2f686..628eee3 100644
--- a/ctutils/Cargo.toml
+++ b/ctutils/Cargo.toml
@@ -17,7 +17,7 @@ edition = "2024"
rust-version = "1.85"
[dependencies]
-cmov = "0.4"
+cmov = "0.4.2"
# optional dependencies
subtle = { version = "2", optional = true, default-fe... | 3 | 10 | 41 |
544cf113baa75ab14471b83a8bf33c572913c654 | Tony Arcieri | 2025-12-27T05:25:10 | cmov: signed integer support (#1280)
Adds impls of `Cmov`/`CmovEq` for `i8`, `i16`, `i32`, `i164`, and `i128` | diff --git a/cmov/src/lib.rs b/cmov/src/lib.rs
index 315c235..742ef44 100644
--- a/cmov/src/lib.rs
+++ b/cmov/src/lib.rs
@@ -135,6 +135,44 @@ impl CmovEq for u128 {
}
}
+// Impl `Cmov*` by first casting to unsigned then using the unsigned `Cmov` impls
+// TODO(tarcieri): use `cast_unsigned`/`cast_signed` to get... | 2 | 106 | 0 |
cbc4ecd76aa4da4304c53696571665456351b876 | Tony Arcieri | 2025-12-27T05:00:17 | ctutils: improve and expand rustdoc warnings (#1278)
Some of them weren't formatted properly and were rendering incorrectly. | diff --git a/ctutils/src/choice.rs b/ctutils/src/choice.rs
index ec895a7..a7a7ebf 100644
--- a/ctutils/src/choice.rs
+++ b/ctutils/src/choice.rs
@@ -66,6 +66,12 @@ impl Choice {
/// HACK: workaround to allow `const fn` boolean support on Rust 1.85.
///
/// This does not apply `black_box` to the output.
+... | 2 | 35 | 3 |
da71cbcc198b01b2fc8d0b00e8a51fb319caef0c | Tony Arcieri | 2025-12-27T03:43:14 | ctutils: add `u128` methods to `Choice` (#1277)
Adds the methods `crypto-bigint` needs for `WideWord` on 64-bit
platforms to `Choice`:
- `from_u128_le`
- `from_u128_lsb`
- `select_u128`
It would probably be good if `u128` had full parity with `u32` and
`u64`, but this just does what's needed for `crypto-bigint` for ... | diff --git a/ctutils/src/choice.rs b/ctutils/src/choice.rs
index 4f6b9f5..ec895a7 100644
--- a/ctutils/src/choice.rs
+++ b/ctutils/src/choice.rs
@@ -202,6 +202,20 @@ impl Choice {
Self::from_u64_lsb((value | value.wrapping_neg()) >> (u64::BITS - 1))
}
+ /// Returns the truthy value if `x <= y` and th... | 1 | 55 | 0 |
533ac35fb7dec96f935c2b060a0047a93d72e846 | Tony Arcieri | 2025-12-27T01:56:46 | ctutils: `CtOption` methods for `crypto-bigint` (#1274)
Adds the methods needed to replace `ConstCtOption` in `crypto-bigint`
with `ctutils::CtOption`:
- `some`
- `none`
- `into_option_copied`
- `and_choice`
- `as_inner_unchecked`
- `to_inner_unchecked`
Also adds a `Default` impl for `CtOption`.
Also adds `map!` an... | diff --git a/ctutils/src/ct_option.rs b/ctutils/src/ct_option.rs
index 08b383c..9b306e9 100644
--- a/ctutils/src/ct_option.rs
+++ b/ctutils/src/ct_option.rs
@@ -1,6 +1,36 @@
use crate::{Choice, CtEq, CtSelect};
use core::ops::{Deref, DerefMut};
+/// Helper macro for providing behavior like the [`CtOption::map`] com... | 1 | 166 | 2 |
845a5391e14fcfd0113d71056f42a24e6622477a | Tony Arcieri | 2025-12-26T18:46:03 | ctutils: additional `u64` constructors for `Choice` (#1272)
Ensures all the same constructors are available for both `u32` and
`u64`. This notably adds the following constructor methods to `Choice`:
- `from_u64_eq`
- `from_u64_le`
- `from_u64_lt` | diff --git a/ctutils/src/choice.rs b/ctutils/src/choice.rs
index bb9587d..4f6b9f5 100644
--- a/ctutils/src/choice.rs
+++ b/ctutils/src/choice.rs
@@ -20,7 +20,10 @@ impl Choice {
/// Equivalent of [`true`].
pub const TRUE: Self = Self(1);
- /// Create a new [`Choice`] from the given `u8` value, which shou... | 1 | 50 | 5 |
5ed71ac505f967bd7965368c2bba473b9b621d8d | Arthur Gautier | 2025-12-24T20:51:43 | zeroize: fixup rust 1.92 warnings (#1270)
`#[derive(ZeroizeOnDrop)]` was throwing warnings like:
warning: value assigned to `curve` is never read
--> src/crypto/ecdsa.rs:43:9
|
43 | curve: ECCCurve,
| ^^^^^
|
= help: maybe it is overwritten before being read?
= note: `#[warn(unused_as... | diff --git a/zeroize/tests/zeroize_derive.rs b/zeroize/tests/zeroize_derive.rs
index 87bc24e..2a2ab73 100644
--- a/zeroize/tests/zeroize_derive.rs
+++ b/zeroize/tests/zeroize_derive.rs
@@ -125,7 +125,6 @@ impl Drop for ZeroizeNoDropEnum {
#[test]
#[cfg(feature = "alloc")]
-#[allow(unused_assignments)]
fn derive_st... | 2 | 1 | 3 |
5d2e2fd107c46d0ed20d54e0014eb43176672f3d | Tony Arcieri | 2025-12-20T20:23:50 | ctutils: import `Choice` methods from `crypto-bigint` (#1266)
This imports all of the `const fn` constructor and predication/selection
methods `crypto-bigint` needs to replace `crypto_bigint::ConstChoice`
with `ctutils::Choice`, along with extant tests.
To make everything work, at least for now, a `word` feature has ... | diff --git a/ctutils/src/choice.rs b/ctutils/src/choice.rs
index 98dfac9..bb9587d 100644
--- a/ctutils/src/choice.rs
+++ b/ctutils/src/choice.rs
@@ -9,7 +9,8 @@ use core::ops::{BitAnd, BitAndAssign, BitOr, BitOrAssign, BitXor, BitXorAssign,
/// This is used as a "belt-and-suspenders" defense in addition to mechanisms ... | 2 | 259 | 3 |
14297e2ab2d717149f80730f9b52a31179ee449f | Tony Arcieri | 2025-12-20T02:56:15 | ctutils: add `CtGt` and `CtLt` (#1264)
Adds traits for computing greater than/less than in constant time.
Uses overflowing subtraction as the implementation strategy for unsigned
integers.
Also adds impls for `cmp::Ordering`. | diff --git a/ctutils/src/lib.rs b/ctutils/src/lib.rs
index bec5546..449f8e1 100644
--- a/ctutils/src/lib.rs
+++ b/ctutils/src/lib.rs
@@ -70,4 +70,4 @@ mod traits;
pub use choice::Choice;
pub use ct_option::CtOption;
-pub use traits::{ct_eq::CtEq, ct_select::CtSelect};
+pub use traits::{ct_eq::CtEq, ct_gt::CtGt, ct_... | 4 | 117 | 1 |
5f0b306ff0d40bd256ddf2a1493e6437d968c13b | Artyom Pavlov | 2025-12-20T01:46:40 | ctutils: fix `clippy::bool_assert_comparison` (#1260) | diff --git a/ctutils/src/choice.rs b/ctutils/src/choice.rs
index 6163c69..8591da8 100644
--- a/ctutils/src/choice.rs
+++ b/ctutils/src/choice.rs
@@ -198,8 +198,8 @@ mod tests {
#[test]
fn to_bool() {
- assert_eq!(Choice::new(0).to_bool(), false);
- assert_eq!(Choice::new(1).to_bool(), true);
+... | 1 | 2 | 2 |
3a9a3ac9da631c29ca2962c41302df09df5f644c | Artyom Pavlov | 2025-12-20T01:29:10 | zeroize: replace `atomic_fence` with `optimization_barrier` (#1252) | diff --git a/zeroize/src/aarch64.rs b/zeroize/src/aarch64.rs
index 317db34..68c5998 100644
--- a/zeroize/src/aarch64.rs
+++ b/zeroize/src/aarch64.rs
@@ -1,6 +1,6 @@
//! [`Zeroize`] impls for ARM64 SIMD registers.
-use crate::{Zeroize, atomic_fence, volatile_write};
+use crate::{Zeroize, optimization_barrier, volatil... | 4 | 105 | 20 |
e24cfe804ad52753e6a0aa459f0f573fe9103589 | Tony Arcieri | 2025-12-17T23:00:12 | cmov: use `black_box` in portable impl (#1255)
The core predication function of the portable implementation is called
`is_non_zero` and it returns a 1-bit mask value which is subsequently
used to "select" between two values using bitwise masking.
In some previous real-world cases in the Rust compiler, it has been abl... | diff --git a/cmov/src/portable.rs b/cmov/src/portable.rs
index c7a0c44..0a6259f 100644
--- a/cmov/src/portable.rs
+++ b/cmov/src/portable.rs
@@ -7,7 +7,7 @@
// TODO(tarcieri): more optimized implementation for small integers
use crate::{Cmov, CmovEq, Condition};
-use core::mem::size_of;
+use core::{hint::black_box,... | 1 | 2 | 2 |
3f2d622dc07c69d3115210f740795fa72bcbbf8b | Scott Sanderson | 2025-12-16T00:59:27 | zeroizing: add `repr(transparent)` to `Zeroizing` (#1253)
This commit adds a repr(transparent) annotation to zeroize::Zeroizing,
allowing it to be used safely for FFI in more contexts. See
https://github.com/RustCrypto/utils/issues/1249 for more details. | diff --git a/zeroize/src/lib.rs b/zeroize/src/lib.rs
index 2c12516..fc8a1b8 100644
--- a/zeroize/src/lib.rs
+++ b/zeroize/src/lib.rs
@@ -619,7 +619,11 @@ impl Zeroize for CString {
/// `Zeroizing` is a wrapper for any `Z: Zeroize` type which implements a
/// `Drop` handler which zeroizes dropped values.
+///
+/// Z... | 1 | 4 | 0 |
e38a015ac144f1dcdfdc71a7103490f0c897a67f | Artyom Pavlov | 2025-12-15T13:50:05 | zeroize: allow `unused_assignments` for some tests (#1251) | diff --git a/zeroize/tests/zeroize_derive.rs b/zeroize/tests/zeroize_derive.rs
index 8cc9e29..87bc24e 100644
--- a/zeroize/tests/zeroize_derive.rs
+++ b/zeroize/tests/zeroize_derive.rs
@@ -125,6 +125,7 @@ impl Drop for ZeroizeNoDropEnum {
#[test]
#[cfg(feature = "alloc")]
+#[allow(unused_assignments)]
fn derive_st... | 1 | 6 | 2 |
c9f7bfeaf8c94fa5535a81a5e23ee5dc405e47c6 | Artyom Pavlov | 2025-10-06T11:59:06 | block-buffer: fix typo (#1234) | diff --git a/block-buffer/src/read.rs b/block-buffer/src/read.rs
index f8d66ba..bf042af 100644
--- a/block-buffer/src/read.rs
+++ b/block-buffer/src/read.rs
@@ -4,7 +4,7 @@ use core::fmt;
/// Buffer for reading block-generated data.
pub struct ReadBuffer<BS: ArraySize> {
/// The first byte of the block is used a... | 1 | 1 | 1 |
64c135a22e0d19eb758dbac63cd1718fd316db61 | Артём Павлов [Artyom Pavlov] | 2025-09-30T11:53:12 | Update Cargo.lock | diff --git a/Cargo.lock b/Cargo.lock
index f45b997..f08efed 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -12,7 +12,7 @@ version = "0.11.0-rc.5"
dependencies = [
"hex-literal 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"hybrid-array",
- "zeroize 1.8.1",
+ "zeroize 1.8.2",
]
[[package]]
@@ -12... | 1 | 13 | 13 |
faf252cadfc297863100aebb8033229bbc689e87 | Tony Arcieri | 2025-09-29T20:09:40 | Switch from `doc_auto_cfg` to `doc_cfg` (#1228)
`doc_auto_cfg` was recently removed from rustc. See
RustCrypto/traits#2028.
`doc_cfg` is also now automatic. | diff --git a/blobby/src/lib.rs b/blobby/src/lib.rs
index 2457e35..e17f4cd 100644
--- a/blobby/src/lib.rs
+++ b/blobby/src/lib.rs
@@ -4,7 +4,7 @@
html_logo_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg",
html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e3... | 4 | 4 | 4 |
4da176e71d9af0ef898c42e91d99fc1844ced4f2 | Artyom Pavlov | 2025-09-23T22:53:57 | block-padding: remove unsafe code (#1222) | diff --git a/Cargo.lock b/Cargo.lock
index de38a73..97bdeaf 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -8,34 +8,34 @@ version = "0.4.0-pre.1"
[[package]]
name = "block-buffer"
-version = "0.11.0-rc.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a229bfd78e4827c91b9b95784f69492c1b7... | 3 | 57 | 57 |
7d8fcb971f7e7f8b1a897f32049800bbde0a0d1a | Artyom Pavlov | 2025-09-21T07:19:55 | block-buffer: improve `split_blocks` implementations (#1220)
This PR simplifies implementations and removes `unsafe` by leveraging
`Array::slice_as_chunks`. The resulting code is still panic-free, as can
be seen here: https://rust.godbolt.org/z/43xMT3ExP | diff --git a/block-buffer/src/sealed.rs b/block-buffer/src/sealed.rs
index 2be181d..1a03ef8 100644
--- a/block-buffer/src/sealed.rs
+++ b/block-buffer/src/sealed.rs
@@ -1,7 +1,7 @@
use hybrid_array::sizes::{U0, U1};
use super::{Array, ArraySize};
-use core::{mem::MaybeUninit, ptr, slice};
+use core::{mem::MaybeUnin... | 1 | 7 | 30 |
16c3b91460c6ea91f83f7bdb46654ca70f4e24ac | Roman | 2025-09-20T17:34:02 | wycheproof2blb: fix blobby import (#1219) | diff --git a/wycheproof2blb/Cargo.toml b/wycheproof2blb/Cargo.toml
index 52f8855..2c7aa59 100644
--- a/wycheproof2blb/Cargo.toml
+++ b/wycheproof2blb/Cargo.toml
@@ -11,7 +11,7 @@ edition = "2024"
rust-version = "1.85"
[dependencies]
-blobby = { version = "0.4.0-pre", path = "../blobby" }
+blobby = { version = "0.4.... | 1 | 1 | 1 |
02d8f15d7fddfbec65052d8c5a701443267d6f16 | Arthur Gautier | 2025-09-20T00:31:27 | Release blobby v0.4.0-pre.1 (#1216) | diff --git a/Cargo.lock b/Cargo.lock
index c95317c..de38a73 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4,7 +4,7 @@ version = 4
[[package]]
name = "blobby"
-version = "0.4.0-pre.0"
+version = "0.4.0-pre.1"
[[package]]
name = "block-buffer"
diff --git a/blobby/Cargo.toml b/blobby/Cargo.toml
index 1a612c4..1c60c... | 2 | 2 | 2 |
88f6e69ff08a866670d3bd47111929802a3ba365 | Tony Arcieri | 2025-09-02T18:31:39 | Cut prereleases with `hybrid-array` v0.4 support (#1210)
Releases the following:
- `block-buffer` v0.11.0-rc.5
- `block-padding` v0.4.0-rc.4
- `inout` v0.2.0-rc.6 | diff --git a/Cargo.lock b/Cargo.lock
index 22ffb04..6ec5ea5 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -9,24 +9,24 @@ version = "0.4.0-pre.0"
[[package]]
name = "block-buffer"
version = "0.11.0-rc.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a229bfd78e4827c91b9b95784f69492c1b77c... | 4 | 14 | 14 |
adfccfea2686ef191b607f653cc3587753b6ec66 | Tony Arcieri | 2025-09-01T19:51:49 | Bump `hybrid-array` to v0.4 (#1208)
NOTE: when cutting releases the `inout` dependency on `block-padding`
should also be bumped | diff --git a/Cargo.lock b/Cargo.lock
index 8103283..22ffb04 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -11,7 +11,7 @@ name = "block-buffer"
version = "0.11.0-rc.4"
dependencies = [
"hex-literal 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "hybrid-array",
+ "hybrid-array 0.4.0",
"zeroize 1.8.... | 5 | 21 | 12 |
87b916e116116d67c9d59c63eced48a46e1b2d77 | 1c7718e7 | 2025-08-21T11:37:52 | cpufeatures: use cfg() to detect aarch64 android instead of [target.aarch64-linux-android] (#1204) | diff --git a/cpufeatures/Cargo.toml b/cpufeatures/Cargo.toml
index dd23c64..b3603d0 100644
--- a/cpufeatures/Cargo.toml
+++ b/cpufeatures/Cargo.toml
@@ -24,5 +24,5 @@ libc = { version = "0.2.155", default-features = false }
[target.'cfg(all(target_arch = "loongarch64", target_os = "linux"))'.dependencies]
libc = { ve... | 1 | 1 | 1 |
0e7e6e662608a3a862a4beb930b8ffedbea6563d | Artyom Pavlov | 2025-08-06T14:55:21 | zeroize: add `proxy_alloc_test` (#1199)
The added test checks that zeroization happens using a custom global
allocator. Replacing `self.0.as_mut().zeroize()` with
`self.0 = Default::default()` results in test failure as expected.
The test also passes Miri without issues. | diff --git a/zeroize/tests/alloc.rs b/zeroize/tests/alloc.rs
new file mode 100644
index 0000000..677a914
--- /dev/null
+++ b/zeroize/tests/alloc.rs
@@ -0,0 +1,50 @@
+use std::alloc::{GlobalAlloc, Layout, System};
+
+use zeroize::Zeroize;
+
+// Allocator that ensures that deallocated data is zeroized.
+struct ProxyAlloc... | 1 | 50 | 0 |
6fd0e8ddc827d7e7d9242e130f8944fc9ca328cf | Arthur Gautier | 2025-07-25T16:38:05 | block-buffer: impl `ZeroizeOnDrop` for `BlockBuffer` (#1192)
This is required for implementing `ZeroizeOnDrop` on consumer crates.
For example: https://github.com/RustCrypto/traits/pull/1940 | diff --git a/block-buffer/src/lib.rs b/block-buffer/src/lib.rs
index 11a227c..851aea5 100644
--- a/block-buffer/src/lib.rs
+++ b/block-buffer/src/lib.rs
@@ -49,7 +49,7 @@ use array::{
use core::{fmt, mem::MaybeUninit, ops::Add, ptr, slice};
#[cfg(feature = "zeroize")]
-use zeroize::Zeroize;
+use zeroize::{Zeroize, ... | 1 | 12 | 1 |
7b735d793f8f9335f3f1aff2d58293fdc765446b | Tony Arcieri | 2025-07-07T13:17:15 | zeroize: bump `zeroize_derive` dep to v1.4 (#1190)
This is useful for `-Z minimal-versions` to ensure derived code builds
without warnings on recent Rust versions, which complain about the
earlier custom derive:
```
error: non-local `impl` definition, `impl` blocks should be written at the same level as their item
``... | diff --git a/zeroize/Cargo.toml b/zeroize/Cargo.toml
index 16db9cd..08e2727 100644
--- a/zeroize/Cargo.toml
+++ b/zeroize/Cargo.toml
@@ -20,7 +20,7 @@ rust-version = "1.85"
[dependencies]
serde = { version = "1.0", default-features = false, optional = true }
-zeroize_derive = { version = "1.3", path = "../zeroize_d... | 1 | 1 | 1 |
34c554f13500dd11566922048d6e865787d6fa51 | Artyom Pavlov | 2025-06-23T13:01:09 | Fix `clippy::uninlined_format_args` (#1186) | diff --git a/fiat-constify/src/main.rs b/fiat-constify/src/main.rs
index 7434ca4..cf44706 100644
--- a/fiat-constify/src/main.rs
+++ b/fiat-constify/src/main.rs
@@ -73,7 +73,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
fn get_ident_from_pat(pat: &Pat) -> Ident {
match pat {
Pat::Ident(pat_i... | 4 | 8 | 8 |
a5b54bb6477ef96fd693beae9c232e9c6ba0e0a5 | Tony Arcieri | 2025-05-29T22:09:18 | inout v0.2.0-rc.5 (#1185) | diff --git a/Cargo.lock b/Cargo.lock
index 409e258..295f45f 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -140,7 +140,7 @@ dependencies = [
[[package]]
name = "inout"
-version = "0.2.0-rc.4"
+version = "0.2.0-rc.5"
dependencies = [
"block-padding",
"hybrid-array",
diff --git a/inout/Cargo.toml b/inout/Cargo.toml... | 2 | 2 | 2 |
dcc1f2d852443763e97171780cce058435bab182 | Tony Arcieri | 2025-05-29T22:09:08 | fiat-constify v0.1.0 (#1184)
Also adds `publish = "false"` as this tool is not intended for release
(ideally we can eventually get rid of it), but the version bump denotes
a major notable change to the codegen | diff --git a/Cargo.lock b/Cargo.lock
index 7421323..409e258 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -105,7 +105,7 @@ dependencies = [
[[package]]
name = "fiat-constify"
-version = "0.0.0"
+version = "0.1.0"
dependencies = [
"prettyplease",
"proc-macro2",
diff --git a/fiat-constify/Cargo.toml b/fiat-constif... | 2 | 3 | 2 |
23651dd48f50daca31ec77486dd34f232219ce90 | Artyom Pavlov | 2025-05-29T10:17:22 | blobby: fix `clippy::uninlined_format_args` (#1183) | diff --git a/blobby/src/bin/decode.rs b/blobby/src/bin/decode.rs
index 4e6d9c9..ff4bebb 100644
--- a/blobby/src/bin/decode.rs
+++ b/blobby/src/bin/decode.rs
@@ -18,7 +18,7 @@ fn decode<R: BufRead, W: Write>(mut reader: R, mut writer: W) -> io::Result<usiz
.map_err(|e| {
io::Error::new(
... | 2 | 3 | 3 |
45d4e5ceb8c88e16cc4d4f9346750e5c3720e273 | Tony Arcieri | 2025-04-30T04:39:45 | fiat-constify: add support for leveraging `const_mut_refs` (#1177)
The generated code is *almost* `const fn` friendly with `const_mut_refs`
but needs `const fn` accessors for the newtypes it defines:
https://github.com/mit-plv/fiat-crypto/issues/1955
This updates `fiat-constify` to solve only adding such accessors a... | diff --git a/fiat-constify/src/main.rs b/fiat-constify/src/main.rs
index c354a43..7434ca4 100644
--- a/fiat-constify/src/main.rs
+++ b/fiat-constify/src/main.rs
@@ -5,19 +5,12 @@
#![allow(clippy::single_match, clippy::new_without_default)]
-mod outputs;
mod type_registry;
-use outputs::Outputs;
use proc_macro2... | 3 | 22 | 284 |
f5834a783fc10f7747956bb0e432f03c011110eb | Artyom Pavlov | 2025-04-15T06:50:08 | inout: use `core::ptr::eq` (#1175)
Fixes the `clippy::ptr_eq` lint. | diff --git a/inout/src/inout.rs b/inout/src/inout.rs
index 53be1ec..f770921 100644
--- a/inout/src/inout.rs
+++ b/inout/src/inout.rs
@@ -43,7 +43,7 @@ impl<'inp, 'out, T> InOut<'inp, 'out, T> {
where
T: Copy,
{
- if self.in_ptr != self.out_ptr {
+ if !core::ptr::eq(self.in_ptr, self.out... | 2 | 2 | 2 |
845657e5521258d963bceb7f16790e6845969a17 | Artyom Pavlov | 2025-04-08T01:50:54 | zeroize: remove explicit passing of the docsrs configuration flag (#1174)
The flag is passed automatically by docs.rs. | diff --git a/zeroize/Cargo.toml b/zeroize/Cargo.toml
index 38e5160..16db9cd 100644
--- a/zeroize/Cargo.toml
+++ b/zeroize/Cargo.toml
@@ -33,4 +33,3 @@ simd = [] # NOTE: MSRV 1.72
[package.metadata.docs.rs]
all-features = true
-rustdoc-args = ["--cfg", "docsrs"] | 1 | 0 | 1 |
7560ec86787c1342147a8d8ac61a80f5363589a3 | Arthur Gautier | 2025-03-31T16:26:05 | inout: add `From` impl for splitting `[T; N * M]` into `[[T; N]; M]` (#1170) | diff --git a/inout/src/inout.rs b/inout/src/inout.rs
index 6d0a05f..53be1ec 100644
--- a/inout/src/inout.rs
+++ b/inout/src/inout.rs
@@ -1,6 +1,6 @@
use crate::InOutBuf;
-use core::{marker::PhantomData, ptr};
-use hybrid_array::{Array, ArraySize};
+use core::{marker::PhantomData, ops::Mul, ptr};
+use hybrid_array::{Ar... | 2 | 58 | 2 |
c7e655547725330b66c0045f1e9a07455b4e13a9 | Arthur Gautier | 2025-03-31T16:12:15 | inout: fixup clippy 1.85 warnings (#1171)
When clippy runs without `block-padding`, it will throw warnings:
```
warning: the following explicit lifetimes could be elided: 'inp, 'out
--> inout/src/reserved.rs:152:6
|
152 | impl<'inp, 'out> InOutBufReserved<'inp, 'out, u8> {
| ^^^^ ^^^^ ... | diff --git a/inout/src/reserved.rs b/inout/src/reserved.rs
index a52a64c..abc0c09 100644
--- a/inout/src/reserved.rs
+++ b/inout/src/reserved.rs
@@ -149,9 +149,9 @@ impl<'inp, 'out, T> InOutBufReserved<'inp, 'out, T> {
}
}
+#[cfg(feature = "block-padding")]
impl<'inp, 'out> InOutBufReserved<'inp, 'out, u8> {
... | 1 | 1 | 1 |
91609747fdae4499c5e111fc1cf637a07a298cf6 | Artyom Pavlov | 2025-02-24T15:38:06 | inout: fix `needless_lifetimes` lint (#1167) | diff --git a/inout/src/inout.rs b/inout/src/inout.rs
index ae6b688..20f5471 100644
--- a/inout/src/inout.rs
+++ b/inout/src/inout.rs
@@ -13,7 +13,7 @@ pub struct InOut<'inp, 'out, T> {
impl<'inp, 'out, T> InOut<'inp, 'out, T> {
/// Reborrow `self`.
#[inline(always)]
- pub fn reborrow<'a>(&'a mut self) -> ... | 4 | 18 | 19 |
f2dc12780cda9ca917379a1d8fae0fcf52e35930 | Artyom Pavlov | 2025-02-24T14:53:23 | cpufeatures: remove `#[inline(never)]` workaround for CPUID intrinsics (#1166)
The workaround is no longer needed since we have bumped MSRV to 1.85. | diff --git a/cpufeatures/src/x86.rs b/cpufeatures/src/x86.rs
index 031dcae..b26ef9b 100644
--- a/cpufeatures/src/x86.rs
+++ b/cpufeatures/src/x86.rs
@@ -38,17 +38,10 @@ macro_rules! __detect_target_features {
#[cfg(target_arch = "x86_64")]
use core::arch::x86_64::{__cpuid, __cpuid_count, CpuidResult};... | 1 | 0 | 7 |
ee8db1ad037114df9c2b7855376b9b9af7aeb27b | Artyom Pavlov | 2025-02-24T14:08:25 | Remove `#![warn(rust_2018_idioms)]` (#1164) | diff --git a/aarch64-dit/src/lib.rs b/aarch64-dit/src/lib.rs
index 1a4354a..32f4742 100644
--- a/aarch64-dit/src/lib.rs
+++ b/aarch64-dit/src/lib.rs
@@ -4,7 +4,7 @@
html_logo_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo.svg",
html_favicon_url = "https://raw.githubusercontent.com/RustCr... | 7 | 7 | 7 |
aa1b27f3e157d128e9f9e702fc83173553519b6c | Artyom Pavlov | 2025-02-23T06:25:56 | dbl: release v0.4.0-rc.2 (#1162) | diff --git a/Cargo.lock b/Cargo.lock
index 3305846..0002ce0 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -42,7 +42,7 @@ dependencies = [
[[package]]
name = "dbl"
-version = "0.4.0-rc.1"
+version = "0.4.0-rc.2"
dependencies = [
"hybrid-array",
]
@@ -98,9 +98,9 @@ checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0... | 2 | 4 | 4 |
eb0672a516e7db296a878c7cf268db932b31aa4b | Artyom Pavlov | 2025-02-22T16:28:30 | Temporary remove `resolver.incompatible-rust-versions` (#1161) | diff --git a/Cargo.toml b/Cargo.toml
index 626ef91..bf7cf59 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -18,8 +18,5 @@ members = [
]
exclude = ["aarch64-dit"]
-[resolver]
-incompatible-rust-versions = "allow"
-
[profile.dev]
opt-level = 2 | 1 | 0 | 3 |
a82505a43c0564fbdc8209959df981c24ac868f8 | Artyom Pavlov | 2025-02-22T16:17:44 | inout: release v0.2.0-rc.4 (#1160) | diff --git a/Cargo.lock b/Cargo.lock
index a21853a..3305846 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -84,7 +84,7 @@ dependencies = [
[[package]]
name = "inout"
-version = "0.2.0-rc.3"
+version = "0.2.0-rc.4"
dependencies = [
"block-padding",
"hybrid-array",
diff --git a/inout/Cargo.toml b/inout/Cargo.toml
i... | 2 | 3 | 3 |
1f62901fa5fb2677040fe358688e04b6b2975bf0 | Artyom Pavlov | 2025-02-22T16:12:30 | block-padding: release v0.4.0-rc.3 (#1159) | diff --git a/Cargo.lock b/Cargo.lock
index eacc167..a21853a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -20,7 +20,7 @@ dependencies = [
[[package]]
name = "block-padding"
-version = "0.4.0-rc.2"
+version = "0.4.0-rc.3"
dependencies = [
"hybrid-array",
]
diff --git a/block-padding/Cargo.toml b/block-padding/Carg... | 2 | 2 | 2 |
2a273f5d783fbf0da7aceb62d39ce27dfd56a003 | Artyom Pavlov | 2025-02-22T16:06:07 | block-buffer: release v0.11.0-rc.4 (#1158) | diff --git a/Cargo.lock b/Cargo.lock
index 18ce919..eacc167 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -11,7 +11,7 @@ dependencies = [
[[package]]
name = "block-buffer"
-version = "0.11.0-rc.3"
+version = "0.11.0-rc.4"
dependencies = [
"hex-literal 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",... | 2 | 2 | 2 |
b698625c9384a4d104b36360a13fc41b7212a33e | Artyom Pavlov | 2025-02-22T16:00:53 | blobby: release v0.4.0-pre.0 (#1157) | diff --git a/Cargo.lock b/Cargo.lock
index f27d8ff..18ce919 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4,7 +4,7 @@ version = 4
[[package]]
name = "blobby"
-version = "0.4.0-pre"
+version = "0.4.0-pre.0"
dependencies = [
"hex",
]
diff --git a/blobby/Cargo.toml b/blobby/Cargo.toml
index b7771e9..1da6b0d 100644
... | 2 | 2 | 2 |
179070d5f9a4fec3c460a8877b389cb185e2e0f1 | Artyom Pavlov | 2025-02-22T15:39:34 | block-buffer: use hex-literal v1 (#1155) | diff --git a/Cargo.lock b/Cargo.lock
index e65b0d5..f27d8ff 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -13,7 +13,7 @@ dependencies = [
name = "block-buffer"
version = "0.11.0-rc.3"
dependencies = [
- "hex-literal 0.4.1",
+ "hex-literal 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"hybrid-array"... | 2 | 5 | 5 |
9521e7aec8726302b852f94877705d99899ba016 | Artyom Pavlov | 2025-02-22T15:03:12 | hex-literal: use `const` block to force const promotion (#1153)
Also includes minor code tweaks. | diff --git a/hex-literal/src/lib.rs b/hex-literal/src/lib.rs
index f6c8fac..c5cee9e 100644
--- a/hex-literal/src/lib.rs
+++ b/hex-literal/src/lib.rs
@@ -1,5 +1,5 @@
-#![doc = include_str!("../README.md")]
#![no_std]
+#![doc = include_str!("../README.md")]
#![doc(
html_logo_url = "https://raw.githubusercontent.co... | 1 | 13 | 13 |
a984ec98edbf387aaded73b075b9b692b5b98880 | Artyom Pavlov | 2025-02-04T19:31:55 | inout: fix `InOutBufReserved::get_out_len` (#1147) | diff --git a/inout/src/reserved.rs b/inout/src/reserved.rs
index 05ecf58..ee1be93 100644
--- a/inout/src/reserved.rs
+++ b/inout/src/reserved.rs
@@ -91,7 +91,7 @@ impl<T> InOutBufReserved<'_, '_, T> {
/// Get output buffer length.
#[inline(always)]
pub fn get_out_len(&self) -> usize {
- self.in_le... | 1 | 1 | 1 |
ca3d1c2e8db9bc10e36ac991a31183ced4590a28 | Tony Arcieri | 2025-01-24T21:13:01 | cpufeatures: don't link `std` when linking `libc` (#1142)
On AArch64, we link the `libc` crate to provide access to system call
wrappers which can query available CPU features from the kernel, since
those calls are protected on that CPU architecture.
We don't need `std` though, and it seems we're inadvertently linkin... | diff --git a/cpufeatures/Cargo.toml b/cpufeatures/Cargo.toml
index be64e4d..93e8b8e 100644
--- a/cpufeatures/Cargo.toml
+++ b/cpufeatures/Cargo.toml
@@ -15,13 +15,13 @@ edition = "2018"
readme = "README.md"
[target.'cfg(all(target_arch = "aarch64", target_vendor = "apple"))'.dependencies]
-libc = "0.2.155"
+libc = ... | 1 | 4 | 4 |
151702184e3b7ad31260ab1e331faa8311410532 | Asger Hautop Drewsen | 2024-11-23T23:51:32 | opaque-debug: fix typo in example code (#1139) | diff --git a/opaque-debug/src/lib.rs b/opaque-debug/src/lib.rs
index 9e63634..854ad52 100644
--- a/opaque-debug/src/lib.rs
+++ b/opaque-debug/src/lib.rs
@@ -22,14 +22,14 @@
//!
//! The macro also support generic paramters:
//! ```
-//! pub struct GenricCryptoStuff<K> {
+//! pub struct GenericCryptoStuff<K> {
//! ... | 1 | 4 | 4 |
e74e578f629bc1fda8a40394632bf7ecbddb18b2 | Artyom Pavlov | 2024-11-20T18:07:45 | inout: release v0.2.0-rc.3 (#1135) | diff --git a/Cargo.lock b/Cargo.lock
index 0e1b0e1..342d58a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -84,7 +84,7 @@ dependencies = [
[[package]]
name = "inout"
-version = "0.2.0-rc.2"
+version = "0.2.0-rc.3"
dependencies = [
"block-padding",
"hybrid-array",
diff --git a/inout/Cargo.toml b/inout/Cargo.toml
i... | 2 | 2 | 2 |
ca826616ac6e18010e1ef8cdc481623278d726e4 | Artyom Pavlov | 2024-11-20T17:44:45 | aarch64-dit: commit Cargo.lock (#1134)
Without committed Cargo.lock CI fails for this crate because `libc`
v0.2.164 and later require Rust 1.63, while MSRV for `aarch64-dit` is
set to 1.61. | diff --git a/aarch64-dit/Cargo.lock b/aarch64-dit/Cargo.lock
new file mode 100644
index 0000000..dc5f0e0
--- /dev/null
+++ b/aarch64-dit/Cargo.lock
@@ -0,0 +1,23 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "aarch64-dit"
+version = "... | 1 | 23 | 0 |
ae570cd1e3ffeaaa5d58d65ce42525deac5f1bc3 | Artyom Pavlov | 2024-11-11T16:50:49 | Exclude `aarch64-dit` from root workspace (#1131)
Compiling the crate on non-AArch64 targets results in a compilation
error, so having it in workspace can be problematic on other target
arches. | diff --git a/Cargo.lock b/Cargo.lock
index 92d4215..7e79a73 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,13 +2,6 @@
# It is not intended for manual editing.
version = 3
-[[package]]
-name = "aarch64-dit"
-version = "0.1.0"
-dependencies = [
- "cpufeatures",
-]
-
[[package]]
name = "blobby"
version = "0.3.1"
di... | 2 | 1 | 8 |
b6fcf7506463354c80ee82b02c37c757c20797ef | Tony Arcieri | 2024-10-21T18:32:11 | Cut new release candidates (#1127)
Cuts new `-rc.*` releases of the following:
- `block-buffer` v0.11.0-rc.3
- `block-padding` v0.4.0-rc.2
- `dbl` v0.4.0-rc.1
- `inout` v0.2.0-rc.2
These all depend on `hybrid-array` v0.2 (final) | diff --git a/Cargo.lock b/Cargo.lock
index 6b12f16..92d4215 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -18,7 +18,7 @@ dependencies = [
[[package]]
name = "block-buffer"
-version = "0.11.0-rc.2"
+version = "0.11.0-rc.3"
dependencies = [
"hex-literal 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",... | 5 | 9 | 9 |
e734b0ef333341a8924c65972087f7907a10d5d7 | Tony Arcieri | 2024-10-20T18:59:51 | Bump `hybrid-array` to v0.2 (final) (#1125) | diff --git a/Cargo.lock b/Cargo.lock
index a6a65ad..6b12f16 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -82,9 +82,9 @@ checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46"
[[package]]
name = "hybrid-array"
-version = "0.2.0-rc.11"
+version = "0.2.1"
source = "registry+https://github.com/ru... | 5 | 6 | 6 |
66221b660553cbad52398f062df94858c24a7866 | Tony Arcieri | 2024-09-28T22:01:02 | inout: re-add `package.metadata.docs.rs` to Cargo.toml (#1122)
We need to instruct it to build with the `block-padding` feature to
ensure that's properly documented.
This commit re-adds `all-features = true` | diff --git a/inout/Cargo.toml b/inout/Cargo.toml
index d0f93d2..6bd0367 100644
--- a/inout/Cargo.toml
+++ b/inout/Cargo.toml
@@ -14,3 +14,6 @@ readme = "README.md"
[dependencies]
block-padding = { version = "0.4.0-rc.1", path = "../block-padding", optional = true }
hybrid-array = "0.2.0-rc.10"
+
+[package.metadata.d... | 1 | 3 | 0 |
cc0545698ca8025eb2cd956a188d6086f312c152 | Tony Arcieri | 2024-09-28T18:59:36 | inout v0.2.0-rc.1 (#1121) | diff --git a/Cargo.lock b/Cargo.lock
index 32ea777..a5b8e72 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -91,7 +91,7 @@ dependencies = [
[[package]]
name = "inout"
-version = "0.2.0-rc.0"
+version = "0.2.0-rc.1"
dependencies = [
"block-padding",
"hybrid-array",
diff --git a/inout/Cargo.toml b/inout/Cargo.toml
i... | 2 | 2 | 2 |
492eebdd0784b8fab433a77c42367da1f86bbc47 | Tony Arcieri | 2024-09-28T18:53:02 | block-padding v0.4.0-rc.1 (#1120) | diff --git a/Cargo.lock b/Cargo.lock
index 549b7a2..32ea777 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -27,7 +27,7 @@ dependencies = [
[[package]]
name = "block-padding"
-version = "0.4.0-rc.0"
+version = "0.4.0-rc.1"
dependencies = [
"hybrid-array",
]
diff --git a/block-padding/Cargo.toml b/block-padding/Carg... | 3 | 3 | 3 |
8efe87314d966b73a8ef78dc02ef80d707ba5fc8 | Tony Arcieri | 2024-09-28T18:44:24 | block-buffer v0.11.0-rc.2 (#1119) | diff --git a/Cargo.lock b/Cargo.lock
index 277babe..549b7a2 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -18,7 +18,7 @@ dependencies = [
[[package]]
name = "block-buffer"
-version = "0.11.0-rc.1"
+version = "0.11.0-rc.2"
dependencies = [
"hex-literal 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",... | 2 | 2 | 2 |
3f94c9cf5ae0156f5347b632320f1b3778438695 | Tony Arcieri | 2024-09-28T18:35:58 | inout: use `doc_auto_cfg` (#1118)
Removes manual rustdoc feature annotations and performs them
automatically | diff --git a/inout/src/errors.rs b/inout/src/errors.rs
index ecbf265..090e95e 100644
--- a/inout/src/errors.rs
+++ b/inout/src/errors.rs
@@ -27,7 +27,6 @@ impl core::error::Error for NotEqualError {}
/// Padding error. Usually emitted when size of output buffer is insufficient.
#[cfg(feature = "block-padding")]
-#[... | 3 | 1 | 5 |
ab0c8026d82ff8a78bcbf68dd3fdc8df31783b32 | Tony Arcieri | 2024-09-28T18:20:38 | block-padding+inout: remove `std` feature (#1117)
Leverages the `error_in_core` feature stabilized in Rust 1.81 to allow
`Error` trait impls in `no_std` contexts.
This was the only dependency on `std`, so this also removes the `std`
feature, which is no longer necessary. | diff --git a/block-padding/Cargo.toml b/block-padding/Cargo.toml
index 20afeea..8684e05 100644
--- a/block-padding/Cargo.toml
+++ b/block-padding/Cargo.toml
@@ -14,10 +14,3 @@ readme = "README.md"
[dependencies]
hybrid-array = "0.2.0-rc.10"
-
-[features]
-std = []
-
-[package.metadata.docs.rs]
-all-features = true
... | 5 | 5 | 36 |
aa12a34823d8017154466883d479274130ad1f69 | Tony Arcieri | 2024-09-06T13:37:11 | aarch64-dit: have `set_dit_enabled` return previous state (#1109)
This is more inlining-friendly | diff --git a/aarch64-dit/src/lib.rs b/aarch64-dit/src/lib.rs
index 8b5a4b6..0eef23b 100644
--- a/aarch64-dit/src/lib.rs
+++ b/aarch64-dit/src/lib.rs
@@ -44,9 +44,7 @@ impl Dit {
#[must_use]
pub fn enable(&self) -> Guard<'_> {
let was_enabled = if self.is_supported() {
- let was_enabled = u... | 1 | 8 | 5 |
8bdc7cbde9406b70bcd9bb385c4b0f3e87ff9fda | Tony Arcieri | 2024-09-06T13:25:47 | aarch64-dit: safe, high-level API (#1108)
Removes the previous low-level unsafe API and wraps it up instead in a
safe API which automatically performs runtime CPU feature detection and
RAII guards for enabling DIT and restoring its previous state when done. | diff --git a/aarch64-dit/Cargo.toml b/aarch64-dit/Cargo.toml
index d3ad30f..bba53ad 100644
--- a/aarch64-dit/Cargo.toml
+++ b/aarch64-dit/Cargo.toml
@@ -14,7 +14,7 @@ readme = "README.md"
edition = "2021"
rust-version = "1.61"
-[dev-dependencies]
+[dependencies]
cpufeatures = { version = "0.2.14", path = "../cpufe... | 2 | 106 | 6 |
7601e3ec27a17487db129a9808979af02901634d | Tony Arcieri | 2024-09-06T12:48:12 | aarch64-dit: set docs.rs default-target (#1107)
This hopefully allows the docs to generate on docs.rs.
Closes #1106 | diff --git a/aarch64-dit/Cargo.toml b/aarch64-dit/Cargo.toml
index 6a3af26..d3ad30f 100644
--- a/aarch64-dit/Cargo.toml
+++ b/aarch64-dit/Cargo.toml
@@ -16,3 +16,6 @@ rust-version = "1.61"
[dev-dependencies]
cpufeatures = { version = "0.2.14", path = "../cpufeatures" }
+
+[package.metadata.docs.rs]
+default-target ... | 1 | 3 | 0 |
613f0f776fb9cf09b8d868f51f71fe5619d919f5 | Tony Arcieri | 2024-09-06T12:33:10 | aarch64-dit v0.0.1-alpha (#1105) | diff --git a/Cargo.lock b/Cargo.lock
index b1f6f7a..50ae7c5 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4,7 +4,7 @@ version = 3
[[package]]
name = "aarch64-dit"
-version = "0.0.0"
+version = "0.0.1-alpha"
dependencies = [
"cpufeatures",
]
diff --git a/aarch64-dit/Cargo.toml b/aarch64-dit/Cargo.toml
index ec34f... | 2 | 2 | 2 |
cfa21ea50a22df26a52e17649e203e0c2657154d | Tony Arcieri | 2024-08-25T17:49:29 | cpufeatures: add DIT support for AArch64 Linux targets (#1101)
On Linux, availability of FEAT_DIT can be detected via `HWCAP_DIT`. | diff --git a/cpufeatures/src/aarch64.rs b/cpufeatures/src/aarch64.rs
index 5869553..36c253b 100644
--- a/cpufeatures/src/aarch64.rs
+++ b/cpufeatures/src/aarch64.rs
@@ -67,6 +67,7 @@ macro_rules! __expand_check_macro {
#[cfg(any(target_os = "linux", target_os = "android"))]
__expand_check_macro! {
("aes", AES... | 1 | 2 | 0 |
1ad40787ec88039f829144ef59b7bc506eaf07ed | Tony Arcieri | 2024-08-24T17:28:39 | cpufeatures: add support for DIT detection on Apple silicon (#1100)
Adds support for detecting Data Independent Timing (DIT) support which
is available on Apple silicon (e.g. M1/M2/M3).
This uses the `hw.optional.arm.FEAT_DIT` sysctl for detection.
For more information, see:
https://developer.apple.com/docum... | diff --git a/cpufeatures/src/aarch64.rs b/cpufeatures/src/aarch64.rs
index 4248a75..5869553 100644
--- a/cpufeatures/src/aarch64.rs
+++ b/cpufeatures/src/aarch64.rs
@@ -107,6 +107,12 @@ macro_rules! check {
("aes") => {
true
};
+ ("dit") => {
+ // https://developer.apple.com/documentation/x... | 1 | 6 | 0 |
5d46aba5ef3720e854f48d93243c247e4611b125 | Artyom Pavlov | 2024-08-14T15:47:51 | block-buffer: release v0.11.0-rc.1 (#1098) | diff --git a/Cargo.lock b/Cargo.lock
index 308907a..56a5a30 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -11,7 +11,7 @@ dependencies = [
[[package]]
name = "block-buffer"
-version = "0.11.0-rc.0"
+version = "0.11.0-rc.1"
dependencies = [
"crypto-common",
"hex-literal 0.4.1 (registry+https://github.com/rust-lang... | 2 | 9 | 9 |
807f77fb851c8323e3a3a80825514fd5c6a93cfb | Artyom Pavlov | 2024-08-12T18:54:06 | cpufeatures: use `#[cold]` for initialization code (#1096) | diff --git a/Cargo.lock b/Cargo.lock
index 35562a7..308907a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -35,7 +35,7 @@ version = "0.0.2"
[[package]]
name = "cpufeatures"
-version = "0.2.12"
+version = "0.2.13"
dependencies = [
"libc",
]
@@ -111,6 +111,12 @@ version = "0.2.155"
source = "registry+https://github... | 3 | 27 | 17 |
030ae1d905d6d03f1bc4fefed92826a62ae79050 | xjd | 2024-07-27T13:19:24 | wycheproof2blb: secp256k1 with P1363 format (#1092)
parsing ecdsa_secp256k1_sha256_p1363_test.json | diff --git a/wycheproof2blb/src/ecdsa.rs b/wycheproof2blb/src/ecdsa.rs
index 186c551..08d82e2 100644
--- a/wycheproof2blb/src/ecdsa.rs
+++ b/wycheproof2blb/src/ecdsa.rs
@@ -54,7 +54,7 @@ pub fn generator(data: &[u8], algorithm: &str, _key_size: u32) -> Vec<TestInfo>
let mut infos = vec![];
for g in &suite.t... | 2 | 5 | 2 |
8a652e284e75279500ff3adc97f216a1e75a7b4b | Tony Arcieri | 2024-07-26T16:25:06 | dbl v0.4.0-rc.0 (#1094) | diff --git a/Cargo.lock b/Cargo.lock
index aef07c8..35562a7 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -51,7 +51,7 @@ dependencies = [
[[package]]
name = "dbl"
-version = "0.4.0-pre.4"
+version = "0.4.0-rc.0"
dependencies = [
"hybrid-array",
]
diff --git a/dbl/Cargo.toml b/dbl/Cargo.toml
index 283ff14..ef2c84b... | 2 | 2 | 2 |
599265d445b4bac217d535ac12aad4ba140cc3c3 | Tony Arcieri | 2024-07-26T14:54:29 | inout v0.2.0-rc.0 (#1093) | diff --git a/Cargo.lock b/Cargo.lock
index cc41855..aef07c8 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -93,7 +93,7 @@ dependencies = [
[[package]]
name = "inout"
-version = "0.2.0-pre.4"
+version = "0.2.0-rc.0"
dependencies = [
"block-padding",
"hybrid-array",
diff --git a/inout/Cargo.toml b/inout/Cargo.toml
... | 2 | 2 | 2 |
c73d0cb3c141339609a46b16028443fd6bda6bc7 | Tony Arcieri | 2024-07-26T14:18:05 | block-padding v0.4.0-rc.0 (#1091) | diff --git a/Cargo.lock b/Cargo.lock
index 091c95c..cc41855 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -20,7 +20,7 @@ dependencies = [
[[package]]
name = "block-padding"
-version = "0.4.0-pre.4"
+version = "0.4.0-rc.0"
dependencies = [
"hybrid-array",
]
diff --git a/block-padding/Cargo.toml b/block-padding/Car... | 3 | 3 | 3 |
ceafc450bacda470e688397a3d9e4af82786bfa6 | Tony Arcieri | 2024-07-26T14:16:59 | block-buffer v0.11.0-rc.0 (#1090) | diff --git a/Cargo.lock b/Cargo.lock
index 032102e..091c95c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -11,7 +11,7 @@ dependencies = [
[[package]]
name = "block-buffer"
-version = "0.11.0-pre.5"
+version = "0.11.0-rc.0"
dependencies = [
"crypto-common",
"hex-literal 0.4.1 (registry+https://github.com/rust-lan... | 2 | 2 | 2 |
dffbcfeb69a7758572a83716b6eda06939bb8351 | Tony Arcieri | 2024-07-26T03:43:29 | block-buffer: bump `crypto-common` to v0.2.0-rc.0 (#1088) | diff --git a/Cargo.lock b/Cargo.lock
index 25ea685..032102e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -42,9 +42,9 @@ dependencies = [
[[package]]
name = "crypto-common"
-version = "0.2.0-pre.5"
+version = "0.2.0-rc.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b7aa2ec04f5120b83... | 2 | 3 | 3 |
a997e3f2ed06c6e0b9adfc40fbd6c565d41c7358 | Tony Arcieri | 2024-07-26T03:30:55 | cmov: fix `size_of` warning on Rust 1.80 (#1089)
`size_of` is now in the prelude, so on older versions it needs to be
imported explicitly. | diff --git a/cmov/src/portable.rs b/cmov/src/portable.rs
index 94e78ee..c7a0c44 100644
--- a/cmov/src/portable.rs
+++ b/cmov/src/portable.rs
@@ -7,6 +7,7 @@
// TODO(tarcieri): more optimized implementation for small integers
use crate::{Cmov, CmovEq, Condition};
+use core::mem::size_of;
impl Cmov for u16 {
... | 1 | 2 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.