Skip to content

Pqc algo - #1004

Draft
dacav wants to merge 11 commits into
mainfrom
pqc-algo
Draft

dacav wants to merge 11 commits into
mainfrom
pqc-algo

Conversation

@dacav

@dacav dacav commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

No description provided.

balfanz and others added 2 commits October 8, 2026 09:41
The CTAP HID binding spec states that each continuation frame carry a sequence number, which uses 7 bits. This caps the number of possible continuation frames at 128, or (given frame sizes and space reserved for payload bits) the maximum size of a CTAP HID message at 7609 bytes.

There are larger payloads, however (e.g., PQC algs). The BLE HID spec, and other CTAP HID implementations allow the sequence number to wrap around. This still allows us to detect dropped or spurious frames, but removes the limit of 128 continuation frames. (We're still capping the processing of frames at payload_len.)

This change brings libfido2 in line with those implementations.
LDVG and others added 6 commits October 8, 2026 14:42
The previous implementation leverages EVP_PKEY_new_raw_private_key_ex(),
invoked by mldsa_pk_to_EVP_PKEY(), validate the source buffer length.
While doing so, it leaked the obtained EVP_PKEY object.

The memory leak could could be solved by calling EVP_PKEY_free() on the
EVP_PKEY object. But in practice none of this is needed: the correct
size of the key can be simply checked against the mldsaXX_pk_t::pk
buffer size.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants