Skip to content

Introduce mld_polymat_get_row() helper function#742

Merged
mkannwischer merged 2 commits into
mainfrom
stream_matrix_2
Dec 31, 2025
Merged

Introduce mld_polymat_get_row() helper function#742
mkannwischer merged 2 commits into
mainfrom
stream_matrix_2

Conversation

@hanno-becker
Copy link
Copy Markdown
Contributor

@hanno-becker hanno-becker commented Nov 25, 2025

  • Add mld_polymat_get_row() to retrieve matrix row pointer
  • Update mld_polyvec_matrix_pointwise_montgomery() to use helper
  • If MLD_CONFIG_REDUCE_RAM is set, generate matrix ad-hoc.

@hanno-becker hanno-becker force-pushed the stream_matrix_2 branch 6 times, most recently from 6b4bbb1 to 59b9a5b Compare November 29, 2025 04:27
@hanno-becker hanno-becker force-pushed the stream_matrix_2 branch 3 times, most recently from f5dbe2e to e9954fb Compare December 30, 2025 07:14
Copy link
Copy Markdown
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 @hanno-becker.

I think it would be best to open a couple of issues regarding CBMC proofs, so we do not forget anything in the future. Rest looks good to me.

Comment thread mldsa/src/polyvec.c
Comment thread mldsa/src/polyvec.c
Comment thread mldsa/src/polyvec.c
Comment thread mldsa/src/polyvec.h
Comment thread README.md Outdated
Comment thread mldsa/mldsa_native_config.h Outdated
- Add mld_polymat_get_row() to retrieve matrix row pointer
- Update mld_polyvec_matrix_pointwise_montgomery() to use helper

Addresses #738 (steps 2-3 of #736)

Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>
@mkannwischer
Copy link
Copy Markdown
Contributor

Thanks @hanno-becker for this draft. I added a commit in the end addressing my comments.
Can we please only maintain ONE list of the expected savings? Otherwise, we will just forget updating one of them at some point. The README is a good place, I think.

Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>
Copy link
Copy Markdown
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 @hanno-becker. LGTM now.

@hanno-becker hanno-becker marked this pull request as ready for review December 31, 2025 07:39
@hanno-becker hanno-becker requested a review from a team as a code owner December 31, 2025 07:39
@mkannwischer mkannwischer merged commit 40ff385 into main Dec 31, 2025
329 checks passed
@mkannwischer mkannwischer deleted the stream_matrix_2 branch December 31, 2025 08:07
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.

Allow ad-hoc generation of matrix Introduce helper function for retrieval of matrix row

2 participants