Skip to content

crypto: harden IBM Z AES and ECDSA constant-time paths - #95

Merged
loadingalias merged 4 commits into
mainfrom
ibm-z-ct-fix
Aug 27, 2026
Merged

crypto: harden IBM Z AES and ECDSA constant-time paths#95
loadingalias merged 4 commits into
mainfrom
ibm-z-ct-fix

Conversation

@loadingalias

Copy link
Copy Markdown
Owner

Summary

  • replace s390x AES key expansion and table-based fallback exposure with raw KM keys and the shared fixslice64 backend
  • replace ECDSA wide reduction and Fermat inversion with fixed-work reduction and safegcd inversion
  • make ct.toml the DudeCT gate authority and strengthen report validation, diagnostics, lifecycle evidence, benchmarks, and WASI vectors
  • replace push profiles with one fast just push path that never compiles or runs test suites

Validation

  • weekly-profile test-all: 1,758 tests and 227 doctests passed
  • host, Windows, Linux, constrained, and s390x cross-check lanes passed after target-specific lint cleanup
  • s390x CT artifact validation passed with zero hard or needs-fix findings; native IBM Z timing evidence remains intentionally pending
  • WASI runtime vectors passed with default and SIMD configurations
  • just check-actions passed, including actionlint and zizmor
  • production just push completed end to end in 8.63 seconds

Follow-up evidence

The CT workflow is intentionally not run by this PR creation step. Native CT evidence will be run separately after the normal required CI suite is green.

Remove unused KM key expansion and use the generalized fixslice fallback on s390x. Replace ECDSA wide reduction and Fermat inversion with fixed-work arithmetic while binding DudeCT gates to ct.toml.
Keep only cheap branch, outgoing-diff, syntax, conditional Cargo graph, and release-intent checks in the push path. Move compilation, tests, action analysis, and exhaustive assurance back to explicit validation commands and hosted CI.
@loadingalias
loadingalias marked this pull request as ready for review August 27, 2026 01:37
Store fixslice schedules inline on s390x while retaining the existing boxed representation for alloc-enabled RV64. This restores zero-allocation header-protection and AES-SIV construction on IBM Z fallback systems.
Keep the all-zero/all-one mask opaque to LLVM so IBM Z retains bitwise selection during wide-order reduction. This removes the secret-dependent jumps observed by native DudeCT without changing scalar results.
@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.10390% with 15 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/auth/ecdsa.rs 88.18% 15 Missing ⚠️

📢 Thoughts on this report? Let us know!

@loadingalias
loadingalias merged commit fb7b610 into main Aug 27, 2026
59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant