Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,30 @@
run: |
cargo test --target ${{ matrix.target }} --features unit_test --tests

test-pqc:
name: Run ML-KEM and ML-DSA unit tests
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-dev-tools:latest
strategy:
matrix:
target: ["nanox", "nanosplus", "stax", "flex", "apex_p"]
steps:
- name: Clone
uses: actions/checkout@v6
- name: Setup C SDK (API_LEVEL_26)
run: |
git clone https://github.com/LedgerHQ/ledger-secure-sdk --branch API_LEVEL_26 --single-branch /tmp/c_sdk
- name: ML-KEM and ML-DSA unit tests
working-directory: ledger_device_sdk
env:
LEDGER_SDK_PATH: /tmp/c_sdk
# Shrink the heap for Nano X only, other targets keep the default.
HEAP_SIZE: "nanox: 2048"
run: |
cargo test --target ${{ matrix.target }} --features unit_test,mlkem,mldsa --tests

build-apps:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
name: Build all Rust apps
if: github.event_name != 'workflow_dispatch'
uses: ./.github/workflows/reusable_build_all_apps.yml
Expand Down
4 changes: 4 additions & 0 deletions ledger_device_sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ nano_nbgl = [ "ledger_secure_sdk_sys/nano_nbgl" ]
debug_csdk = [ "ledger_secure_sdk_sys/debug_csdk" ]
io_new = [] # switch to new 'io' module
stack_usage = []
mlkem = [ "ledger_secure_sdk_sys/mlkem" ]
mldsa = [ "ledger_secure_sdk_sys/mldsa" ]
mldsa_87 = [ "mldsa", "ledger_secure_sdk_sys/mldsa_87" ]
mldsa_optimization = [ "mldsa", "ledger_secure_sdk_sys/mldsa_optimization" ]

# Build a network/app variant. When enabled, build.rs overlays the
# [package.metadata.ledger.variants.x] table onto the base
Expand Down
4 changes: 4 additions & 0 deletions ledger_device_sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ pub mod io {
pub mod libcall;
pub mod log;
pub mod math;
#[cfg(feature = "mldsa")]
pub mod mldsa;
#[cfg(feature = "mlkem")]
pub mod mlkem;
pub mod nvm;
pub mod pki;
pub mod random;
Expand Down
Loading