Skip to content
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

opentitanlib: accept ECDSA signatures as ASN.1 blobs #25998

Closed
wants to merge 1 commit into from

Conversation

vbendeb
Copy link

@vbendeb vbendeb commented Jan 24, 2025

Support processing of ECDSA signatures represented as ASN.1 DER blobs.

@vbendeb vbendeb requested a review from a team as a code owner January 24, 2025 02:42
@vbendeb vbendeb requested review from HU90m, pamaury and cfrantz and removed request for a team January 24, 2025 02:42
When processing ECDSA signatures consider the input file to be either
a raw signature, with 32 bytes R and S values in little endian format
concatenated into a single 64 bytes blob, or an ASN.1 encoded ECDSA
signature, which is a sequence of two big endian big number values,
which could be anywhere from one to 33 bytes long.

In case input is in ASN .1 format Convert the values into little
endian and truncate/expand as necessary to generated the internal
representation of R and S of exactly 32 bytes each.

Tested by attaching the Crypto4a HSM produced ECDSA signature to an
owner binary image and verifying the signature, both using
opentitantool.

Signed-off-by: Vadim Bendebury <[email protected]>
@vbendeb vbendeb closed this Jan 24, 2025
@vbendeb vbendeb deleted the ecdsa-asn1 branch January 24, 2025 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant