Skip to content

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

@rubeecube

Description

@rubeecube

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions