-
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.
This commit enables communication with the OTBN SCA code over uJSON. Currently, the ECC256 Keygen SCA test is supported. The device code is located in lowRISC/opentitan#22190. Signed-off-by: Pascal Nasahl <[email protected]>
- Loading branch information
Showing
10 changed files
with
503 additions
and
503 deletions.
There are no files selected for viewing
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
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,46 @@ | ||
target: | ||
target_type: cw310 | ||
fpga_bitstream: "../objs/lowrisc_systems_chip_earlgrey_cw310_0.1.bit" | ||
force_program_bitstream: True | ||
fw_bin: ../objs/sca_ujson_fpga_cw310.bin | ||
# target_clk_mult is a hardcoded value in the bitstream. Do not change. | ||
target_clk_mult: 0.24 | ||
target_freq: 24000000 | ||
baudrate: 115200 | ||
output_len_bytes: 40 | ||
protocol: "ujson" | ||
port: "/dev/ttyACM1" | ||
husky: | ||
sampling_rate: 200000000 | ||
num_segments: 10 | ||
num_cycles: 1075 | ||
offset_cycles: 0 | ||
scope_gain: 24 | ||
adc_mul: 1 | ||
decimate: 1 | ||
waverunner: | ||
waverunner_ip: 100.107.71.10 | ||
num_segments: 1 | ||
num_samples: 6000 | ||
sample_offset: 0 | ||
capture: | ||
scope_select: husky | ||
show_plot: True | ||
plot_traces: 100 | ||
num_traces: 1000000 | ||
trace_threshold: 110000 | ||
trace_db: ot_trace_library | ||
test: | ||
batch_prng_seed: 0 | ||
key_len_bytes: 40 | ||
text_len_bytes: 40 | ||
plain_text_len_bytes: 40 | ||
masks_on: True | ||
# Currently, 'p256' is the only supported curve. | ||
curve: p256 | ||
# Select the OTBN app to analyze. Currently available: 'keygen', 'modinv' | ||
app: keygen | ||
# For app = keygen: There are two fixed-vs-random test types, KEY and SEED | ||
# Currently batch-mode capture only works with SEED | ||
test_type: KEY | ||
batch_mode: True |
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
44 changes: 44 additions & 0 deletions
44
ci/cfg/ci_otbn_sca_vertical_keygen_cw310_simpleserial.yaml
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,44 @@ | ||
target: | ||
target_type: cw310 | ||
fpga_bitstream: "../objs/lowrisc_systems_chip_earlgrey_cw310_0.1.bit" | ||
force_program_bitstream: False | ||
fw_bin: "../objs/otbn_vertical_serial_fpga_cw310.bin" | ||
# target_clk_mult is a hardcoded value in the bitstream. Do not change. | ||
target_clk_mult: 0.24 | ||
target_freq: 24000000 | ||
baudrate: 115200 | ||
output_len_bytes: 40 | ||
protocol: "simpleserial" | ||
# Trigger source. | ||
# hw: Precise, hardware-generated trigger - FPGA only. | ||
# sw: Fully software-controlled trigger. | ||
trigger: "hw" | ||
husky: | ||
sampling_rate: 200000000 | ||
num_segments: 1 | ||
num_cycles: 200 | ||
offset_cycles: 0 | ||
scope_gain: 24 | ||
adc_mul: 1 | ||
decimate: 1 | ||
capture: | ||
scope_select: husky | ||
show_plot: True | ||
plot_traces: 10 | ||
num_traces: 100 | ||
trace_threshold: 10000 | ||
trace_db: ot_trace_library | ||
test: | ||
batch_prng_seed: 6 | ||
key_len_bytes: 40 | ||
text_len_bytes: 40 | ||
plain_text_len_bytes: 40 | ||
masks_off: False | ||
# Currently, 'p256' is the only supported curve. | ||
curve: p256 | ||
# Select the OTBN app to analyze. Currently available: 'keygen', 'modinv' | ||
app: keygen | ||
# For app = keygen: There are two fixed-vs-random test types, KEY and SEED | ||
# Currently batch-mode capture only works with SEED | ||
test_type: SEED | ||
batch_mode: False |
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,45 @@ | ||
target: | ||
target_type: cw310 | ||
fpga_bitstream: "../objs/lowrisc_systems_chip_earlgrey_cw310_0.1.bit" | ||
force_program_bitstream: False | ||
fw_bin: ../objs/sca_ujson_fpga_cw310.bin | ||
# target_clk_mult is a hardcoded value in the bitstream. Do not change. | ||
target_clk_mult: 0.24 | ||
target_freq: 24000000 | ||
baudrate: 115200 | ||
output_len_bytes: 40 | ||
protocol: "ujson" | ||
port: "/dev/ttyACM_CW310_1" | ||
# Trigger source. | ||
# hw: Precise, hardware-generated trigger - FPGA only. | ||
# sw: Fully software-controlled trigger. | ||
trigger: "hw" | ||
husky: | ||
sampling_rate: 200000000 | ||
num_segments: 1 | ||
num_cycles: 200 | ||
offset_cycles: 0 | ||
scope_gain: 24 | ||
adc_mul: 1 | ||
decimate: 1 | ||
capture: | ||
scope_select: husky | ||
show_plot: True | ||
plot_traces: 10 | ||
num_traces: 100 | ||
trace_threshold: 10000 | ||
trace_db: ot_trace_library | ||
test: | ||
batch_prng_seed: 6 | ||
key_len_bytes: 40 | ||
text_len_bytes: 40 | ||
plain_text_len_bytes: 40 | ||
masks_off: False | ||
# Currently, 'p256' is the only supported curve. | ||
curve: p256 | ||
# Select the OTBN app to analyze. Currently available: 'keygen', 'modinv' | ||
app: keygen | ||
# For app = keygen: There are two fixed-vs-random test types, KEY and SEED | ||
# Currently batch-mode capture only works with SEED | ||
test_type: SEED | ||
batch_mode: False |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
target: | ||
target_type: cw310 | ||
fpga_bitstream: "../objs/lowrisc_systems_chip_earlgrey_cw310_0.1.bit" | ||
force_program_bitstream: False | ||
fw_bin: ../objs/sca_ujson_fpga_cw310.bin | ||
# target_clk_mult is a hardcoded value in the bitstream. Do not change. | ||
target_clk_mult: 0.24 | ||
target_freq: 24000000 | ||
baudrate: 115200 | ||
output_len_bytes: 40 | ||
protocol: "ujson" | ||
port: "/dev/ttyACM_CW310_1" | ||
# Trigger source. | ||
# hw: Precise, hardware-generated trigger - FPGA only. | ||
# sw: Fully software-controlled trigger. | ||
trigger: "sw" | ||
husky: | ||
sampling_rate: 200000000 | ||
num_segments: 20 | ||
num_cycles: 1000 | ||
offset_cycles: 0 | ||
scope_gain: 24 | ||
adc_mul: 1 | ||
decimate: 1 | ||
capture: | ||
scope_select: husky | ||
show_plot: True | ||
plot_traces: 10 | ||
num_traces: 100 | ||
trace_threshold: 10000 | ||
trace_db: ot_trace_library | ||
test: | ||
batch_prng_seed: 6 | ||
key_len_bytes: 40 | ||
text_len_bytes: 40 | ||
plain_text_len_bytes: 40 | ||
masks_off: False | ||
# Currently, 'p256' is the only supported curve. | ||
curve: p256 | ||
# Select the OTBN app to analyze. Currently available: 'keygen', 'modinv' | ||
app: modinv | ||
# For app = keygen: There are two fixed-vs-random test types, KEY and SEED | ||
# Currently batch-mode capture only works with SEED | ||
test_type: SEED | ||
batch_mode: False |
Git LFS file not shown
Oops, something went wrong.