Skip to content

feat: TBS-pubkey DER structural binding - #165

Merged
Sarkoxed merged 5 commits into
mainfrom
as/tbs-pubkey-der-struct-binding
Oct 20, 2026
Merged

Sarkoxed merged 5 commits into
mainfrom
as/tbs-pubkey-der-struct-binding

Conversation

@Sarkoxed

@Sarkoxed Sarkoxed commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Makes the TBS public-key extraction bind to the DER structure of SubjectPublicKeyInfo rather than to fixed byte offsets, so it parses the encoding diversity present in real Document Signer Certificates.

  • RSA: anchor on the 11-byte rsaEncryption OID element, then skip an optional NULL before the BIT STRING.
  • EC: skip exactly one element after the algorithm OID, accepting both namedCurve (tag 06) and explicit params (tag 30).
  • Length decoding via utils::read_der_length

@Sarkoxed Sarkoxed changed the title make the tbs pk extraction bind to the der format feat: TBS-pubkey DER structural binding Oct 19, 2026

@saleel saleel left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can also remove long comments where not absolutely requried

@Sarkoxed
Sarkoxed changed the base branch from as/read-der-length to main October 20, 2026 14:26
@Sarkoxed
Sarkoxed merged commit 838407b into main Oct 20, 2026
1 check passed
@mverzilli mverzilli mentioned this pull request Oct 21, 2026
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.

2 participants