-
Notifications
You must be signed in to change notification settings - Fork 823
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pentest] Add ECC256 Keygen SCA test #22190
Conversation
This commit enables communication with the OTBN SCA code over uJSON. The device code is located in lowRISC/opentitan#22190. Signed-off-by: Pascal Nasahl <[email protected]>
a84e637
to
43310a0
Compare
This commit enables communication with the OTBN SCA code over uJSON. The device code is located in lowRISC/opentitan#22190. Signed-off-by: Pascal Nasahl <[email protected]>
This commit enables communication with the OTBN SCA code over uJSON. The device code is located in lowRISC/opentitan#22190. Signed-off-by: Pascal Nasahl <[email protected]>
This commit enables communication with the OTBN SCA code over uJSON. The device code is located in lowRISC/opentitan#22190. Signed-off-by: Pascal Nasahl <[email protected]>
43310a0
to
c03d4fb
Compare
This commit enables communication with the OTBN SCA code over uJSON. The device code is located in lowRISC/opentitan#22190. Signed-off-by: Pascal Nasahl <[email protected]>
c03d4fb
to
bc7f117
Compare
bc7f117
to
dc34cd9
Compare
dc34cd9
to
6f714a9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a look at the code.
LGTM, but I'm nor very familiar with writing device code.
* | ||
* Adds the integer stored in source array to the integer stored in | ||
* destination aray. | ||
* The user needs to ensure that dest_len isenough to store the result |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: typo: "isenough"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, fixed.
* | ||
* @param[in] dest Location of the first input array and the result. | ||
* @param[in] source Location of the second input array. | ||
* @param[in] dest_len Length od the dest array in bytes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: typo: "od"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, fixed.
282a821
to
b16e852
Compare
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]>
b16e852
to
dcc0422
Compare
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]>
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]>
kScaPeripheralEdn | kScaPeripheralHmac); | ||
|
||
// Load p256 keygen from seed app into OTBN. | ||
if (otbn_load_app(kOtbnAppP256KeyFromSeed).value != OTCRYPTO_OK.value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume that this was already there in the previous version of the code, but do we need app loading here?
I mean it's done in handle_otbn_sca_ecc256_app_select
anyway, and also in p256_run_keygen
it's re-loaded for every iteration.
Of course it doesn't do any harm to load it anyway as default, but probably could be omitted here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah, you are right. I've removed it :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
6d41106
to
78c57c5
Compare
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]>
Currently not building as after a rebase the image size exceeds the available IMEM. This issue is resolved by #22717 |
78c57c5
to
2857e11
Compare
This commit adds the ECC256 key generation side-channel penetration test to the codebase. The host code is located in lowRISC/ot-sca#347 Signed-off-by: Pascal Nasahl <[email protected]>
This commit adds the ECC256 key generation side-channel penetration test to the codebase.
The host code is located in lowRISC/ot-sca#347