Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
77575be
mmmm
finalyards Oct 28, 2025
ed27e36
Merge remote-tracking branch 'origin'
finalyards Oct 29, 2025
6ffce08
Merge remote-tracking branch 'origin/main'
finalyards Oct 29, 2025
c26a96c
Merge remote-tracking branch 'origin/main'
finalyards Nov 5, 2025
239f22b
Merge remote-tracking branch 'origin/main'
finalyards Nov 5, 2025
1e902bc
Merge remote-tracking branch 'origin/main'
finalyards Nov 9, 2025
5558113
Merge remote-tracking branch 'origin/main'
finalyards Nov 14, 2025
58d5e3b
Merge remote-tracking branch 'origin/main'
finalyards Nov 14, 2025
e911506
Pumps up p256, rand (though they are still rc; no longer pre!); chang…
finalyards Oct 27, 2025
666fe7b
interim; upstream rc releases
finalyards Nov 23, 2025
8be331e
Merge remote-tracking branch 'origin/main' into pr-rand-catchup
finalyards Nov 23, 2025
f531101
Merge remote-tracking branch 'origin/main' into pr-rand-catchup
finalyards Nov 24, 2025
74b8b64
interim; updated some versions but API use still needs fixing, build …
finalyards Nov 25, 2025
24439bb
interim; testing two 'p256/getrandom' approaches
finalyards Nov 25, 2025
1f3ef23
merge with upstream changes
finalyards Nov 27, 2025
1aadf2a
Updated to work with nRF52 (again); placed 'nrf-sdc' to come from a s…
finalyards Nov 30, 2025
5fa26ff
Doc correction
finalyards Dec 4, 2025
95eb090
Merge remote-tracking branch 'origin/main'
finalyards Dec 4, 2025
48a9585
interim; unused dependencies commented out; lock files updated
finalyards Dec 7, 2025
1b93aad
fix: init submodules (also) in main CI job
finalyards Dec 7, 2025
d099c9c
CI should now pass
finalyards Dec 7, 2025
b1c40bd
one more
finalyards Dec 8, 2025
a8156c6
Using 'chacha' mostly through 'rand', 'rand_core' likewise.
finalyards Dec 29, 2025
f862274
Lock updates; elliptic-curve 0.14.0-rc.17 -> rc.18
finalyards Dec 31, 2025
efbdba4
Merge remote-tracking branch 'origin/main' into pr-rand-catchup
finalyards Jan 7, 2026
e5e7987
latest RCs; fails to build
finalyards Jan 7, 2026
eed4c39
merge in upstream
finalyards Jan 8, 2026
d804891
'p256' updated to rc-4; should pass
finalyards Jan 8, 2026
e0cea97
passes. now
finalyards Jan 9, 2026
d129394
updated to latest rand RC; not merged with upstream; skip_ci
finalyards Jan 28, 2026
0be2af3
Merge remote-tracking branch 'origin/main' into pr-rand-catchup
finalyards Jan 28, 2026
e3d56bf
Locks updated
finalyards Jan 28, 2026
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
9 changes: 9 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@ on:
tags:
- "v*"
pull_request:
workflow_dispatch: # needed to be in 'main', for any branch to manually 'Run Workflow' in GitHub UI.

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up submodules
run: git submodule update --init --depth 1 --recursive
- name: Free disk space
run: |
.ci/free_disk_space.sh
Expand Down Expand Up @@ -64,6 +67,9 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Set up submodules
run: |
git submodule update --init --depth 1 --recursive
- name: Build new binary
working-directory: ./examples/nrf52
run: |
Expand All @@ -74,6 +80,9 @@ jobs:
- name: Save binary
run: |
mv ./examples/nrf52/target/thumbv7em-none-eabihf/release/ble_bas_peripheral ./examples/nrf52/target/thumbv7em-none-eabihf/release/original.elf
- name: "[PR] transitioning from 'nrf-sdc' to 'nrf52' needs this." #hack
if: ${{ github.event.pull_request }}
run: git restore examples/nrf52/Cargo.lock
- name: If it's a PR checkout the base commit
if: ${{ github.event.pull_request }}
run: git checkout ${{ github.event.pull_request.base.sha }}
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ jobs:
run: |
gh pr checkout "${{ github.event.inputs.prNr }}"
echo "commit=$(git rev-parse --verify HEAD)" >> "$GITHUB_OUTPUT"
- name: Set up submodules
run: |
git submodule update --init --depth 1 --recursive
- name: Set pending
env:
COMMIT: ${{ steps.checkout.outputs.commit }}
Expand Down Expand Up @@ -102,6 +105,9 @@ jobs:
run: |
gh pr checkout "${{ github.event.inputs.prNr }}"
echo "commit=$(git rev-parse --verify HEAD)" >> "$GITHUB_OUTPUT"
- name: Set up submodules
run: |
git submodule update --init --depth 1 --recursive
- name: Set pending
env:
COMMIT: ${{ steps.checkout.outputs.commit }}
Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "sub/nrf-sdc"]
path = sub/nrf-sdc
url = https://github.com/alexmoon/nrf-sdc
shallow = true
20 changes: 20 additions & 0 deletions IDEAS-RC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Ideas (regarding `rand` RC)

Changes in the security dependencies may open ways to make the `trouble` code base simpler. These are listed here so they won't get forgotten, and can be introduced as secondary PR's, after `rand` 0.10 support is in.


## No double-Chacha'ing RNG seeds

The platform specific (hardware) RNG's could be used as-is, for providing a seed to the `trouble` RNG. Currently, at least with nRF52, the hardware RNG generates a seed, used for creating a `ChaCha` RNG, which again generates a seed, for another. This must be an unnecessary hoop, right?

Looking at these, the author noticed that actually all we'd need in getting things started is a *seed*, not an RNG. Doing this would further simplify the examples, most of all removing the need for `rand_core` dependency in them (rand stuff would remain as an internal dependency of `trouble`). Seems like a good direction (could already be brought in by this PR).


## Use of `getrandom`?

Changes in the APIs have made cryptographically strong RNG generation, without passing the `TRng` type around, possible.

Is this something we'd like to experiment with?

The benefit is mainly removing a bunch of generic parameters, especially in tests. As cons, test cases would need to be changed, since a new kind of RNG would be in use.

12 changes: 12 additions & 0 deletions KNOWN-RC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Known issues (in RC libraries)

## `p256` and/or `elliptic-curve` does not build

See [https://github.com/RustCrypto/elliptic-curves/issues/1590](https://github.com/RustCrypto/elliptic-curves/issues/1590).

## ESP32 security samples do not run

The `esp-hal` library supports `rand_core` 0.6 and 0.9. We'd need it to support 0.10.

Adding this to `esp-hal` wouldn't be a big effort. Can be done as a PR but likely it'll just get there anyhow, once `rand_core` 0.10 proceeds down the RC aile.

17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,23 @@ See the [documentation](https://embassy.dev/trouble) and the [rustdoc](https://d
Trouble is guaranteed to compile on stable Rust 1.80 and up. It *might*
compile with older versions but that may change in any new patch release.

## Preparations

>The below concerns you only, if you plan to build:
>
>- `benchmarks`
>- `examples/nrf52`
>- `examples/nrf54`

Run this command:

```
./prep.sh
```

The `nrf-sdc` dependency is brought in as a submodule (instead of a git dependency). This allows us to have a shallow clone, saving lots (700MB!) of disk space.


## Examples

See `examples` for example applications for different BLE controllers.
Expand Down
Loading
Loading