Skip to content

feat: verify PKAM with the enrollment's own signing algorithm - #2736

Open
gkc wants to merge 2 commits into
trunkfrom
gkc-pq-ss3-signing-algo
Open

feat: verify PKAM with the enrollment's own signing algorithm#2736
gkc wants to merge 2 commits into
trunkfrom
gkc-pq-ss3-signing-algo

Conversation

@gkc

@gkc gkc commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

- What I did

  • Added the mldsa65 branch to PKAM signature verification. Without it a post-quantum APKAM keypair could never authenticate: an unrecognised signingAlgo fell through to the RSA default, so a well-formed signature over a correct public key was simply interpreted under the wrong algorithm.
  • Made an APKAM-authenticated connection take its signing algorithm from the enrollment record rather than from whatever the client restates on each connect.
    • Hardening, not a fix — the signature is checked against the stored public key either way, so a client that misstates the algorithm only fails its own verification and cannot downgrade anything. What it closes off is cross-algorithm confusion, where one key blob parses under more than one algorithm.
  • Left legacy PKAM reading the value from the wire. It has no enrollment record to be authoritative about, and the functional suite authenticates over that path with an ecc_secp256r1 key — so pinning it to rsa2048 would have broken working behaviour rather than tightened anything. A legacy enrollment predating the signingAlgo field records none and keeps the existing default.

- How I did it

See commit & diffs.

- How to verify it

Tests pass. enroll_verb_test.dart is green (87), and the at_client_sdk functional pack runs green (104) against an atServer built from this branch — every enrollment test there authenticates over the APKAM path this changes.

- Description for the changelog

PKAM verification accepts signingAlgo:mldsa65, and an APKAM connection's signing algorithm is read from its enrollment record rather than from the wire. Legacy PKAM is unchanged.


Part of the PQ programme's SS-3; the rulings behind it are recorded in at_client_sdk docs/projects/pq/decisions.md section 21.

gkc and others added 2 commits August 3, 2026 18:47
Adds the mldsa65 branch, without which a post-quantum APKAM keypair
could never authenticate: the signature was well formed and the public
key correct, but an unrecognised signingAlgo fell through to the RSA
default and was interpreted under the wrong algorithm.

For an APKAM-authenticated connection the algorithm now comes from the
enrollment record rather than being restated by the client on every
connect. This is hardening, not a fix, and worth saying so plainly: the
signature is checked against the stored public key either way, so a
client that misstates the algorithm only fails its own verification and
cannot downgrade anything. What it closes off is cross-algorithm
confusion, where one key blob parses under more than one algorithm.

Legacy PKAM keeps reading the value from the wire. It has no enrollment
record to be authoritative about, and it may legitimately present
ecc_secp256r1 — the functional suite covers exactly that, authenticating
with an ECC key over the legacy path, so pinning it to rsa2048 would
have broken real behaviour rather than tightened it. A legacy enrollment
predating the signingAlgo field records none, so it keeps the existing
default too.

Parity is owed from the other atServer implementations before a
post-quantum client can rely on this: at least one rejects
signingAlgo:mldsa65 while parsing the command, so a PQ client meets an
invalid-syntax error rather than an authentication failure, and it
carries no ML-DSA support to add a branch to yet.
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