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

Ease integration of MAYO on embedded platforms #2

Merged
merged 4 commits into from
Oct 25, 2023
Merged

Conversation

mkannwischer
Copy link
Contributor

This patch does some refactoring to allow the direct integration into PQM4. In particular, it does the following changes:

  • support API using size_t rather than unsigned long long (behind a flag)
  • save stack space in signing and expand_sk (not having multiple copies of esk on the stack)
  • fix warnings about shadowing and unused parameters (esp. when using static params)
  • naming of AES and SHAKE that is compatible with PQM4
  • move sample_solution to bitsliced_arithmetic.c so it's easier to replace in optimized implementations

This patch does some refactoring to allow the direct integration into
PQM4. In particular, it does the following changes:
- support API using size_t rather than unsigned long long (behind a
  flag)
- save stack space in signing and expand_sk (not having multiple copies
  of esk on the stack)
- fix warnings about shadowing and unused parameters (esp. when using
  static params)
- naming of AES and SHAKE that is compatible with PQM4
- move sample_solution to bitsliced_arithmetic.c so it's easier to
  replace in optimized implementations
mkannwischer and others added 3 commits October 23, 2023 14:50
…ned loads/stores

Let CI fail on valgrind errors, fix Debug build, fix ct issue in EF
Copy link
Contributor

@bhess bhess left a comment

Choose a reason for hiding this comment

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

adding a commit that should fix the alignment issues..

src/mayo.c Show resolved Hide resolved
include/mayo.h Show resolved Hide resolved
src/mayo.c Show resolved Hide resolved
Copy link
Contributor

@bhess bhess left a comment

Choose a reason for hiding this comment

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

Looks good to me now.

Added a commit with..

  • support for unaligned memory in expand_sk
  • aligned sk_t in sign
  • not setting -O3 in debug build
  • a ct-fix in (generic) EF

@mkannwischer
Copy link
Contributor Author

Thanks @bhess!

@mkannwischer mkannwischer merged commit 8ed00c6 into main Oct 25, 2023
6 checks passed
@mkannwischer mkannwischer deleted the portable branch October 25, 2023 09:29
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