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

Wrong type for a sum : Int -> unsigned int #21

Open
rubeecube opened this issue Oct 2, 2023 · 0 comments
Open

Wrong type for a sum : Int -> unsigned int #21

rubeecube opened this issue Oct 2, 2023 · 0 comments

Comments

@rubeecube
Copy link

rubeecube commented Oct 2, 2023

Hi

In the following code:
https://github.com/XMSS/xmss-reference/blob/171ccbd26f098542a67eb5d2b128281c80bd71a6/wots.c#L85C5-L85C5

The types of variables for the following contains both signed and unsigned int:

  • params->wots_w: unsigned int
  • csum: int
  • msg_base_w: const int*

This might cause issues in corner cases.

  1. Should csum / msg_base_w be unsigned?
  2. Should csum be verified to be positive before the bitshift?
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

No branches or pull requests

1 participant