-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[otbn/ecdsa] Add capture support for ECDSA-256/384
Initial support to capture side-channel traces from OTBN ECDSA-256 and ECDSA-384 applications. New capture commands `ecdsa-simple` and `ecdsa-stream`. Supports only CW-Husky as the capture device. * New files: * `cw/capture_ecdsa_cw310.yaml`: config file for ECDSA-256 experiments * `cw/capture_ecdsa384_cw310.yaml`: config file for ECDSA-384 experiments * `cw/objs/lowrisc_systems_chip_earlgrey_cw310_0.1_ecdsa.bit`: example FPGA bitstream * `cw/objs/ecc384_serial_fpga_cw310.bin`: example ECDSA-384 driver * `cw/objs/ecc_serial_fpga_cw310.bin`: example ECDSA-256 driver * Modified files: * `cw/capture.py` * Add new command `ecdsa-simple` to collect long ECDSA traces without using CW-Husky's streaming mode * Add new command `ecdsa-stream` to collect long ECDSA traces using CW-Husky's streaming mode * `cw/device.py` * Changes to handle PLL frequencies other than 100MHZ * Add `program_target()` for programming the firmware during ECDSA experiments. * Notes: * Tested on CW-310 with a CW-Husky Signed-off-by: Bilgiday Yuce <bilgiday@opentitan.org>
- Loading branch information
Showing
8 changed files
with
466 additions
and
13 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
device: | ||
fpga_bitstream: objs/lowrisc_systems_chip_earlgrey_cw310_0.1_ecdsa.bit | ||
fw_bin: objs/ecc384_serial_fpga_cw310.bin | ||
# Target operating frequency | ||
pll_frequency: 22000000 | ||
baudrate: 115200 | ||
capture: | ||
# Only ECDSA-256 (32) and ECDSA-384 (48) are supported at this moment. | ||
key_len_bytes: 48 | ||
plain_text_len_bytes: 48 | ||
output_len_bytes: 48 | ||
# Samples per trace | ||
num_samples: 262140 | ||
# Offset in samples | ||
offset: 0 | ||
# scope gain in db - 13 for non-stream mode, 32.5 for stream mode | ||
scope_gain: 32.5 | ||
num_traces: 1 | ||
project_name: projects/opentitan_ecdsa_384 | ||
waverunner_ip: 192.168.1.228 | ||
batch_prng_seed: 0 | ||
# As OTBN operations are long, we may need to | ||
# overwrite the folloing parameters | ||
adc_mul: 1 | ||
decimate: 1 | ||
plot_capture: | ||
show: true | ||
num_traces: 1 | ||
trace_image_filename: projects/sample_traces_ecdsa384.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
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 | ||
baudrate: 115200 | ||
capture: | ||
# Only ECDSA-256 (32) and ECDSA-384 (48) are supported at this moment. | ||
key_len_bytes: 32 | ||
plain_text_len_bytes: 32 | ||
output_len_bytes: 32 | ||
# Samples per trace | ||
num_samples: 262140 | ||
# Offset in samples | ||
offset: 0 | ||
# scope gain in db - 13 for non-stream mode, 32.5 for stream mode | ||
scope_gain: 32.5 | ||
num_traces: 1 | ||
project_name: projects/opentitan_ecdsa_256 | ||
waverunner_ip: 192.168.1.228 | ||
batch_prng_seed: 0 | ||
# As OTBN operations are long, we may need to | ||
# overwrite the folloing parameters | ||
adc_mul: 1 | ||
decimate: 1 | ||
plot_capture: | ||
show: true | ||
num_traces: 1 | ||
trace_image_filename: projects/sample_traces_ecdsa256.html |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters