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

taskprov: Enforce param length prefixes #441

Merged
merged 1 commit into from
Nov 29, 2023
Merged

Conversation

cjpatton
Copy link
Contributor

Partially addresses #350.
Stacked on #439.

Structs VdafConfig, DpConfig, and QueryConfig all include a length prefix for the type-specific parameters so that the struct can be decoded even if the type is not recognized. If the parameters don't fill the space indicated by the length prefix, then decoding should fail. This change ensures the length is enforced for recognized types. It unifies the decoding logic across draft02 and draft07 (the former does not have the length prefix).

daphne/src/messages/mod.rs Outdated Show resolved Hide resolved
daphne/src/messages/mod.rs Outdated Show resolved Hide resolved
@cjpatton
Copy link
Contributor Author

Addressed your comments and force-pushed the commit.

Base automatically changed from cjpatton/next-dap-11 to main November 29, 2023 18:16
Structs `VdafConfig`, `DpConfig`, and `QueryConfig` all include a length
prefix for the type-specific parameters so that the struct can be
decoded even if the type is not recognized. If the parameters don't fill
the space indicated by the length prefix, then decoding should fail.
This change ensures the length is enforced for recognized types. It
unifies the decoding logic across draft02 and draft07 (the former does
not have the length prefix).
@cjpatton cjpatton merged commit 0c85eb3 into main Nov 29, 2023
4 checks passed
@cjpatton cjpatton deleted the cjpatton/next-dap-12 branch November 29, 2023 18:47
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