-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
scripts: Fix extracted ECDSA signature padding #19931
base: main
Are you sure you want to change the base?
Conversation
Thank you for your contribution! Note: This comment is automatically posted and updated by the Contribs GitHub Action. |
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
CI InformationTo view the history of this post, clich the 'edited' button above Inputs:Sources:sdk-nrf: PR head: 920e4d4cb84fe3703a4e41eaa09d8e03b5961007 more detailssdk-nrf:
Github labels
List of changed files detected by CI (1)
Outputs:ToolchainVersion: 342151af73 Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped;
|
@kendallgoto can you fix compliance issue? |
@nordicjm sure; fixed now if I understand the error correctly. |
Ensure that ECDSA key components that are too short are properly left-padded with 0s. Signed-off-by: Kendall Goto <[email protected]>
As the comments of
get_ecdsa_signature()
suggest, ECDSA r/s values can be short and require left-padding with zeroes. However, this change replaced theleftpad()
function withljust()
, which provides right-padding. This can cause signature verification to occasionally fail whenSB_CONFIG_SECURE_BOOT_SIGNING_OPENSSL
is used:I presume this went uncaught for so long since
SB_CONFIG_SECURE_BOOT_SIGNING_OPENSSL
is rarely used and signature validation only occasionally fails when it is set.