Skip to content

Otsca test#398

Merged
nasahlpa merged 3 commits into
lowRISC:masterfrom
siemen11:otsca_test
Sep 18, 2025
Merged

Otsca test#398
nasahlpa merged 3 commits into
lowRISC:masterfrom
siemen11:otsca_test

Conversation

@siemen11
Copy link
Copy Markdown
Contributor

@siemen11 siemen11 commented Jul 15, 2025

Update ot-sca to latest pentestOS on OT.
To do:

  • Update cw310 branch
  • Mention in the commit the commit hash and version to link them

Copy link
Copy Markdown
Collaborator

@nasahlpa nasahlpa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Siemen for working this, having a test framework for ot-sca <-> pentest framework does have a huge impact on the maintainability of the pentesting infrastructure :)

I've dropped a couple of comments. It seems that your changes broke the current SCA capture scripts (please see the CI). In order to merge this we would need to make sure that they still work.

Comment thread communication/chip.py Outdated
Comment thread communication/fi_crypto_commands.py Outdated
Comment thread communication/fi_crypto_commands.py Outdated
Comment thread communication/dut.py Outdated
Comment thread communication/fi_rom_commands.py Outdated
Comment thread communication/fi_rom_commands.py Outdated
Comment thread communication/chip.py Outdated
Comment thread target/chip.py
Comment thread target/communication/BUILD Outdated
Comment thread target/communication/fi_crypto_commands.py Outdated
Comment thread test/penetrationtests/fi/test_scripts/fi_ibex_test.py Outdated
Copy link
Copy Markdown
Collaborator

@nasahlpa nasahlpa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Siemen. I'd suggest a couple of points before we can merge this:

  • Can you please rebase the PR such that we see that CI passes?
  • Would it be possible to add a very brief documentation to test/penetrationtests, i.e., a brief how to run this?
  • Could you please squash some of the commits? E.g., creating a new communication folder and then moving it again at the end?
  • Would it be possible to move the default configs for the target/communication scripts outside of these functions?

Comment thread target/communication/fi_crypto_commands.py Outdated
Comment thread target/communication/fi_crypto_commands.py Outdated
@siemen11 siemen11 force-pushed the otsca_test branch 7 times, most recently from c36a40b to e8b1d8b Compare July 26, 2025 09:23
@siemen11 siemen11 force-pushed the otsca_test branch 2 times, most recently from 660cb46 to 31cf280 Compare August 9, 2025 19:06
@siemen11 siemen11 force-pushed the otsca_test branch 5 times, most recently from 8aae6a2 to eb0c143 Compare August 18, 2025 12:34
@siemen11 siemen11 force-pushed the otsca_test branch 7 times, most recently from ecbad43 to 9a9bbc4 Compare August 20, 2025 12:50
@siemen11 siemen11 force-pushed the otsca_test branch 10 times, most recently from 0f1d2c7 to 2618750 Compare August 26, 2025 09:29
@siemen11 siemen11 force-pushed the otsca_test branch 4 times, most recently from 23c4ffe to 901171d Compare August 30, 2025 09:29
Comment thread target/cw_fpga.py
# Initialize ChipWhisperer scope. This is needed to program the binary.
# Note that the actual scope config for capturing traces is later
# initialized.
self.scope = cw.scope(sn=self.husky_serial)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to keep passing the husky_serial as somehow the CW driver needs that. Now, when having attached multiple CW Huskies, the CW driver asserts that multiple are attached and it needs the serial number.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will add it by updating your commit.

nasahlpa and others added 3 commits September 4, 2025 14:07
Bitstreams were generated with:
./bazelisk.sh build //hw/bitstream/vivado:fpga_cw310_test_rom

ot-sca_cw310 binaries & bitstreams & opentitantool:
commit: lowRISC/opentitan@867c06a

ot-sca_cw310_aes binaries & bitstreams:
commit: lowRISC/opentitan@51a8f50

ot-sca_cw310_otbn binaries & bitstreams:
commit: lowRISC/opentitan@2898576

ot-sca_cw310_kmac binaries & bitstreams:
commit: lowRISC/opentitan@a288f62

Signed-off-by: Pascal Nasahl <nasahlpa@lowrisc.org>
Update the yaml files to version v1.0.3 of OpenTitan's pentest
framework.

Signed-off-by: Siemen Dhooghe <sdhooghe@google.com>
Integrate the capture and fault injection scripts to the latest pentest framework v1.0.3.

This also deprecates the CW305 board and removes the output_len and
input_len values in the cfg.

Signed-off-by: Siemen Dhooghe <sdhooghe@google.com>
Co-authored-by: Pascal Nasahl <nasahlpa@lowrisc.org>
Copy link
Copy Markdown
Collaborator

@nasahlpa nasahlpa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Siemen!

In summary, this PR:

  • Updates the CW310 binaries and bitstreams
  • Does autoformatting of the Python code
  • Update the communication scripts such that they work with the latest pentest framework

@nasahlpa nasahlpa merged commit 3e5990e into lowRISC:master Sep 18, 2025
9 checks passed
@nasahlpa nasahlpa deleted the otsca_test branch September 18, 2025 03:04
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.

2 participants