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

Cryptodoc Update for ML-KEM #239

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Cryptodoc Update for ML-KEM #239

wants to merge 5 commits into from

Conversation

FAlbertDev
Copy link
Collaborator

@FAlbertDev FAlbertDev commented Oct 18, 2024

With the published ML-KEM specification (FIPS 203) and Botan's changes, our cryptodoc must be adapted accordingly.

The implementation and structure of ML-KEM have changed significantly due to extensive refactoring and changes from the specification. Therefore, I rewrote most parts (almost everything) and restructured the format so it matches with the other new algorithms.

@FAlbertDev FAlbertDev self-assigned this Oct 18, 2024
@FAlbertDev FAlbertDev requested a review from reneme October 18, 2024 14:49
reneme

This comment was marked as resolved.

@FAlbertDev

This comment was marked as resolved.

reneme

This comment was marked as resolved.

@reneme reneme added this to the Botan 3.6.0 milestone Oct 22, 2024
atreiber94

This comment was marked as resolved.

@reneme

This comment was marked as resolved.

@reneme

This comment was marked as outdated.

@reneme

This comment was marked as resolved.

Copy link
Owner

@sehlen-bsi sehlen-bsi left a comment

Choose a reason for hiding this comment

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

Small issues regarding notation

``KyberSymmetricPrimitives`` class
(:srcref:`[src/lib/pubkey/kyber/kyber_common]/kyber_symmetric_primitives.h:30|Kyber_Symmetric_Primitives`).
This class provides an interface for the primitives, which are defined as
:math:`PRF`, :math:`H`, :math:`J`, :math:`G`, and :math:`XOF` in Section 4.1 of
Copy link
Owner

Choose a reason for hiding this comment

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

In the algorithms below, double backticks are used mostly, it seems

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I agree, double backticks are more consistent 👍

**Steps:**

1. Generate the random seed ``seed.d`` and the implicit rejection value ``seed.z`` at random using ``rng``
2. ``(rho, sigma) = G(seed.d || k)``
Copy link
Owner

Choose a reason for hiding this comment

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

ML-DSA uses more math notation for rho and sigma etc (which I like) but this has to be a bit more harmonized. Also, see above, G is written in math mode in the "Symmetric primitives" section but here part of a text in double backticks.

Copy link
Owner

Choose a reason for hiding this comment

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

I think I would personally prefer something like

:math:(\rho, \sigma) = G(seed.d || k)

but I don't have very strong feelings and it applies to quite a few places.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For the sake of consistency, I suggest that we stay with double backticks. This is more consistent with all other algorithms (besides ML-DSA). We will align ML-DSA with this syntax as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants