Skip to content

Route wc_MlDsaKey_SignCtx through the crypto callback before the prvKeySet check for device keys#10979

Open
aidangarske wants to merge 1 commit into
wolfSSL:masterfrom
aidangarske:mldsa-signctx-cryptocb-devkey
Open

Route wc_MlDsaKey_SignCtx through the crypto callback before the prvKeySet check for device keys#10979
aidangarske wants to merge 1 commit into
wolfSSL:masterfrom
aidangarske:mldsa-signctx-cryptocb-devkey

Conversation

@aidangarske

Copy link
Copy Markdown
Member

Description

  • wc_MlDsaKey_SignCtx checked !prvKeySet and returned BAD_FUNC_ARG before the WOLF_CRYPTO_CB dispatch. A device/id‑backed key (private key in a TPM/HSM, referenced by devId) has no local private material (prvKeySet == 0), so it was rejected before the callback could run.
  • Moves the prvKeySet check to after the crypto‑callback dispatch, matching the sibling wc_MlDsaKey_Sign / wc_MlDsaKey_SignCtxHash which already dispatch first.
  • Enables device‑key ML‑DSA signing via crypto callback. e.g. a TLS 1.3 server signing CertificateVerify on a TPM. Reference: wolfTPM PR
    (aidangarske:mldsa-tls-cryptocb).

@aidangarske aidangarske self-assigned this Jul 22, 2026
Copilot AI review requested due to automatic review settings July 22, 2026 23:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown

retest this please

@Frauschi

Copy link
Copy Markdown
Contributor

Jenkins retest this please

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.

3 participants