diff --git a/.github/workflows/benches.yml b/.github/workflows/benches.yml index 85359266..f3201da4 100644 --- a/.github/workflows/benches.yml +++ b/.github/workflows/benches.yml @@ -5,9 +5,15 @@ name: Benches on demand on: workflow_dispatch jobs: - bench-classic: - uses: Cosmian/reusable_workflows/.github/workflows/cargo-bench.yml@develop + bench-MLKEM512-Curve25519: + uses: Cosmian/reusable_workflows/.github/workflows/cargo-bench.yml@fix/remove-default-features-in-benches with: toolchain: stable - features: test-utils + features: test-utils,mlkem-512,curve25519 + force: true + bench-MLKEM512-P256: + uses: Cosmian/reusable_workflows/.github/workflows/cargo-bench.yml@fix/remove-default-features-in-benches + with: + toolchain: stable + features: test-utils,mlkem-512,p-256 force: true diff --git a/src/abe_policy/access_structure.rs b/src/abe_policy/access_structure.rs index 13259657..fb15e910 100644 --- a/src/abe_policy/access_structure.rs +++ b/src/abe_policy/access_structure.rs @@ -309,10 +309,12 @@ impl AccessStructure { } } -/// Combines all attributes IDs from the given dimensions using at most one attribute for each -/// dimensions. Returns the disjunction of the associated hybridization and activation status. +/// Combines all attributes IDs from the given dimensions using at most one +/// attribute for each dimensions. Returns the disjunction of the associated +/// hybridization and activation status. /// -/// As an example, if dimensions D1::A1 and D2::(A2,B2) are given, the following combinations will be created: +/// As an example, if dimensions D1::A1 and D2::(A2,B2) are given, the following +/// combinations will be created: /// - D1::A1 /// - D1::A1 && D2::A2 /// - D1::A1 && D2::B2 diff --git a/src/core/primitives.rs b/src/core/primitives.rs index 718fc317..c938ab5a 100644 --- a/src/core/primitives.rs +++ b/src/core/primitives.rs @@ -380,11 +380,12 @@ fn h_decaps( let mut encs = encs.iter().collect::>(); shuffle(&mut encs, rng); - // Loop order matters: this ordering is faster. for mut revision in usk.secrets.revisions() { // Shuffle secrets to counter timing attacks attempting to determine // whether successive encapsulations target the same user right. shuffle(&mut revision, rng); + + // Loop order matters: this ordering is faster. for (E, F) in &encs { for (_, secret) in &revision { if let RightSecretKey::Hybridized { sk, dk } = secret {