Skip to content

Conversation

jakemas
Copy link
Contributor

@jakemas jakemas commented Oct 3, 2025

This PR implements configurable namespace prefixes for mldsa-native, following the same pattern as mlkem-native's MLK_CONFIG_NAMESPACE_PREFIX. The changes enable flexible symbol namespacing while maintaining full compatibility with existing CBMC proofs and tests.

The level specific namespacing, e.g. MLD_NAMESPACE_PREFIX_K will come in a following PR that implements the multi-level build configuration along with MLD_CONFIG_MULTILEVEL_WITH_SHARED, MLD_CONFIG_MULTILEVEL_NO_SHARED, and the level specific namespace e.g.MLD_NAMESPACE_KL. Reason being, it's much easier to work with CI when making smaller chunk step-wise infrastructure changes like these.

Discussion points: We inherited namespace and namespacetop from upstream Dilithium. The upstream Kyber doesn't have this split. I've maintained it in this PR, but this may be a good time to assess it's presence.

@jakemas jakemas force-pushed the config-namespace-orefix branch from e5b28fa to 1a84571 Compare October 3, 2025 20:14
@jakemas jakemas marked this pull request as ready for review October 3, 2025 20:50
@jakemas jakemas requested a review from a team as a code owner October 3, 2025 20:50
Copy link
Contributor

@mkannwischer mkannwischer left a comment

Choose a reason for hiding this comment

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

Thanks @jakemas! Looks good to me.

I'm in favour of entirely removing MLD_NAMESPACETOP. Can you open a follow-up PR for that, please?

General comment: Could you please include the details in the commit message rather than the pull request description? It's much easier to find the commit message later on in the git history. Also, if you have single commit PRs, Github will automatically take the commit message as the PR description, so it isn't actually more work.

@mkannwischer mkannwischer merged commit 2811406 into main Oct 4, 2025
313 of 320 checks passed
@mkannwischer mkannwischer deleted the config-namespace-orefix branch October 4, 2025 03:02
@jakemas
Copy link
Contributor Author

jakemas commented Oct 4, 2025

Thanks @jakemas! Looks good to me.

I'm in favour of entirely removing MLD_NAMESPACETOP. Can you open a follow-up PR for that, please?

General comment: Could you please include the details in the commit message rather than the pull request description? It's much easier to find the commit message later on in the git history. Also, if you have single commit PRs, Github will automatically take the commit message as the PR description, so it isn't actually more work.

Thank you -- I will remove NAMESPACETOP in #532 :) -- it follows quite nicely with the addition of NAMESPACE_KL etc. for the multilevel build.

General comment taken on board, promise I did pause for thought if I should add a commit message. I just thought in this case, given its just config files I'm adding that themselves contain documentation, it was self explanatory first commit, and allowed the PR description for some discussion points etc. Anyway, cheers for quick turn around!

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.

Config: Implement MLD_CONFIG_NAMESPACE_PREFIX Extend config file

2 participants