Skip to content

Commit

Permalink
[ecdsa-sca] Enable ECDSA-256 secret shares for capture
Browse files Browse the repository at this point in the history
- Enables sending of all secret shares (k0, k1, d0, d1) from the Python
code (capture.py).

- Enables the trace collection without needing to reflash the firmware
  at every iteration.

Signed-off-by: Bilgiday Yuce <bilgiday@opentitan.org>
  • Loading branch information
bilgiday committed Jan 17, 2023
1 parent 18c3905 commit 2a9a026
Show file tree
Hide file tree
Showing 7 changed files with 254 additions and 126 deletions.
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ cw/objs/lowrisc_systems_chip_englishbreakfast_cw305_0.1.bit filter=lfs diff=lfs
cw/objs/aes_serial_fpga_nexysvideo.bin filter=lfs diff=lfs merge=lfs -text
cw/objs/lowrisc_systems_chip_earlgrey_cw310_0.1.bit filter=lfs diff=lfs merge=lfs -text
cw/objs/lowrisc_systems_chip_earlgrey_cw310_0.1_kmac_dom.bit filter=lfs diff=lfs merge=lfs -text
cw/objs/lowrisc_systems_chip_earlgrey_cw310_0.1_ecdsa.bit filter=lfs diff=lfs merge=lfs -text
cw/objs/kmac_serial_fpga_cw310.bin filter=lfs diff=lfs merge=lfs -text
cw/objs/sha3_serial_fpga_cw310.bin filter=lfs diff=lfs merge=lfs -text
cw/objs/aes_serial_fpga_cw310.bin filter=lfs diff=lfs merge=lfs -text
cw/objs/ecc_serial_fpga_cw310.bin filter=lfs diff=lfs merge=lfs -text
cw/objs/ecc384_serial_fpga_cw310.bin filter=lfs diff=lfs merge=lfs -text
doc/img/cw310_cwhusky.jpg filter=lfs diff=lfs merge=lfs -text
doc/img/sample_traces_aes.png filter=lfs diff=lfs merge=lfs -text
doc/img/sample_traces_kmac.png filter=lfs diff=lfs merge=lfs -text
test/data/tvla_general/* filter=lfs diff=lfs merge=lfs -text
doc/img/ot-sca-cw310-clocking.png filter=lfs diff=lfs merge=lfs -text
361 changes: 238 additions & 123 deletions cw/capture.py

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions cw/capture_ecdsa_cw310.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
device:
fpga_bitstream: objs/lowrisc_systems_chip_earlgrey_cw310_0.1_ecdsa.bit
fw_bin: objs/ecc_serial_fpga_cw310.bin
# Target operating frequency
pll_frequency: 22000000
# Target operating frequency:
# for ecdsa-simple: 25-50MHz (alignment issues above 66MHz)
# for ecdsa-stream: 15-20MHz (sampling_rate-adc_resolution tradeoff)
# More details on Husky stream mode can be found in the following links:
# https://github.com/lowRISC/ot-sca/issues/106#issuecomment-1359530023
# https://rtfm.newae.com/Capture/ChipWhisperer-Husky/#streaming-mode
pll_frequency: 15000000
baudrate: 115200
capture:
# Only ECDSA-256 (32) and ECDSA-384 (48) are supported at this moment.
Expand All @@ -13,7 +18,8 @@ capture:
num_samples: 262140
# Offset in samples
offset: 0
# scope gain in db - 13 for non-stream mode, 32.5 for stream mode
# scope gain in db - This may change for each setup,
# find a value for your setup
scope_gain: 32.5
num_traces: 1
project_name: projects/opentitan_ecdsa_256
Expand Down
Binary file modified cw/objs/ecc384_serial_fpga_cw310.bin
100644 → 100755
Binary file not shown.
Binary file modified cw/objs/ecc_serial_fpga_cw310.bin
100644 → 100755
Binary file not shown.
Binary file modified cw/objs/lowrisc_systems_chip_earlgrey_cw310_0.1_ecdsa.bit
100644 → 100755
Binary file not shown.
3 changes: 3 additions & 0 deletions doc/img/ot-sca-cw310-clocking.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2a9a026

Please sign in to comment.